SBARINFO/HUD scaling problems

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
User avatar
TheRailgunner
Posts: 1556
Joined: Mon Jul 08, 2013 10:08 pm

SBARINFO/HUD scaling problems

Post by TheRailgunner »

So, I've been struggling with a specific issue - I don't know how to make this particular set of HUD effects scale to whatever resolution or HUD scale options that users have, which turns this:

Image

into something like this:

Image
(HUD scale problem - also happens if I add the ForceScaled flag to the statusbar)

Or this:

Image
(resolution problem)

For clarification, I'm talking about the round blue shield graphic - I'm trying to remove the need for end users to have to make it fit by changing their own settings and just have it fit properly out-of-the-box. Here's Malice's SBARINFO lump, spoilered for convenience; the main graphics of concern are the "ShieldHit/Pop/Worb" ones:
Spoiler:
Is there some obvious fix that I'm missing here? Or is it more complicated than adjusting a few values and adding additional flags (I think) to the status bar command?
skdursh
Posts: 176
Joined: Wed Jul 03, 2019 10:17 am

Re: SBARINFO/HUD scaling problems

Post by skdursh »

You said ForceScaled, isn't it supposed to be forcescale with no d? https://zdoom.org/wiki/DrawImage
User avatar
TheRailgunner
Posts: 1556
Joined: Mon Jul 08, 2013 10:08 pm

Re: SBARINFO/HUD scaling problems

Post by TheRailgunner »

skdursh wrote:You said ForceScaled, isn't it supposed to be forcescale with no d? https://zdoom.org/wiki/DrawImage
ForceScaled is for StatusBar, which begins the drawing routine for status bars.

That said, you DO bring up a good point - I should experiment with using forcescale on the DrawImage portions, though it'll require that I define a max-height and max-width.
skdursh
Posts: 176
Joined: Wed Jul 03, 2019 10:17 am

Re: SBARINFO/HUD scaling problems

Post by skdursh »

TheRailgunner wrote: ForceScaled is for StatusBar, which begins the drawing routine for status bars.
Ah, my mistake, although hopefully forcescale will end up doing some good. I was looking forward to trying out your mod on release.
User avatar
TheRailgunner
Posts: 1556
Joined: Mon Jul 08, 2013 10:08 pm

Re: SBARINFO/HUD scaling problems

Post by TheRailgunner »

skdursh wrote:
TheRailgunner wrote: ForceScaled is for StatusBar, which begins the drawing routine for status bars.
Ah, my mistake, although hopefully forcescale will end up doing some good. I was looking forward to trying out your mod on release.
I didn't have much luck with it - but until I figure it out, just reminding users to use widescreen resolutions and set user interface scale to maximum should be enough. I've decided to release it - here's a link to the thread. There's a download link for version 0.99.

Return to “Scripting”