-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Fix Separated HUD bugs and set limits to keep UI pretty #33482
base: master
Are you sure you want to change the base?
Fix Separated HUD bugs and set limits to keep UI pretty #33482
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
When I first tested this version, it forced itself to 45% of my screen and wouldn't let me move it.
After messing around in settings for a while, clicking random buttons, it seems to have fixed itself for full-screen. I could now resize it fine and it wasn't 45% of my screen.
Though, after the full-screen got fixed, my floating version broke as the chat now overlapped the actions and the chat was going off of the screen.
I suspect there's an issue with the viewport scaling & how it interacts with the settings, as when I toggle between the settings, it occasionally breaks and then fixes itself for different resolutions.
Content.Client/UserInterface/Screens/SeparatedChatGameScreen.xaml.cs
Outdated
Show resolved
Hide resolved
Content.Client/UserInterface/Systems/MenuBar/Widgets/GameTopMenuBar.xaml
Show resolved
Hide resolved
Content.Client/UserInterface/Screens/SeparatedChatGameScreen.xaml.cs
Outdated
Show resolved
Hide resolved
Content.Client/UserInterface/Screens/SeparatedChatGameScreen.xaml.cs
Outdated
Show resolved
Hide resolved
Content.Client/UserInterface/Screens/SeparatedChatGameScreen.xaml.cs
Outdated
Show resolved
Hide resolved
Content.Client/UserInterface/Screens/SeparatedChatGameScreen.xaml.cs
Outdated
Show resolved
Hide resolved
I spent some more time analyzing how the settings interact and now have a scale calculation that should work more reliably. The only caveat is that it ignores "Vertical Viewport Fitting" (always acts as if it's on), but I don't think there's a good way around this, because doing otherwise would introduce a circular dependency. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Conflict resolution pending #33576 settling |
Revert of #33047 has deconflicted this PR |
When I first tried it, it worked as expected. But when I switched to the Default layout and then back, it went to a squashed size and I was no longer able to resize it. |
Unfortunately I'm not able to reproduce the problem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you still interested in working on this?
I can walk through causing the bug this week if you're interested.
Yes, if the overall direction of the change still works for you, I'm willing to figure out this detail. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
// The minimum width of InventoryGui + HotbarGui combined. | ||
// Used to keep the PDA from overlapping the shoes slot. | ||
private const int INVENTORY_MINIMUM_WIDTH = | ||
(125 /* width */ - 2 /* negative margin */) * 2 /* ItemStatusPanel */ | ||
+ 68 /* width */ * 10 /* ItemSlotButton, including inventory */ | ||
+ 67 /* width */ * 2 /* hands */; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These values are bound to fall out of line so you can't just rely on magic numbers like this.
About the PR
Sets limits on the widths of the left/right halves of the Separated HUD that avoid letterboxing and UI overlaps, and fixes some related bugs. It's still imperfect, but it should be an improvement over status quo.
Technical details
See also space-wizards/RobustToolbox#5529
Media
Before video:
2024-11-22.23-42-51.mp4
After video:
2024-11-22.23-47-32.mp4
Requirements
Changelog
🆑