* Loadouts redux * Loadout window mockup * More workout * rent * validation * Developments * bcs * More cleanup * Rebuild working * Fix model and loading * obsession * efcore * We got a stew goin * Cleanup * Optional + SeniorEngineering fix * Fixes * Update science.yml * add add * Automatic naming * Update nukeops * Coming together * Right now * stargate * rejig the UI * weh * Loadouts tweaks * Merge conflicts + ordering fix * yerba mate * chocolat * More updates * Add multi-selection support * test h * fikss * a * add tech assistant and hazard suit * huh * Latest changes * add medical loadouts * and science * finish security loadouts * cargo * service done * added wildcards * add command * Move restrictions * Finalising * Fix existing work * Localise next batch * clothing fix * Fix storage names * review * the scooping room * Test fixes * Xamlify * Xamlify this too * Update Resources/Prototypes/Loadouts/Jobs/Medical/paramedic.yml Co-authored-by: Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com> * Update Resources/Prototypes/Loadouts/loadout_groups.yml Co-authored-by: Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com> * Update Resources/Prototypes/Loadouts/Jobs/Civilian/clown.yml Co-authored-by: Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com> * Update Resources/Prototypes/Loadouts/Jobs/Civilian/clown.yml Co-authored-by: Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com> * Update Resources/Prototypes/Loadouts/loadout_groups.yml Co-authored-by: Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com> * Update Resources/Prototypes/Loadouts/Jobs/Security/detective.yml Co-authored-by: Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com> * Update Resources/Prototypes/Loadouts/loadout_groups.yml Co-authored-by: Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com> * ben * Margins --------- Co-authored-by: Firewatch <54725557+musicmanvr@users.noreply.github.com> Co-authored-by: Mr. 27 <koolthunder019@gmail.com> Co-authored-by: Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com>
68 lines
2.2 KiB
C#
68 lines
2.2 KiB
C#
using Content.Client.Message;
|
|
using Content.Client.UserInterface.Systems.EscapeMenu;
|
|
using Robust.Client.AutoGenerated;
|
|
using Robust.Client.Console;
|
|
using Robust.Client.UserInterface;
|
|
using Robust.Client.UserInterface.XAML;
|
|
|
|
namespace Content.Client.Lobby.UI
|
|
{
|
|
[GenerateTypedNameReferences]
|
|
internal sealed partial class LobbyGui : UIScreen
|
|
{
|
|
[Dependency] private readonly IClientConsoleHost _consoleHost = default!;
|
|
[Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!;
|
|
|
|
public LobbyGui()
|
|
{
|
|
RobustXamlLoader.Load(this);
|
|
IoCManager.InjectDependencies(this);
|
|
SetAnchorPreset(MainContainer, LayoutPreset.Wide);
|
|
SetAnchorPreset(Background, LayoutPreset.Wide);
|
|
|
|
LobbySong.SetMarkup(Loc.GetString("lobby-state-song-no-song-text"));
|
|
|
|
LeaveButton.OnPressed += _ => _consoleHost.ExecuteCommand("disconnect");
|
|
OptionsButton.OnPressed += _ => _userInterfaceManager.GetUIController<OptionsUIController>().ToggleWindow();
|
|
}
|
|
|
|
public void SwitchState(LobbyGuiState state)
|
|
{
|
|
DefaultState.Visible = false;
|
|
CharacterSetupState.Visible = false;
|
|
|
|
switch (state)
|
|
{
|
|
case LobbyGuiState.Default:
|
|
DefaultState.Visible = true;
|
|
RightSide.Visible = true;
|
|
break;
|
|
case LobbyGuiState.CharacterSetup:
|
|
CharacterSetupState.Visible = true;
|
|
|
|
var actualWidth = (float) _userInterfaceManager.RootControl.PixelWidth;
|
|
var setupWidth = (float) LeftSide.PixelWidth;
|
|
|
|
if (1 - (setupWidth / actualWidth) > 0.30)
|
|
{
|
|
RightSide.Visible = false;
|
|
}
|
|
|
|
break;
|
|
}
|
|
}
|
|
|
|
public enum LobbyGuiState : byte
|
|
{
|
|
/// <summary>
|
|
/// The default state, i.e., what's seen on launch.
|
|
/// </summary>
|
|
Default,
|
|
/// <summary>
|
|
/// The character setup state.
|
|
/// </summary>
|
|
CharacterSetup
|
|
}
|
|
}
|
|
}
|