Well when I reload the hud scheme/layout Im in 1024x768 - But the hud controls positions/sizes etc are provided in "virtual screen coordinates" already in the HudLayout.res file so it shouldnt matter if Im editing them in 640x480 or not.
When I do the hud_reloadscheme command, it only seems to screw up the font size of text displayed using vgui::Labels. HUD elements that do a direct surface()->DrawText dont suffer from this problem. Looking at the replies I got, no one really seems to know what is causing this here so Ill go ahead and try to fix it then post the solution here I guess. By the way, what is the "native" screen resolution for VGUI editing? Im pretty sure it wasnt 640x480, but I could be wrong.
From: "Benjamin Davison" <[EMAIL PROTECTED]> Reply-To: [email protected] To: [email protected] Subject: Re: [hlcoders] Font size glitches after hud_reloadscheme Date: Sun, 25 Jun 2006 17:51:56 +0100 -- [ Picked text/plain from multipart/alternative ] What res are you editing them in? Edit them in 640*480 and this won't happen. On 6/25/06, William Ravaine <[EMAIL PROTECTED]> wrote: > > Im currently working on my HUD and loading the controls settings from a > keyvalues resource file (HudLayout.res). I've replaced most of the HL2 HUD > panels by my own ones that use vgui::labels to display text (ammo count, > etc) instead of the HudNumericDisplay class (which directly draws text on > the panel surface). > > Im having an annoying bug where the font used by these labels almost > doubles > in size after I execute a hud_reloadscheme command to reload the > HudLayout.res ingame. Several other elements of the UI also get messed up > (half of the HL2 weapon selection menu is outside of the screen, the > player > id text also doubles/triples in size, etc). This forces me to restart my > client to get the fonts back to normal size, and defeats the purpose of > command (which is to reload the hud layout without having to restart the > client). > > Im curious as to what is causing this and was wondering if there a > workaround/fix is available for this before I try fixing this by myself, > provided it's possible at all. I think this has something to do with VGUI > confusing screen resolution and/or not applying proportional values > correctly at some point. I've noticed this also happens when I change my > client's screen resolution. > > My apologizes if this has already been answered in a previous post, but I > couldnt find any message relating to my problem. > > Thanks! > - Spk > > > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > -- - Benjamin Davison -- _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

