General > Developers Corner
Working on a HUD, ScrW() is not your friend
Digital Spit:
So, I'm trying to create a hud I created a HUD but! the only problem is how it's spaced on different peoples screens... the height is the same among everyone's screens it's the width that I'm having a hard time understanding, someone mind helping me here?
Here is how everyone sees it:
Here is how I see it:
How can I make it appear the same on everyone's screen no matter if they are running full screen, window mode or the res they are on?
JamminR:
No exact memory off top of my head, however, the ulx motd, and XGUI, are both reasonably dynamic in where they start.
They grab the users original screen res, then do a multiplication to start at a certain percentage into the width of the screen (height too I think).
Then the code is smart enough I think to remain static if screen res is lower than a certain size.
Megiddo:
JamminR is correct, we base it off percentages. Percentages brings some unique problems as well, but was the simplest for our purposes.
Digital Spit:
So my best bet is to look at how the MOTD is drawn on the players screen and go from there?
Megiddo:
Why not share the code you're currently using to position it?
Navigation
[0] Message Index
[#] Next page
Go to full version