SBARINFO doesn't scale to resolution

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: SBARINFO doesn't scale to resolution

Re: SBARINFO doesn't scale to resolution

by Silentdarkness12 » Sun Feb 26, 2017 6:51 pm

I have, and I got no answer. Even WildWeasel was stumped by this.

It's been seven months, you know........really dunno what to do now. If you really dunno, then i'll stop being a bother, but I may still be up the creek here.

Re: SBARINFO doesn't scale to resolution

by Graf Zahl » Sun Feb 26, 2017 6:49 pm

I absolutely cannot help you here. I haven't written SBARINFO and I haven't worked with it. Better ask an expert in the editing forum.

Re: SBARINFO doesn't scale to resolution

by Silentdarkness12 » Sun Feb 26, 2017 6:45 pm

Well, the base image has none for alignment. So that must mean that all the content must also be null alignment, then?

Re: SBARINFO doesn't scale to resolution

by Graf Zahl » Sun Feb 26, 2017 6:08 pm

You have to use the same alignment rules for stuff that needs to be overlaid. So if a box is right aligned, so must be its content.

Re: SBARINFO doesn't scale to resolution

by Silentdarkness12 » Sun Feb 26, 2017 6:04 pm

A lot of my other image files have Center set for alignment. So in order to fix it, would I have to set all these graphics back to none, and then manually tweak the positions so they fit again?.....

Re: SBARINFO doesn't scale to resolution

by Graf Zahl » Sun Feb 26, 2017 5:55 pm

Ok, that seems to explain it already. You have to understand how the SBARINFO alignment works, unfortunately it uses a somewhat obtuse specification:

- positive x-values get aligned to the left screen border
- negative x-values get aligned to the right screen border
- positive y-values get aligned to the top screen border
- negative y-values get aligned to the bottom screen border.

So all the stuff in your last post gets right aligned, and it looks like you try to overlay it with left-aligned things. And that cannot work.

Re: SBARINFO doesn't scale to resolution

by Silentdarkness12 » Sun Feb 26, 2017 5:48 pm

Here is the basic code for just the background image and such:

Code: Select all

Height 0;
Resolution 320,200;
CompleteBorder True;
Statusbar Fullscreen,FullscreenOffsets
InInventory not gimmehud
{
DrawImage "VisorHud",0,0;
DrawString "DARKFNT1",untranslated,"VITALS",-163,5;
DrawImage "ECGBACK",165,16,none,25,25;
DrawString "DARKFNT1",untranslated,"INVENTORY",-287,5;
DrawString "DARKFNT1",untranslated,"WEAPON:",-304,170;
DrawString "DARKFNT1",untranslated,"ARMOR",-10,170;
DrawString "DARKFNT1",untranslated,"AMMO",-8,65;
(It drags on and on after this so I cut it off)

Re: SBARINFO doesn't scale to resolution

by Graf Zahl » Sun Feb 26, 2017 5:45 pm

Ok, I missed the HD thing. Anyway, to me it looks like it scales perfectly but some coordinates are not correct so stuff is in the wrong place. I'm nearly convinced that the error is on your side somewhere, but don't expect me to sift through that huge thing to find your problem. Can you trim down the HUD to a smaller number of items so that someone has a chance to analyze the code?

Re: SBARINFO doesn't scale to resolution

by Silentdarkness12 » Sun Feb 26, 2017 5:37 pm

Graf Zahl wrote:The mod doesn't work and the SBARINFO is so huge that it's pointless to check for coding errors. Either post something that works or I'll close the report.
Not sure what you mean by not working, Graf. It works just fine alongside Hideous Destructor on my end. It's just that the HUD scaling is nonfunctional.

Re: SBARINFO doesn't scale to resolution

by Graf Zahl » Sun Feb 26, 2017 5:24 pm

The mod doesn't work and the SBARINFO is so huge that it's pointless to check for coding errors. Either post something that works or I'll close the report.

Re: SBARINFO doesn't scale to resolution

by Silentdarkness12 » Thu Sep 22, 2016 5:56 am

MG_Man wrote:HUD scaling has been overhauled in a recent SVN version. Now there is a "uiscale" cvar that trumps the hud_scale cvar. I think this is what's going on here. uiscale works as a direct scale factor. Setting it to 1 does 1x pixel size, 2 does 2x pixel size, and so on. Set it to 0 to use the old method.
That's interesting, although no, that's not what's responsible here. I was having this problem long before uiscale was even implemented, MG_Man.

No matter what uiscale is set to, the placement and scaling of HUD elements seem to vary from resolution to resolution.

Re: SBARINFO doesn't scale to resolution

by MG_Man » Thu Sep 22, 2016 3:34 am

HUD scaling has been overhauled in a recent SVN version. Now there is a "uiscale" cvar that trumps the hud_scale cvar. I think this is what's going on here. uiscale works as a direct scale factor. Setting it to 1 does 1x pixel size, 2 does 2x pixel size, and so on. Set it to 0 to use the old method.

Re: SBARINFO doesn't scale to resolution

by Silentdarkness12 » Thu Aug 11, 2016 12:03 pm

Okay, i'm 100% certain that something's a bit screwed up with hud_scale. And I mean the console command.

I've been toying around with things here, and it seems that if hud_scale is true, then the graphics don't properly scale to resolution like they ought to. But if it's FALSE, then it scales. Now granted, this means it's TINY, but....

Re: SBARINFO doesn't scale to resolution

by wildweasel » Mon Jul 25, 2016 10:05 am

Alekv wrote:Your file does not open .. no actors are used in sbarinfo
If it's complaining about referencing actors that do not exist, you need to load DarkHud with Hideous Destructor.

Re: SBARINFO doesn't scale to resolution

by Silentdarkness12 » Mon Jul 25, 2016 6:12 am

Uh....it does open on my end.

You don't use actors in SBARINFO. That's a DECORATE thing.

Top