Skip to content

Commit

Permalink
Minimalist Action Bar (space-wizards#21352)
Browse files Browse the repository at this point in the history
  • Loading branch information
EmoGarbage404 authored Nov 14, 2023
1 parent 2fdc566 commit 4e84961
Show file tree
Hide file tree
Showing 12 changed files with 111 additions and 317 deletions.
5 changes: 0 additions & 5 deletions Content.Client/Input/ContentContexts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ public static void SetupContexts(IInputContextContainer contexts)
common.AddFunction(boundKey);
}

foreach (var boundKey in ContentKeyFunctions.GetLoadoutBoundKeys())
{
common.AddFunction(boundKey);
}

var aghost = contexts.New("aghost", "common");
aghost.AddFunction(EngineKeyFunctions.MoveUp);
aghost.AddFunction(EngineKeyFunctions.MoveDown);
Expand Down
4 changes: 0 additions & 4 deletions Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,6 @@ void AddCheckBox(string checkBoxName, bool currentState, Action<BaseButton.Butto
{
AddButton(boundKey);
}
foreach (var boundKey in ContentKeyFunctions.GetLoadoutBoundKeys())
{
AddButton(boundKey);
}

AddHeader("ui-options-header-shuttle");
AddButton(ContentKeyFunctions.ShuttleStrafeUp);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
<Control/>
</BoxContainer>
<BoxContainer Name="VoteMenu" Access="Public" Margin="0 10 0 10" Orientation="Vertical"/>
<actions:ActionsBar Name="Actions" Access="Protected" />
</BoxContainer>
<widgets:GhostGui Name="Ghost" Access="Protected" />
<hotbar:HotbarGui Name="Hotbar" Access="Protected" />
<actions:ActionsBar Name="Actions" Access="Protected" />
<chat:ResizableChatBox Name="Chat" Access="Protected" />
<alerts:AlertsUI Name="Alerts" Access="Protected" />
</screens:DefaultGameScreen>
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ public DefaultGameScreen()
SetAnchorPreset(MainViewport, LayoutPreset.Wide);
SetAnchorPreset(ViewportContainer, LayoutPreset.Wide);
SetAnchorAndMarginPreset(TopLeft, LayoutPreset.TopLeft, margin: 10);
SetAnchorAndMarginPreset(Actions, LayoutPreset.BottomLeft, margin: 10);
SetAnchorAndMarginPreset(Ghost, LayoutPreset.BottomWide, margin: 80);
SetAnchorAndMarginPreset(Hotbar, LayoutPreset.BottomWide, margin: 5);
SetAnchorAndMarginPreset(Chat, LayoutPreset.TopRight, margin: 10);
SetAnchorAndMarginPreset(Alerts, LayoutPreset.TopRight, margin: 10);

Chat.OnResized += ChatOnResized;
Chat.OnChatResizeFinish += ChatOnResizeFinish;
Actions.ActionsContainer.Columns = 1;
}

private void ChatOnResizeFinish(Vector2 _)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public SeparatedChatGameScreen()
SetAnchorPreset(ViewportContainer, LayoutPreset.Wide);
SetAnchorPreset(MainViewport, LayoutPreset.Wide);
SetAnchorAndMarginPreset(VoteMenu, LayoutPreset.TopLeft, margin: 10);
SetAnchorAndMarginPreset(Actions, LayoutPreset.BottomLeft, margin: 10);
SetAnchorAndMarginPreset(Actions, LayoutPreset.TopLeft, margin: 10);
SetAnchorAndMarginPreset(Ghost, LayoutPreset.BottomWide, margin: 80);
SetAnchorAndMarginPreset(Hotbar, LayoutPreset.BottomWide, margin: 5);
SetAnchorAndMarginPreset(Alerts, LayoutPreset.CenterRight, margin: 10);
Expand Down
Loading

0 comments on commit 4e84961

Please sign in to comment.