Commit Graph

14 Commits

Author SHA1 Message Date
Christoph Oelckers 3e67a8bafa - let hud_scale act like an override to uiscale, just like con_scale does.
- better handling of ForceScale for the fullscreen HUD that doesn't mess around with CVARs.
- moved the mug shot into the status bar, because this is global state that needs to be shared between different pieces of code which want to display a mug shot.
- SBARINFO should work off the current status bar settings instead of the ones stored in its script object
2017-03-25 18:32:47 +01:00
Christoph Oelckers bdb9275f8c - made the mugshot accessible to ZScript.
Note that there is no direct access, all this exposes is a single function to get the current face's texture which then can be drawn using the existing functions.
2017-03-25 01:22:42 +01:00
Christoph Oelckers 2d17594f6f - converted the Strife status bar to use the new HUD specific draw functions so that it also can benefit from coming changes.
Note that the pop screens are special because they are not subject to scaling - they will always be drawn with the current resolutions clean scale. As a result they cannot use the HUD drawers but instead continue to use the low level draw functions directly.
2017-03-25 00:35:19 +01:00
Christoph Oelckers b17b8d32ad completely redid the active powerup drawer for the HUD
- replaced Inventory.DrawPowerup with a GetPowerupIcon method so that the calling code can handle the drawing and apply its own rules. This was a major design flaw of allowing the inventory items to handle the drawing themselves, because they were unable to adjust to different HUD frontends. Note that any mod that overrides DrawPowerup will not draw any icon that expects to be handled that way!
- the alternative HUD now has its own, separate drawer that obeys the AltHUD's rules, and not the ones of the normal fullscreen HUD.
- the standard drawer has been scriptified as a virtual function.
- Both drawers now handle positioning of the icon inside its assigned box themselves instead of trusting the powerup item to do it correctly.
- DTA_HUDRules and Screen.DrawHUDTexture are to be considered deprecated because both do not integrate into the redesigned HUD code.
2017-03-24 22:58:16 +01:00
Christoph Oelckers 6760e01a0d - implemented the status bar's DrawString function and ported the fullscreen HUD part of the Strife status bar to use the new functionality. 2017-03-24 20:09:50 +01:00
Christoph Oelckers b5720ee1e7 - initial work on DrawString method. 2017-03-24 02:38:44 +01:00
Christoph Oelckers 617934e1c2 - added a few exports for game strings which the SBARINFO string drawer can access and which should also be available by ZScript.
- merged BaseStatusBar and CustomStatusBar back together.

Since the low level draw functions are better done in native code for both performance and debuggability the split has become pointless.
2017-03-24 02:12:36 +01:00
Christoph Oelckers a3ee3c287e - major progress on the status bar code: SBARINFO's DrawGraphic has been ported into a generic function of the base statusbar class and put to use for a few items on the Strife status bar.
- decided to ditch the widget system I had started to lay out. As it turns out that would make things far more complicated and slower than they need to be.
2017-03-24 00:47:08 +01:00
Christoph Oelckers 31ea33bfc4 - rewrote the condition nodes from SBARINFO in ZScript. This compiles but hasn't been tested yet. 2017-03-23 00:25:26 +01:00
Christoph Oelckers 3744c2eee7 - this was missing. 2017-03-22 20:33:40 +01:00
Christoph Oelckers f0e4f54c80 - one more bit of scriptification. 2017-03-22 18:38:09 +01:00
Christoph Oelckers 1423d5f42a - scriptified the SBARINFO wrapper.
This serves no purpose in itself but it removes a native side class from the status bar class hierarchy which allows for better editing options later.
2017-03-22 17:29:13 +01:00
Christoph Oelckers 4c51a4fc59 - reimplemented the health bar for Strife's status bar. 2017-03-22 14:59:12 +01:00
Christoph Oelckers 9bffe4ee50 - scriptified the main statusbar interface and the Strife status bar.
Note that the Strife status bar does not draw the health bars yet. I tried to replace the hacky custom texture with a single fill operation but had to find out that all the coordinate mangling for the status bar is being done deep in the video code. This needs to be fixed before this can be made to work.

Currently this is not usable in mods because they cannot initialize custom status bars yet.
2017-03-22 00:32:52 +01:00