Page 1 of 1

HUD icons scaling

Posted: Sat Aug 22, 2009 11:43 am
by Jekyll Grim Payne
What I'm interested in is this: in default (G)ZDoom HUDs the icons if items, health, armor, ammo, etc. get scaled in higher resolutions, though their coordinates on the screen remain the same. It seems impossible to make it this way in your custom HUD through SBARINFO, as the only way to make the hud stretched is to make it 'forcescaled', which would also make it look like 320x200 in any resolution. Maybe I am wrong? If I am, how do I make the icons scale in higher resolutions and at the same time not make the HUD shrink in higher resolutions?

The other question is -- even more important -- how do I make items' icons scaled to the size of an inventory icon box? With ZDoom Alternative HUD the icons of items and weapons are scaled to one certain size, despite the resolution and despite the original size of the item's sprite. How do I do that in my custom HUD? I need to make inventory items with big icons (because these items will have writing on them, that must be possible to read) and at the same time I want them to fit in the frame of an inventory item in the inventory bar in the lower part of the screen.

Some help would be really much appreciated!!!

Re: HUD icons scaling

Posted: Sat Aug 22, 2009 12:11 pm
by wildweasel
You'll want to look into using the [wiki]TEXTURES[/wiki] lump for most of this stuff.

Re: HUD icons scaling

Posted: Sat Aug 22, 2009 2:05 pm
by Jekyll Grim Payne
Um... I made it like this:

Code: Select all

sprite KCELA0, 61, 56
{
XScale 2.54167
YScale 2.33332
}
so that it would become 24x24. The sprite stopped showing in game. I tried whole numbers too.

Re: HUD icons scaling

Posted: Sat Aug 22, 2009 6:09 pm
by Ryan Cordell
You have to patch the sprite in again, so it's like:

Code: Select all

sprite KCELA0, 61, 56
{
XScale 2.54167
YScale 2.33332
Patch KCELA0, x, y {}
}

Re: HUD icons scaling

Posted: Sun Aug 23, 2009 4:13 am
by Jekyll Grim Payne
Aha! This works, thanks a lot!

Re: HUD icons scaling

Posted: Tue Aug 23, 2016 4:01 am
by theleo_ua
Ryan Cordell, I tried same thing for ammo icons in alternative HUD (I tried tons of different variations of values) and still cannot change offset and increase size of ammo icons in alternative HUD

It it possible in GZDoom 2.1.1 x64 ?

Re: HUD icons scaling

Posted: Tue Aug 23, 2016 4:51 am
by Accensus
I don't think modifying the Alt HUD in any way is even possible.