I've started working a lot with dialogs, and I've run into a problem involving screen resolution. I've found that Dialog placement and Mouse Clicked Position is based on the resolution the player's Starcraft is running at (maybe this is obvious). The problem is that I run Starcraft at 1920x1080, and I can position dialogs and size them perfectly to suit my resolution, but if I switch to a lower one the difference can be drastic. The same thing happens with mouse coordinates.
With some work I can make functions that automatically convert size/location arguments to the proper value, or use % of screen, based on the user's resolution. But, the problem with that is getting the user's resolution, which I can't find a way of doing short of asking in a dialog. I tried making a dummy dialog, setting it to fullscreen and grabbing it's new size, but it just returns the size of the dialog before I made it fullscreen.
So, I'm just wondering if there's an easy solution to this. Or, how other people deal with it. I would have thought it would have come up before but I haven't seen anyone else have the same issue.
you need to develop under 1024x768 that how i deal with it. also basing all my UI elements on a "real" variable so players can ajust the UI to their liking at higher resolutions.
That doesn't solve the issue.. it just prevents stuff from disappearing off screen. If I place a dialog to the right side of the screen at that resolution and then switch to 1920x1080 it's almost at the middle of the screen.
I guess I'll just have to have the sizes automatically scaled after asking for the user's resolution.
I've started working a lot with dialogs, and I've run into a problem involving screen resolution. I've found that Dialog placement and Mouse Clicked Position is based on the resolution the player's Starcraft is running at (maybe this is obvious). The problem is that I run Starcraft at 1920x1080, and I can position dialogs and size them perfectly to suit my resolution, but if I switch to a lower one the difference can be drastic. The same thing happens with mouse coordinates.
With some work I can make functions that automatically convert size/location arguments to the proper value, or use % of screen, based on the user's resolution. But, the problem with that is getting the user's resolution, which I can't find a way of doing short of asking in a dialog. I tried making a dummy dialog, setting it to fullscreen and grabbing it's new size, but it just returns the size of the dialog before I made it fullscreen.
So, I'm just wondering if there's an easy solution to this. Or, how other people deal with it. I would have thought it would have come up before but I haven't seen anyone else have the same issue.
Thanks.
@ubermikeleet: Go
you need to develop under 1024x768 that how i deal with it. also basing all my UI elements on a "real" variable so players can ajust the UI to their liking at higher resolutions.
@Pandaros_Brewmaster: Go
That doesn't solve the issue.. it just prevents stuff from disappearing off screen. If I place a dialog to the right side of the screen at that resolution and then switch to 1920x1080 it's almost at the middle of the screen.
I guess I'll just have to have the sizes automatically scaled after asking for the user's resolution.
I'm confused.. can't you anchor UI elements to sections of the screen, such as the top left corner, or Middle right side?