Add collapse button to lobby right panel (#37140)
* Add collapse button to lobby right panel * Half sized buttons
This commit is contained in:
@@ -100,7 +100,27 @@
|
||||
<controls:HSpacer Spacing="10" />
|
||||
<widgets:ChatBox Name="Chat" Access="Public" VerticalExpand="True" Margin="3 3 3 3" MinHeight="50" />
|
||||
</BoxContainer>
|
||||
<TextureButton Name="CollapseButton"
|
||||
TexturePath="filled_right_arrow.svg.192dpi"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Margin="0 2 2 0"
|
||||
ModulateSelfOverride="#DEDEDE"
|
||||
Scale="0.5 0.5"/>
|
||||
</PanelContainer>
|
||||
</SplitContainer>
|
||||
<PanelContainer Name="ExpandPanel"
|
||||
StyleClasses="AngleRect"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Margin="0 2 2 0"
|
||||
Visible="False">
|
||||
<TextureButton Name="ExpandButton"
|
||||
TexturePath="filled_left_arrow.svg.192dpi"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
ModulateSelfOverride="#DEDEDE"
|
||||
Scale="0.5 0.5"/>
|
||||
</PanelContainer>
|
||||
</BoxContainer>
|
||||
</lobbyUi:LobbyGui>
|
||||
|
||||
@@ -23,6 +23,9 @@ namespace Content.Client.Lobby.UI
|
||||
|
||||
LeaveButton.OnPressed += _ => _consoleHost.ExecuteCommand("disconnect");
|
||||
OptionsButton.OnPressed += _ => UserInterfaceManager.GetUIController<OptionsUIController>().ToggleWindow();
|
||||
|
||||
CollapseButton.OnPressed += _ => TogglePanel(false);
|
||||
ExpandButton.OnPressed += _ => TogglePanel(true);
|
||||
}
|
||||
|
||||
public void SwitchState(LobbyGuiState state)
|
||||
@@ -53,6 +56,12 @@ namespace Content.Client.Lobby.UI
|
||||
}
|
||||
}
|
||||
|
||||
private void TogglePanel(bool value)
|
||||
{
|
||||
RightSide.Visible = value;
|
||||
ExpandPanel.Visible = !value;
|
||||
}
|
||||
|
||||
public enum LobbyGuiState : byte
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
11
Resources/Textures/Interface/Default/filled_left_arrow.svg
Normal file
11
Resources/Textures/Interface/Default/filled_left_arrow.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="12"
|
||||
height="14"
|
||||
viewBox="0 0 12 14">
|
||||
|
||||
<path
|
||||
fill="#7b7e9e"
|
||||
d="M0,7 L12,0 L12,14 L0,7 Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 213 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
@@ -0,0 +1,2 @@
|
||||
sample:
|
||||
filter: true
|
||||
11
Resources/Textures/Interface/Default/filled_right_arrow.svg
Normal file
11
Resources/Textures/Interface/Default/filled_right_arrow.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="12"
|
||||
height="14"
|
||||
viewBox="0 0 12 14">
|
||||
|
||||
<path
|
||||
fill="#7b7e9e"
|
||||
d="M12,7 L0,0 L0,14 L12,7 Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 213 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
@@ -0,0 +1,2 @@
|
||||
sample:
|
||||
filter: true
|
||||
Reference in New Issue
Block a user