right, the problem is i have ui elements that cover the entire width of the screen including buttons hidden by images that require precise positioning based on the artwork for the ui, i can't just offset by a pixel amount based on say left or right because then once they line up in one resolution they no longer will line up in another...
changing the ui design to be anchor based vs the full width wouldn't be the ideal solution. I would almost rather start it off with a popup asking them what resolution they are playing in, then adjust accordingly, however if there was a way to auto-detect the settings that would be the ideal solution
I am working on a map with a complete overhaul of the UI and I have noticed a few things that were strange and are now becoming a problem. First let me preface this a little with the method that I am customizing the UI. I am creating dialogs then hiding their backgrounds and attaching images to the dialog to create my own UI.
That being said, here's where things become strange. I run the game at 1920x1080. One would think that If i were to create a dialog that is 1920x1080, hide the background then attach an image to this at 0,0 offset with the dimensions of 1920x1080 that it would fill the screen. It turns out this is not the case. In fact in order to fill my screen the dimensions apparently have to be set to 2132x1202. I have no idea why this dimension but after much trial and error I got it to fit. The problem is now that this now ONLY fits for people who run at 1920x1080. When I run this at another resolution, as expected, portions of the UI are now off the screen.
I could solve all of this if there was a way for me to retrieve the screen resolution that the player is using, I could then run all my dimensions and offsets through a simple function and set them based on the user screen dimensions. Does anyone know of a method of doing this?
One solution that I've found for this was to use effects to grant experience and a custom function call to apply the effects to the unit in question.. This is not my code but was taken from a tutorial and posting that I cannot seem to find at the moment, it was created originally by zifoon ([email protected]). Attached is his map which I got off the tutorial.
The important parts to look at are the Give Experience function and his effects that he has created to better understand it.
0
@progammer: Go
right, the problem is i have ui elements that cover the entire width of the screen including buttons hidden by images that require precise positioning based on the artwork for the ui, i can't just offset by a pixel amount based on say left or right because then once they line up in one resolution they no longer will line up in another...
changing the ui design to be anchor based vs the full width wouldn't be the ideal solution. I would almost rather start it off with a popup asking them what resolution they are playing in, then adjust accordingly, however if there was a way to auto-detect the settings that would be the ideal solution
0
I am working on a map with a complete overhaul of the UI and I have noticed a few things that were strange and are now becoming a problem. First let me preface this a little with the method that I am customizing the UI. I am creating dialogs then hiding their backgrounds and attaching images to the dialog to create my own UI.
That being said, here's where things become strange. I run the game at 1920x1080. One would think that If i were to create a dialog that is 1920x1080, hide the background then attach an image to this at 0,0 offset with the dimensions of 1920x1080 that it would fill the screen. It turns out this is not the case. In fact in order to fill my screen the dimensions apparently have to be set to 2132x1202. I have no idea why this dimension but after much trial and error I got it to fit. The problem is now that this now ONLY fits for people who run at 1920x1080. When I run this at another resolution, as expected, portions of the UI are now off the screen.
I could solve all of this if there was a way for me to retrieve the screen resolution that the player is using, I could then run all my dimensions and offsets through a simple function and set them based on the user screen dimensions. Does anyone know of a method of doing this?
0
One solution that I've found for this was to use effects to grant experience and a custom function call to apply the effects to the unit in question.. This is not my code but was taken from a tutorial and posting that I cannot seem to find at the moment, it was created originally by zifoon ([email protected]). Attached is his map which I got off the tutorial.
The important parts to look at are the Give Experience function and his effects that he has created to better understand it.