Fox, on 25 March 2013 - 12:13 PM, said:
Can't it just use some variable or userdef option to determine the position? I.e. default value x = 0 and y = 168.
Hackish, and a waste of two int32_t. And:
Fox, on 25 March 2013 - 12:13 PM, said:
For now I would just give the level stats the same position as the automapepisode and level (32px offset if screen_size > 0) for the sake of consistensy.
That's a simple hack workaround, but what if your custom HUD is taller than that? Then both level stats and automap ep/lev are problematic.
Fox, on 25 March 2013 - 12:13 PM, said:
(Also it seems you don't have a good way to disable the level stats right now)
ud.levelstats
Fox, on 25 March 2013 - 12:13 PM, said:
And since we are here, shouldn't the status bar left and right side display that border normally seen when you shrink the screen? It's a bit weird to see the background touching the viewport.
That's a limitation of the software viewport. In OpenGL the background is not there.
"Setting RETURN to a non-zero value in EVENT_DISPLAYSBAR will prevent the status bar from being rendered. The area where the big status bar would normally appear remains, however, and will contain visual glitches." "The status bar is not drawn each frame, it is only patched when the ammo counter is updated."
Fox, on 25 March 2013 - 12:13 PM, said:
I requested that before, and TerminX said it could conflict with some old mod. But to tell the truth, I don't really see the purpose of having a built-in HUD now that we have CON mutators. It would be better to have it in a CON file, which would also be editable.
If anything, the statusbar will transition to built-in or included Lua. (Perhaps if not part of the exe, included as an eduke32.pk3 (zip renamed).)
Fox, on 25 March 2013 - 12:13 PM, said:
By the way, what's the purpose of this status bar option? The default status bar wasn't supposed to cover the screen.
More options, so it doesn't cut off the top of the screen. I like the options.
==/==/==
Here is my idea, which needs approval from
Helixhorned.
Normally events use the variable RETURN for some hardcoded values. However, we have the following collection of hardcoded, non-pointer, writable gamevars that we can put to use (as revealed by DNDEBUG x2):
gamevar RETURN 0 2048 // (system)
gamevar ZRANGE 154255552 GAMEVAR_PERPLAYER // (system)
gamevar ANGRANGE 154255624 GAMEVAR_PERPLAYER // (system)
gamevar AUTOAIMANGLE 154255696 GAMEVAR_PERPLAYER // (system)
gamevar LOTAG 0 2048 // (system)
gamevar HITAG 0 2048 // (system)
gamevar TEXTURE 0 2048 // (system)
EVENT_GETSHOTRANGE already uses ZRANGE and ANGRANGE.
I propose that
LOTAG and HITAG be used for the x and y coordinates of the level stats and episode ep/lev in EVENT_DISPLAYSBAR. (You can tell which is being displayed by ud.overhead_on.) One of the variables could be used for the height of your intended status bar and the game will handle the rest.
(I had an idea for another application of LOTAG, HITAG, and TEXTURE
here.)