Major Cooke wrote:Ah, you mean like having someone else develop wrappers/functions for it. Only trouble is, that may wind up being beyond everyone else.
But if it means we can much more easily do things like shuddering huds and more, then I'm down for doing that. It would also be neat if we can change things like health bar filling/emptying to go in more than just horizontal/vertical directions.
Ultimately a status bar is just a rectangle you define with virtual coordinates and then drawing stuff on it. What will be needed is some drawing functions, means to get to the needed info comfortably (meaning writing some wrapper functions that make it easier to get to the values) and maybe some animator widgets. Of course, since full ZScript is available, many crutches to get to the info in the player's inventory are not even necessary because it is readily accessible.
The main problem with SBARINFO has always been that it had to work in a rather rigid and inflexible framework which caused some hideously complex internal code, just have some fun looking at the DSBarInfo::Draw and DrawString function. Awful - just truly and utterly awful.
Nash wrote:Vaecrius wrote:Is there any HUD stuff that can be done in ZScript right now? I don't really see anything on the wiki.
Well, there IS screen.DrawHUDTexture (look at the Wings of Wrath in gzdoom.pk3) but that's quite limited and only useful for placing a static graphic on the screen.
Guess what: That's what it was made for! It gets used in the fullscreen HUD code for Strife as well so it seemed reasonable to do a separate export for it to get the powerup icon stuff out of the way quickly.
jpalomo wrote:Would the fully scriptified status bar code look similar to how Strife's status bar looks in the source?
Yes and no. Of course I'd like to add some higher level functionality, too (i.e. replicate SBARINFOs functionality in a saner fashion), but at the low level you could do an entire status bar that way, if I export all the needed functions.
Oh, btw, I already wrapped the entire SBARINFO stuff in an abstract wrapper, so it won't impact any of my work ever again, all I need to deal with is that wrapper class.
