I found that the players resolution is stored inside the variables.txt file in their documents folder. Is there anyway to load this file and retrieve the "width" and "height" values? I spent hours searching through sc2data files and found a couple interesting lines:
UI/Resolution_Colon=Resolution:
UI/VideoResolution_Colon=Resolution:
Unfortunately the best solution to this problem might be to directly ask the player what his resolution is and explain that the correct information is VERY IMPORTANT, INDEED. Then you can bank the data and provide an option to change it later if necessary.
I recall that there is a 3rd party library somewhere here on mapster which allows you to get the players resolution.
Not sure how well it functionates and what kind of overhead it creates though. I advise you just to scrap any ideas that require the players resolution, otherwise you will most likely run into issues.
Yep, have been testing allot now and got nothing to work very well. Wanted to do a drag and drop system but i have to come up with some other solution for that, not sure how to do it tho.
There has been this misconception in the community that in order to develop good looking dialogs, you need to know the player's resolution. That is not true.
The truth of the matter is that Starcraft 2 scales the dialogs and dialog items to the player's resolution already. Dialogs on a smaller monitor will be correspondingly smaller than things on a larger monitor. It's all proportionate.
The only thing that differs based on the monitor is the aspect ratio. Some players have wider monitors, some players have squarer monitors. Knowing the resolution would not help you because you will want to provide all players with the same information thus you will have to provide it to fit the squarest monitor.
If you want things to appear to spread out for people who have wider monitors, you can anchor some things to the left, some to the right, and some to the center. This will result in there being empty space between the things anchored to the sides and the things anchored to the center on wide monitors, and no empty space on square monitors.
To provide some more specifics, here is an image of a dialog that I created somewhat recently:
The center content is 1060x1160, and the side content is 250x1100. I didn't use the players' resolutions at all, and the empty space exists between the center content and the side content because I have a widescreen monitor.
Edit: It looks the same in lower resolutions, and in lower aspect ratios the side content is closer to the center content.
I found that the players resolution is stored inside the variables.txt file in their documents folder. Is there anyway to load this file and retrieve the "width" and "height" values? I spent hours searching through sc2data files and found a couple interesting lines: UI/Resolution_Colon=Resolution: UI/VideoResolution_Colon=Resolution:
But, How do you load the values into an int?
Thanks.
Would also like to know this. Anybody?
As far as I know, it's not possible.
Unfortunately the best solution to this problem might be to directly ask the player what his resolution is and explain that the correct information is VERY IMPORTANT, INDEED. Then you can bank the data and provide an option to change it later if necessary.
I recall that there is a 3rd party library somewhere here on mapster which allows you to get the players resolution.
Not sure how well it functionates and what kind of overhead it creates though. I advise you just to scrap any ideas that require the players resolution, otherwise you will most likely run into issues.
Yep, have been testing allot now and got nothing to work very well. Wanted to do a drag and drop system but i have to come up with some other solution for that, not sure how to do it tho.
It's not possible and also entirely unnecessary.
There has been this misconception in the community that in order to develop good looking dialogs, you need to know the player's resolution. That is not true.
The truth of the matter is that Starcraft 2 scales the dialogs and dialog items to the player's resolution already. Dialogs on a smaller monitor will be correspondingly smaller than things on a larger monitor. It's all proportionate.
The only thing that differs based on the monitor is the aspect ratio. Some players have wider monitors, some players have squarer monitors. Knowing the resolution would not help you because you will want to provide all players with the same information thus you will have to provide it to fit the squarest monitor.
If you want things to appear to spread out for people who have wider monitors, you can anchor some things to the left, some to the right, and some to the center. This will result in there being empty space between the things anchored to the sides and the things anchored to the center on wide monitors, and no empty space on square monitors.
To provide some more specifics, here is an image of a dialog that I created somewhat recently:
The center content is 1060x1160, and the side content is 250x1100. I didn't use the players' resolutions at all, and the empty space exists between the center content and the side content because I have a widescreen monitor.
Edit: It looks the same in lower resolutions, and in lower aspect ratios the side content is closer to the center content.