SBARINFO Hud Scaling

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
Ivan
Addicted to Zandronum
Posts: 2229
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

SBARINFO Hud Scaling

#1

Post by Ivan » Sat Jul 09, 2016 11:40 am

I have a hud made with SBARINFO for a mod. In some resolutions it looks too small and in some too big. Is there a way to normalize it? (Without using ACS to create the entire hud...)

User avatar
SwordGrunt
Forum Regular
Posts: 377
Joined: Thu Jun 07, 2012 8:43 pm

Re: SBARINFO Hud Scaling

#2

Post by SwordGrunt » Sat Jul 09, 2016 4:44 pm

Set the resolution's width and height before any HUD definitions. Then, use the 'forcescaled' property on the statusbar declaration.

An example is Outcast's HUD, where both the fullscreen and statusbar HUDs are the same, and have their resolution set to 1024x768 no matter the user's own resolution:

Code: Select all

interpolatehealth true;
completeborder true;
Height 0;
resolution 1024, 768;		// width and height

statusbar normal, forcescaled, fullscreenoffsets
{ [...] }

statusbar fullscreen, forcescaled, fullscreenoffsets
{ [...] }
I don't think you can use the resolution property multiple times to set a different size for each statusbar, but I'm not sure so it's worth trying in case you need that.

User avatar
Ivan
Addicted to Zandronum
Posts: 2229
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

Re: SBARINFO Hud Scaling

#3

Post by Ivan » Sat Jul 09, 2016 5:57 pm

I didn't know of that forcescaled property, that's exactly what I need. Thanks!

User avatar
Fused
Contributor
Posts: 683
Joined: Sat Nov 09, 2013 9:47 am
Location: Netherlands
Contact:

Re: SBARINFO Hud Scaling

#4

Post by Fused » Sat Jul 09, 2016 6:36 pm

Somebody really needs to update the wiki with this kind of stuff. SBARINFO has a lot of potential but so little is known.
My mods
Image Image

My socials
Image Image

User avatar
Ivan
Addicted to Zandronum
Posts: 2229
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

Re: SBARINFO Hud Scaling

#5

Post by Ivan » Sat Jul 09, 2016 6:38 pm

Fused wrote:Somebody really needs to update the wiki with this kind of stuff. SBARINFO has a lot of potential but so little is known.
There's very little (if any) example code as well. Most of the explanations are also kind of vague and not very precise sometimes. Would really help if someone did correct/add information there.

Catastrophe
Retired Staff / Community Team Member
Posts: 2569
Joined: Sat Jun 02, 2012 2:44 am

Re: SBARINFO Hud Scaling

#6

Post by Catastrophe » Sat Jul 09, 2016 6:50 pm

Should probably ask on ZDoom since most of the modders there have been frequently using the new features provided by SBARINFO

Post Reply