I am creating a custom minimap for my map and I am currently trying to implement the feature that if the user clicks on a certain point on the minimap it will pan the user's camera to that point in the world. I am having trouble finding the screen coordinates of the minimap dialog. I need to know the max of X and Y of the dialog. I read somewhere that the resolution being used for all dialogs to be 1:1 from editor to game is 1920x1280. That means a dialog of 256x256 in the editor is 256x256 in game at 1920x1280 resolution.
My dialog size is 256x256 and I am running at resolution 1024x768.
(1 / 1920) * 1024 = .5333333333
(1 / 1280) * 748 = .6
Minimap Dialog max X coordinate should be: 256 * .5333333333 = 136.5333333
Minimap Dialog max Y coordinate should be: 256 * .6 = 153.6
That would make it a rectangle and not a square.
Ingame the size is 164x164, a square.
This is where I am stuck, how do I find out what the dialog size is going to be ingame while taking resolution into account?
I'm not sure what type of map you are doing but is it possible to make it designed for a non-widescreen resolution and then make all side areas have a fog of war or something?
I figured it out, woot. After hours of trial and error, I found out that the screen UI resolution is set depending on the aspect ratio of the user's resolution. There is one resolution per aspect ratio. I'm in the process of making an excel spreadsheet that will list all the aspect ratios and resolutions Starcraft 2 supports.
Here is my WIP spreadsheet:
All of this is to find the exact size of a dialog via UI screen coordinates.
Here is the formula for finding how big a dialog is with the user's resolution:
My minimap for example:
My resolution is 1024x768 which is 4:3 aspect ratio. Therefor the UI screen resolution is 1600x1200. My minimap dialog size is set to 256x256.
(1024/1600)*256=163.84(768/1200)*256=163.84
The actual size of my minimap dialog in-game is 163.84 x 163.84.
I am creating a custom minimap for my map and I am currently trying to implement the feature that if the user clicks on a certain point on the minimap it will pan the user's camera to that point in the world. I am having trouble finding the screen coordinates of the minimap dialog. I need to know the max of X and Y of the dialog. I read somewhere that the resolution being used for all dialogs to be 1:1 from editor to game is 1920x1280. That means a dialog of 256x256 in the editor is 256x256 in game at 1920x1280 resolution.
My dialog size is 256x256 and I am running at resolution 1024x768.
(1 / 1920) * 1024 = .5333333333
(1 / 1280) * 748 = .6
Minimap Dialog max X coordinate should be: 256 * .5333333333 = 136.5333333
Minimap Dialog max Y coordinate should be: 256 * .6 = 153.6
That would make it a rectangle and not a square.
Ingame the size is 164x164, a square.
This is where I am stuck, how do I find out what the dialog size is going to be ingame while taking resolution into account?
I'm not sure what type of map you are doing but is it possible to make it designed for a non-widescreen resolution and then make all side areas have a fog of war or something?
I figured it out, woot. After hours of trial and error, I found out that the screen UI resolution is set depending on the aspect ratio of the user's resolution. There is one resolution per aspect ratio. I'm in the process of making an excel spreadsheet that will list all the aspect ratios and resolutions Starcraft 2 supports.
Here is my WIP spreadsheet:
All of this is to find the exact size of a dialog via UI screen coordinates.
Here is the formula for finding how big a dialog is with the user's resolution:
My minimap for example: My resolution is 1024x768 which is 4:3 aspect ratio. Therefor the UI screen resolution is 1600x1200. My minimap dialog size is set to 256x256.
The actual size of my minimap dialog in-game is 163.84 x 163.84.
I tried it with all the resolutions and it works.
@desiderius1: Go
Awesome, you should post that in the tutorials section so it won't be lost easily.