SBARINFO
Moderator: GZDoom Developers
-
Blzut3
-

- Posts: 3219
- Joined: Wed Nov 24, 2004 12:59 pm
- Operating System Version (Optional): Kubuntu
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: SBARINFO
It certainly is possible just not the proper fix probably.
-
Nash
-

- Posts: 17510
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: SBARINFO
http://forum.zdoom.org/viewtopic.php?p=259696#p259696wildweasel wrote:Note: I'm no programmer, so I don't know if this is even technically feasible.
-
Blzut3
-

- Posts: 3219
- Joined: Wed Nov 24, 2004 12:59 pm
- Operating System Version (Optional): Kubuntu
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: SBARINFO
Code: Select all
- Added: fillzeros flag for drawnumber. When set the string will always have
a length of the specified size and zeros will fill in for the missing places.
If the number is negative the negative sign will take the place of the last
digit.
- Added: globalarray type to drawnumber which will display the value in a
global array with the index set to the player's number. Untested.
- Added: isselected command to SBarInfo.
- Fixed: Bi and Tri colored numbers didn't work.
- Fixed: Crash when using nullimage as the last image in drawswitchableimage.
- Applied Graf suggestion to include the y coord when calulating heights to fix
most of the gaps caused by round off errors. At least for now anyways and it
is only applied for drawimage.
- SBarInfo inventory bars have been converted to use screen->DrawTexture()-
Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: SBARINFO
Patch added
-
Blzut3
-

- Posts: 3219
- Joined: Wed Nov 24, 2004 12:59 pm
- Operating System Version (Optional): Kubuntu
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: SBARINFO
New patch, mainly to fix the bug with unscaled status bars.
Code: Select all
- Fixed: SBarInfo tried to calculate scaled offsets on unscaled status bars.
- Added: createpopup to SBarInfo. No we don't have custom popups yet. It only
defines the transition effect. Currently none or slideinbottom.
- Made the first argument of DrawMugShot optional (think of it as an overloaded
function). The use of the first argument is deprecated due to the event of
per player class faces.
- More changes from DrawImage to screen->DrawTexture(). I guess I didn't get
them all just yet.-
Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: SBARINFO
patch added
-
Blzut3
-

- Posts: 3219
- Joined: Wed Nov 24, 2004 12:59 pm
- Operating System Version (Optional): Kubuntu
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: SBARINFO
I thought I would post this little teaser on what is coming probably tomorrow (unless something comes up and I'm unable to work on it).
Screen Shot
Basically translucency can be applied on a per status bar basis. In addition this means a fade in/out transition for Strife pop-ups becomes possible.
Screen Shot
Basically translucency can be applied on a per status bar basis. In addition this means a fade in/out transition for Strife pop-ups becomes possible.
-
Nash
-

- Posts: 17510
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: SBARINFO
WOW! Can't wait to try that out. Keep up the good work, Blzut!
-
Gez
-

- Posts: 17946
- Joined: Fri Jul 06, 2007 3:22 pm
Re: SBARINFO
But not on a per-element status?Blzut3 wrote:Basically translucency can be applied on a per status bar basis.
-
NiGHTMARE
- Posts: 3463
- Joined: Sat Jul 19, 2003 8:39 am
Re: SBARINFO
Yeah, would be great to be able to have the backgrounds translucent and the numbers non-translucent, for example
.
-
Jimmy
-

- Posts: 4728
- Joined: Mon Apr 10, 2006 1:49 pm
- Preferred Pronouns: He/Him
Re: SBARINFO
I notice a slight problem comes into sight with the ARMS/FRAGS bar. 
-
Blzut3
-

- Posts: 3219
- Joined: Wed Nov 24, 2004 12:59 pm
- Operating System Version (Optional): Kubuntu
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: SBARINFO
Gez, mostly because I don't feel like mixing the alpha value of the command with the alpha value of the status bar.
Jimmy91, and what does that have to do with custom status bars? It can be avoided if you chop the frags out of the Doom status bar and make it a separate lump.
Jimmy91, and what does that have to do with custom status bars? It can be avoided if you chop the frags out of the Doom status bar and make it a separate lump.
-
Blzut3
-

- Posts: 3219
- Joined: Wed Nov 24, 2004 12:59 pm
- Operating System Version (Optional): Kubuntu
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: SBARINFO
And here is the patch. I know there is a bug with the status popup (it doesn't seem to work). I'm fairly certain there are only 9 huds available to the user and for some reason I need to allocate 10. And even then the status popup doesn't work right (numbers in the underlying hud seem to shift). So I'll have to look into that some other time.
Code: Select all
- Simplified the DrawGraphic function in sbarinfo_display.cpp
- Added xOffset, yOffset, and alpha to every drawing function in
sbarinfo_display.cpp. So Strife popups can be handeled better and allow for
other effects (translucent bars?). I'm thinking about making a struct for
these five (also x and y) arguments so that the argument lists don't become a
mess.
- Changed DRAWIMAGE in sbarinfo_display.cpp to not use so many calls to
DrawGraphic.
- DrawKeyBar wasn't using screen->DrawTexture.
- Added a Fade transition for popups. It takes two args fade in rate and fade
out rate. Both are floats (1.0 = 1 tic to complete 0.5 = 2 tics to complete
and so on).
- Added a translucency arg to statusbars. 1.0 = opaque and 0.0 = invisible.-
MDenham
- Posts: 161
- Joined: Sun Oct 14, 2007 2:23 am
Re: SBARINFO
If multiple status bars can be shown at one time, this isn't an issue.Gez wrote:But not on a per-element status?Blzut3 wrote:Basically translucency can be applied on a per status bar basis.
If they can't... then maybe that'd help.
-
Blzut3
-

- Posts: 3219
- Joined: Wed Nov 24, 2004 12:59 pm
- Operating System Version (Optional): Kubuntu
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: SBARINFO
Graf/Randy, is there something wrong with the patch?