From de5319737e16941bf0abf70017f2878cbc4a283c Mon Sep 17 00:00:00 2001 From: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> Date: Thu, 16 Nov 2023 00:12:47 -0500 Subject: [PATCH] ok final actions fixes fr this time (#21683) --- .../Screens/SeparatedChatGameScreen.xaml | 6 ++++-- .../Screens/SeparatedChatGameScreen.xaml.cs | 3 +-- .../Systems/Actions/ActionUIController.cs | 6 ++++++ .../Systems/Actions/Controls/ActionButton.cs | 12 ++++++++---- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Content.Client/UserInterface/Screens/SeparatedChatGameScreen.xaml b/Content.Client/UserInterface/Screens/SeparatedChatGameScreen.xaml index 33418520a2..d62ad33dfc 100644 --- a/Content.Client/UserInterface/Screens/SeparatedChatGameScreen.xaml +++ b/Content.Client/UserInterface/Screens/SeparatedChatGameScreen.xaml @@ -16,10 +16,12 @@ - - + + + + diff --git a/Content.Client/UserInterface/Screens/SeparatedChatGameScreen.xaml.cs b/Content.Client/UserInterface/Screens/SeparatedChatGameScreen.xaml.cs index e0c66b7a8b..7816cf1be1 100644 --- a/Content.Client/UserInterface/Screens/SeparatedChatGameScreen.xaml.cs +++ b/Content.Client/UserInterface/Screens/SeparatedChatGameScreen.xaml.cs @@ -18,8 +18,7 @@ public sealed partial class SeparatedChatGameScreen : InGameScreen SetAnchorPreset(ScreenContainer, LayoutPreset.Wide); SetAnchorPreset(ViewportContainer, LayoutPreset.Wide); SetAnchorPreset(MainViewport, LayoutPreset.Wide); - SetAnchorAndMarginPreset(VoteMenu, LayoutPreset.TopLeft, margin: 10); - SetAnchorAndMarginPreset(Actions, LayoutPreset.TopLeft, margin: 10); + SetAnchorAndMarginPreset(TopLeftContainer, LayoutPreset.TopLeft, margin: 10); SetAnchorAndMarginPreset(Ghost, LayoutPreset.BottomWide, margin: 80); SetAnchorAndMarginPreset(Hotbar, LayoutPreset.BottomWide, margin: 5); SetAnchorAndMarginPreset(Alerts, LayoutPreset.CenterRight, margin: 10); diff --git a/Content.Client/UserInterface/Systems/Actions/ActionUIController.cs b/Content.Client/UserInterface/Systems/Actions/ActionUIController.cs index 5a992786a2..635647c890 100644 --- a/Content.Client/UserInterface/Systems/Actions/ActionUIController.cs +++ b/Content.Client/UserInterface/Systems/Actions/ActionUIController.cs @@ -752,6 +752,12 @@ public sealed class ActionUIController : UIController, IOnStateChanged(); + if (_action != null || + _controller.IsDragging && GetPositionInParent() == Parent?.ChildCount - 1) { - Button.Texture = null; + Button.Texture = _buttonBackgroundTexture; } else { - Button.Texture = _buttonBackgroundTexture; + Button.Texture = null; } } @@ -326,6 +328,8 @@ public sealed class ActionButton : Control, IEntityControl { base.FrameUpdate(args); + UpdateBackground(); + Cooldown.Visible = _action != null && _action.Cooldown != null; if (_action == null) return; @@ -397,7 +401,7 @@ public sealed class ActionButton : Control, IEntityControl // it's only depress-able if it's usable, so if we're depressed // show the depressed style - if (_depressed) + if (_depressed && !_beingHovered) { HighlightRect.Visible = false; SetOnlyStylePseudoClass(ContainerButton.StylePseudoClassPressed); -- 2.51.2