Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use loadout/inventory #5707

Open
thehuyxl opened this issue Apr 19, 2024 · 4 comments
Open

Can't use loadout/inventory #5707

thehuyxl opened this issue Apr 19, 2024 · 4 comments

Comments

@thehuyxl
Copy link

image

This is how my loadout looks like, i can't use anything or change my loadout, maybe this is caused by my hud?

@leadscales
Copy link

leadscales commented Apr 19, 2024

this update busted a ton of custom huds, including almost all of mine and many others as well. probably just uninstall the hud for now. seems they patched a perfectly good method of aligning the charinfopanel with the subpanel. can't have anything nice :/

a bandaid fix for now for most custom huds is to go to <hud>/resource/ui/charfinfopanel.res and set character_info -> settitlebarvisible to 1. this, of course, will break the positioning of almost everything, but you can, at least, still use it i guess.

@leadscales
Copy link

image

it seems the ypos of the sheet is completely randomized every time the menu gets reloaded? the only thing preventing it doing that is having the title bar enabled, but it did NOT do this in 32 bit tf2. you can adapt to this, but it will ALWAYS be a few pixels off which will be very jarring for certain styles of custom huds.

a really nice solution would be a way just to set the sheet position in the res files manually.

@thehuyxl
Copy link
Author

this update busted a ton of custom huds, including almost all of mine and many others as well. probably just uninstall the hud for now. seems they patched a perfectly good method of aligning the charinfopanel with the subpanel. can't have anything nice :/

a bandaid fix for now for most custom huds is to go to <hud>/resource/ui/charfinfopanel.res and set character_info -> settitlebarvisible to 1. this, of course, will break the positioning of almost everything, but you can, at least, still use it i guess.

Thank for your help, it's work! I can use items right now, just a little bit issue that the letters overlap each other but i think it's fine. Thank you so muck!

@leadscales
Copy link

leadscales commented Apr 19, 2024

some more developments:

the offset seems to be caused by the title bar itself (alongside its own margins i suppose), which always offsets it by 36 pixels, regardless of the resolution, aspect ratio, anything; it completely ignores vgui's scaling.
image
this would be very easy to work around if you could move things by pixels, instead of vgui units, but you cannot.

i would post part of the source code from the leak that's specifically causing this part of the issue, but i doubt that's welcome here.

setting the title bar's visibility to 0 obviously prevents it from rendering in the first place, stopping this from ever happening... but it appears we cannot do this anymore without the entire sheet changing its ypos to a seemingly random number.

i tried using borders to inset the entire panel exactly 36px, but that also appears to inset the entire gameui panel 36 pixels alongside it. i am not sure if this is intended behavior or not.

some solutions i propose:

  • allow the sheet to be manually positioned
  • allow the sheet to be pinned to other elements
  • make the title bar use vgui's scaling system
  • allow us to manually set the size of the title bar
  • revert to the old behavior (forgive me if this is not possible)

EDIT: FIX FOR HUD DEVELOPERS
this will make it so the sheet is always at the top of the screen, so you can easily reposition everything from there.
in the clientscheme, set BaseSettings -> Frame.ClientInsetY to 0, and in the charinfopanel file, set character_info -> titletextinsety to -30. restart tf2, and reposition everything else from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants