Author Topic: How do I set a static position for a HUD?  (Read 3025 times)

is there any advantage to using getRes() over $pref::Video::resolution?
Less to type, but that's about it. Using global variables will be slightly faster than a function call (hash table lookup, get string pointer, quick strcpy to stack vs hash lookup, point cpu to function, copy return to buffer, copy to stack)

You should use getRes() for better readability, though. Only use $pref::video::resolution if you're in dire need of performance.

or if too lazy to retype it, since I think he has it as the variable already

but getRes() just returns the global variable?

but getRes() just returns the global variable?
It seems to have 1 word less than the variable.

since I wanted to go beside the tools GUI, I used 210, and it worked great. thank you guys for all the help. hope this thread helps someone else in the future.


but getRes() just returns the global variable?
Nope, it just returns the result of an internal engine function, but both contain the information you need anyways.
« Last Edit: June 30, 2015, 09:58:44 PM by Val »

is there any advantage to using getRes() over $pref::Video::resolution?
variables can be changed, what an eingine function returns cannot. Same reason to use .getBL_ID() over .BL_ID or whatever the names are.

Set the reference point to top right instead of top left, then use the offset to move it to the left of the paint GUI.

If you do this then you don't need to mess with screen resolution stuff.

If you do this then you don't need to mess with screen resolution stuff.

no idea how to do that stuff. Would it be more efficient?

You know how there's those two dropdowns when you select a GUI item in the editor that say "Right" and "Bottom"? Change the one that says "Right" to "Left".

You know how there's those two dropdowns when you select a GUI item in the editor that say "Right" and "Bottom"? Change the one that says "Right" to "Left".

This is what I meant.