SBARINFO Hud not scaling correctly

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
HellBlade64
Forum Regular
Posts: 100
Joined: Mon Aug 13, 2012 9:03 pm
Contact:

SBARINFO Hud not scaling correctly

#1

Post by HellBlade64 » Sat Oct 03, 2020 11:28 pm

I'm having an odd issue with a custom SBARINFO that I'm trying to use for my mod.
It only appears correctly if the video resolution is a 16:9 resolution and hud_scale = 1.
I have been looking for any reason why it wouldn't be scaling correctly with resolution and hud_scale but I can't find any.
and setting "untranslated" or "right" as alignments appear to do nothing.
ZDoom Wiki is no help since there are no examples of how more complex DrawNumber syntaxes should be correctly written.
This is my first actual attempt at using SBARINFO so I am nowhere near versed enough to know what my issue is.

Here are some screenshots of the issue
======================================

How the HUD should appear and does appear on 16:9 and 17:10 ratios:
Spoiler: (Open)
Image
How the HUD appears on 4:3, 5:4, and 16:10 ratios:
Spoiler: (Open)
Image
How the HUD universally appears with hud_scale set to 0:
Spoiler: (Open)
Image
======================================

Here also is the SBARINFO code for the fullscreen HUD (it's a lightly modified version of the default fullscreen HUD):
Spoiler: (Open)

Code: Select all

statusbar fullscreen, fullscreenoffsets // ZDoom HUD
{
    //health
    drawmugshot 5, 15, 215;
    drawnumber 3, HUDFONT_DOOM, untranslated, health, drawshadow, 50, -20;

    //armor
    drawimage armoricon, 80, -24, centerbottom;
    drawnumber 3, HUDFONT_DOOM, untranslated, armor, drawshadow, whennotzero, 100, -20;
	
	drawimage "CLIPA0", 472, 175;
	drawnumber 3, smallfont, untranslated, ammo Clip2, 478, 174;
	drawimage "SHELA0", 469, 188;
    drawnumber 3, smallfont, untranslated, ammo Shell2, 478, 187;
	drawimage "ROCKA0", 473, 220;
    drawnumber 3, smallfont, untranslated, ammo RocketAmmo2, 478, 219;
	drawimage "CELLA0", 470, 238;
    drawnumber 3, smallfont, untranslated, ammo Cell2, 478, 237;
	drawimage "DSOLA0", 470, 261;
	drawnumber 3, smallfont, untranslated, ammo DemonSoul, 478, 260;

    gamemode deathmatch
    {
        drawnumber 2, HUDFONT_DOOM, untranslated, frags, drawshadow, -4, 1;
    }
    gamemode singleplayer, cooperative, teamgame
    {
        drawkeybar 6, horizontal, reverserows, auto, 102, 258, 0, 3, auto;
    }
}

Post Reply