PDA

View Full Version : What can you do to get the current resolution?



XistenZ
01-31-2012, 03:36 PM
As usual, I apparently want to do extreme things with this engine, after (unsuccessfully) scouring the interweb for any way to create a box with text onto the screen, I ended up using the canvas for that. However, some may have noticed that all screens are not the exact same size, thus, these boxes can, may and will appear completely retarded on some screens. Unless you can retrieve the screen resolution somehow. I know, I know, how silly of me to want to do things other than "maxHealth = more", but hey, that's me, all innovative and stuff...

Someone know of some kind of a workaround? Even better would be if there actually was something like "currentResolution.X/Y". Among all threads and articles not going through how to get the resolution, I found one stating exactly the opposite so my mood kinda sank.

Thanks
//needs moar

Psyonix-Jared
01-31-2012, 04:16 PM
In Canvas.uc


var const int SizeX, SizeY; // Zero-based actual dimensions.

Less sarcasm in the future please.

Acecutter69
02-01-2012, 02:26 AM
I use canvas clip.x or canvas.clip.y

It is also held in the player controller as viewport size. Btw what ur asking for is basic and found all over several scripts in unreal, and udn. Please learn to use the search function and look for your self b4 asking here. Reading the structure is the best way to learn. And keep your questions objective or you may not get an answer...