- add: new lobby and ui tweaks. (#7)

* base

* arrow pointer for buttons

* some progress for text buttons, need cleaning

* fixed observe button, remove fraction

* just for now

* ui tweaks

* more ui tweaks

* feat: ченджлог в лобби

---------

Co-authored-by: Remuchi <RemuchiOfficial@gmail.com>
This commit is contained in:
rhailrake
2024-01-31 12:54:38 +00:00
committed by GitHub
parent 7c6beaa70f
commit 7872502bf8
97 changed files with 1187 additions and 339 deletions

View File

@@ -22,7 +22,7 @@ public sealed class AccessOverlay : Overlay
_lookup = lookup;
_xform = xform;
_font = cache.GetFont("/Fonts/NotoSans/NotoSans-Regular.ttf", 12);
_font = cache.GetFont("/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf", 12);
}
protected override void Draw(in OverlayDrawArgs args)

View File

@@ -24,7 +24,7 @@ namespace Content.Client.Administration
_eyeManager = eyeManager;
_entityLookup = entityLookup;
ZIndex = 200;
_font = new VectorFont(resourceCache.GetResource<FontResource>("/Fonts/NotoSans/NotoSans-Regular.ttf"), 10);
_font = new VectorFont(resourceCache.GetResource<FontResource>("/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf"), 10);
}
public override OverlaySpace Space => OverlaySpace.ScreenSpace;

View File

@@ -7,7 +7,7 @@ namespace Content.Client.Administration.UI.CustomControls;
public sealed class HSeparator : Control
{
private static readonly Color SeparatorColor = Color.FromHex("#3D4059");
private static readonly Color SeparatorColor = Color.FromHex("#191919");
public HSeparator(Color color)
{

View File

@@ -42,7 +42,7 @@ namespace Content.Client.Administration.UI.CustomControls
PopulateList(_adminSystem.PlayerList);
FilterLineEdit.OnTextChanged += _ => FilterList();
_adminSystem.PlayerListChanged += PopulateList;
BackgroundPanel.PanelOverride = new StyleBoxFlat {BackgroundColor = new Color(32, 48, 32)};
BackgroundPanel.PanelOverride = new StyleBoxFlat {BackgroundColor = new Color(20, 20, 20)};
}
private void PlayerListItemPressed(BaseButton.ButtonEventArgs? args, ListData? data)

View File

@@ -7,7 +7,7 @@ namespace Content.Client.Administration.UI.CustomControls;
public sealed class VSeparator : PanelContainer
{
private static readonly Color SeparatorColor = Color.FromHex("#3D4059");
private static readonly Color SeparatorColor = Color.FromHex("#191919");
public VSeparator(Color color)
{

View File

@@ -35,7 +35,7 @@ public sealed class ExplosionDebugOverlay : Overlay
IoCManager.InjectDependencies(this);
var cache = IoCManager.Resolve<IResourceCache>();
_font = new VectorFont(cache.GetResource<FontResource>("/Fonts/NotoSans/NotoSans-Regular.ttf"), 8);
_font = new VectorFont(cache.GetResource<FontResource>("/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf"), 8);
}
protected override void Draw(in OverlayDrawArgs args)

View File

@@ -19,8 +19,8 @@ namespace Content.Client.Administration.UI.Tabs.PlayerTab
private const string ArrowUp = "↑";
private const string ArrowDown = "↓";
private readonly Color _altColor = Color.FromHex("#292B38");
private readonly Color _defaultColor = Color.FromHex("#2F2F3B");
private readonly Color _altColor = Color.FromHex("#141414");
private readonly Color _defaultColor = Color.FromHex("#191919");
private readonly AdminSystem _adminSystem;
private IReadOnlyList<PlayerInfo> _players = new List<PlayerInfo>();

View File

@@ -23,10 +23,6 @@
<ProjectReference Include="..\RobustToolbox\Robust.Client\Robust.Client.csproj" />
<ProjectReference Include="..\Content.Shared\Content.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Spawners\" />
<Folder Include="White\Trail\" />
</ItemGroup>
<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
<Import Project="..\RobustToolbox\MSBuild\XamlIL.targets" />
</Project>

View File

@@ -28,7 +28,7 @@ public sealed class PuddleOverlay : Overlay
IoCManager.InjectDependencies(this);
_debugOverlaySystem = _entitySystemManager.GetEntitySystem<PuddleDebugOverlaySystem>();
var cache = IoCManager.Resolve<IResourceCache>();
_font = new VectorFont(cache.GetResource<FontResource>("/Fonts/NotoSans/NotoSans-Regular.ttf"), 8);
_font = new VectorFont(cache.GetResource<FontResource>("/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf"), 8);
}
protected override void Draw(in OverlayDrawArgs args)

View File

@@ -1,9 +1,14 @@
using System.Linq;
using System.Numerics;
using Content.Client._Ohio.Buttons;
using Content.Client.Changelog;
using Content.Client.GameTicking.Managers;
using Content.Client.LateJoin;
using Content.Client.Lobby.UI;
using Content.Client.Message;
using Content.Client.Preferences;
using Content.Client.Preferences.UI;
using Content.Client.Resources;
using Content.Client.UserInterface.Systems.Chat;
using Content.Client.Voting;
using Robust.Client;
@@ -14,7 +19,7 @@ using Robust.Client.UserInterface.Controls;
using Robust.Shared.Configuration;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
namespace Content.Client.Lobby
{
@@ -30,12 +35,14 @@ namespace Content.Client.Lobby
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly IVoteManager _voteManager = default!;
[Dependency] private readonly IConfigurationManager _configurationManager = default!;
[Dependency] private readonly ChangelogManager _changelog = default!;
[ViewVariables] private CharacterSetupGui? _characterSetup;
private ClientGameTicker _gameTicker = default!;
protected override Type? LinkedScreenType { get; } = typeof(LobbyGui);
private LobbyGui? _lobby;
protected override void Startup()
@@ -48,12 +55,16 @@ namespace Content.Client.Lobby
_lobby = (LobbyGui) _userInterfaceManager.ActiveScreen;
var chatController = _userInterfaceManager.GetUIController<ChatUIController>();
_gameTicker = _entityManager.System<ClientGameTicker>();
_characterSetup = new CharacterSetupGui(_entityManager, _resourceCache, _preferencesManager,
_prototypeManager, _configurationManager);
LayoutContainer.SetAnchorPreset(_characterSetup, LayoutContainer.LayoutPreset.Wide);
_lobby.CharacterSetupState.AddChild(_characterSetup);
chatController.SetMainChat(true);
_voteManager.SetPopupContainer(_lobby.VoteContainer);
@@ -66,14 +77,16 @@ namespace Content.Client.Lobby
_characterSetup.SaveButton.OnPressed += _ =>
{
_characterSetup.Save();
_lobby.CharacterPreview.UpdateUI();
//_lobby.CharacterPreview.UpdateUI();
};
LayoutContainer.SetAnchorPreset(_lobby, LayoutContainer.LayoutPreset.Wide);
_lobby.ServerName.Text = _baseClient.GameInfo?.ServerName; //The eye of refactor gazes upon you...
UpdateLobbyUi();
_lobby.CharacterPreview.CharacterSetupButton.OnPressed += OnSetupPressed;
_lobby.CharacterSetupButton.OnPressed += OnSetupPressed;
_lobby.ReadyButton.OnPressed += OnReadyPressed;
_lobby.ReadyButton.OnToggled += OnReadyToggled;
@@ -83,20 +96,23 @@ namespace Content.Client.Lobby
_preferencesManager.OnServerDataLoaded += PreferencesDataLoaded;
_lobby.CharacterPreview.UpdateUI();
//_lobby.CharacterPreview.UpdateUI();
PopulateChangelog();
}
protected override void Shutdown()
{
var chatController = _userInterfaceManager.GetUIController<ChatUIController>();
chatController.SetMainChat(false);
_gameTicker.InfoBlobUpdated -= UpdateLobbyUi;
_gameTicker.LobbyStatusUpdated -= LobbyStatusUpdated;
_gameTicker.LobbyLateJoinStatusUpdated -= LobbyLateJoinStatusUpdated;
_voteManager.ClearPopupContainer();
_lobby!.CharacterPreview.CharacterSetupButton.OnPressed -= OnSetupPressed;
_lobby!.CharacterSetupButton.OnPressed -= OnSetupPressed;
_lobby!.ReadyButton.OnPressed -= OnReadyPressed;
_lobby!.ReadyButton.OnToggled -= OnReadyToggled;
@@ -110,7 +126,7 @@ namespace Content.Client.Lobby
private void PreferencesDataLoaded()
{
_lobby?.CharacterPreview.UpdateUI();
//_lobby?.CharacterPreview.UpdateUI();
}
private void OnSetupPressed(BaseButton.ButtonEventArgs args)
@@ -140,11 +156,12 @@ namespace Content.Client.Lobby
{
_lobby!.StartTime.Text = string.Empty;
var roundTime = _gameTiming.CurTime.Subtract(_gameTicker.RoundStartTimeSpan);
_lobby!.StationTime.Text = Loc.GetString("lobby-state-player-status-round-time", ("hours", roundTime.Hours), ("minutes", roundTime.Minutes));
_lobby!.StationTime.Text = Loc.GetString("lobby-state-player-status-round-time",
("hours", roundTime.Hours), ("minutes", roundTime.Minutes));
return;
}
_lobby!.StationTime.Text = Loc.GetString("lobby-state-player-status-round-not-started");
string text;
if (_gameTicker.Paused)
@@ -162,7 +179,9 @@ namespace Content.Client.Lobby
var seconds = difference.TotalSeconds;
if (seconds < 0)
{
text = Loc.GetString(seconds < -5 ? "lobby-state-right-now-question" : "lobby-state-right-now-confirmation");
text = Loc.GetString(seconds < -5
? "lobby-state-right-now-question"
: "lobby-state-right-now-confirmation");
}
else
{
@@ -175,7 +194,6 @@ namespace Content.Client.Lobby
private void LobbyStatusUpdated()
{
UpdateLobbyBackground();
UpdateLobbyUi();
}
@@ -188,7 +206,7 @@ namespace Content.Client.Lobby
{
if (_gameTicker.IsGameStarted)
{
_lobby!.ReadyButton.Text = Loc.GetString("lobby-state-ready-button-join-state");
MakeButtonJoinGame(_lobby!.ReadyButton);
_lobby!.ReadyButton.ToggleMode = false;
_lobby!.ReadyButton.Pressed = false;
_lobby!.ObserveButton.Disabled = false;
@@ -196,7 +214,12 @@ namespace Content.Client.Lobby
else
{
_lobby!.StartTime.Text = string.Empty;
_lobby!.ReadyButton.Text = Loc.GetString(_lobby!.ReadyButton.Pressed ? "lobby-state-player-status-ready": "lobby-state-player-status-not-ready");
if (_lobby!.ReadyButton.Pressed)
MakeButtonReady(_lobby!.ReadyButton);
else
MakeButtonUnReady(_lobby!.ReadyButton);
_lobby!.ReadyButton.ToggleMode = true;
_lobby!.ReadyButton.Disabled = false;
_lobby!.ReadyButton.Pressed = _gameTicker.AreWeReady;
@@ -208,41 +231,9 @@ namespace Content.Client.Lobby
_lobby!.ServerInfo.SetInfoBlob(_gameTicker.ServerInfoBlob);
}
if (_gameTicker.LobbySong == null)
{
_lobby!.LobbySong.SetMarkup(Loc.GetString("lobby-state-song-no-song-text"));
}
else if (_resourceCache.TryGetResource<AudioResource>(_gameTicker.LobbySong, out var lobbySongResource))
{
var lobbyStream = lobbySongResource.AudioStream;
var title = string.IsNullOrEmpty(lobbyStream.Title) ?
Loc.GetString("lobby-state-song-unknown-title") :
lobbyStream.Title;
var artist = string.IsNullOrEmpty(lobbyStream.Artist) ?
Loc.GetString("lobby-state-song-unknown-artist") :
lobbyStream.Artist;
var markup = Loc.GetString("lobby-state-song-text",
("songTitle", title),
("songArtist", artist));
_lobby!.LobbySong.SetMarkup(markup);
}
}
private void UpdateLobbyBackground()
{
if (_gameTicker.LobbyBackground != null)
{
_lobby!.Background.Texture = _resourceCache.GetResource<TextureResource>(_gameTicker.LobbyBackground );
}
else
{
_lobby!.Background.Texture = null;
}
_lobby!.LabelName.SetMarkup("[font=\"Bedstead\" size=20] Green Miracle [/font]");
_lobby!.Version.SetMarkup("Version: 1.0");
_lobby!.ChangelogLabel.SetMarkup("Список изменений:");
}
private void SetReady(bool newReady)
@@ -254,5 +245,100 @@ namespace Content.Client.Lobby
_consoleHost.ExecuteCommand($"toggleready {newReady}");
}
private void MakeButtonReady(OhioLobbyTextButton button)
{
button.ButtonText = "Ready";
}
private void MakeButtonUnReady(OhioLobbyTextButton button)
{
button.ButtonText = "Not Ready";
}
private void MakeButtonJoinGame(OhioLobbyTextButton button)
{
button.ButtonText = "Join Game";
}
private async void PopulateChangelog()
{
_lobby!.ChangelogContainer.Children.Clear();
var changelogs = await _changelog.LoadChangelog();
var whiteChangelog = changelogs.Find(cl => cl.Name == "ChangelogWhite");
if (whiteChangelog is null)
{
_lobby!.ChangelogContainer.Children.Add(
new RichTextLabel().SetMarkup("Не удалось загрузить список изменений"));
return;
}
var entries = whiteChangelog.Entries
.OrderByDescending(c => c.Time)
.Take(5);
foreach (var entry in entries)
{
var box = new BoxContainer
{
Orientation = BoxContainer.LayoutOrientation.Vertical,
HorizontalAlignment = Control.HAlignment.Left,
Children =
{
new Label
{
Align = Label.AlignMode.Left,
Text = $"{entry.Author} {entry.Time.ToShortDateString()}",
FontColorOverride = Color.FromHex("#888"),
Margin = new Thickness(0, 10)
}
}
};
foreach (var change in entry.Changes)
{
var container = new BoxContainer
{
Orientation = BoxContainer.LayoutOrientation.Horizontal,
HorizontalAlignment = Control.HAlignment.Left
};
var text = new RichTextLabel();
text.SetMessage(FormattedMessage.FromMarkup(change.Message));
text.MaxWidth = 350;
container.AddChild(GetIcon(change.Type));
container.AddChild(text);
box.AddChild(container);
}
_lobby!.ChangelogContainer.AddChild(box);
}
}
private TextureRect GetIcon(ChangelogManager.ChangelogLineType type)
{
var (file, color) = type switch
{
ChangelogManager.ChangelogLineType.Add => ("plus.svg.192dpi.png", "#6ED18D"),
ChangelogManager.ChangelogLineType.Remove => ("minus.svg.192dpi.png", "#D16E6E"),
ChangelogManager.ChangelogLineType.Fix => ("bug.svg.192dpi.png", "#D1BA6E"),
ChangelogManager.ChangelogLineType.Tweak => ("wrench.svg.192dpi.png", "#6E96D1"),
_ => throw new ArgumentOutOfRangeException(nameof(type), type, null)
};
return new TextureRect
{
Texture = _resourceCache.GetTexture(new ResPath($"/Textures/Interface/Changelog/{file}")),
VerticalAlignment = Control.VAlignment.Top,
TextureScale = new Vector2(0.5f, 0.5f),
Margin = new Thickness(2, 4, 6, 2),
ModulateSelfOverride = Color.FromHex(color)
};
}
}
}

View File

@@ -1,16 +1,13 @@
using System.Linq;
using System.Numerics;
using Content.Client.Alerts;
using Content.Client.Humanoid;
using Content.Client.Inventory;
using Content.Client.Preferences;
using Content.Client.UserInterface.Controls;
using Content.Shared.GameTicking;
using Content.Shared.Humanoid.Prototypes;
using Content.Shared.Inventory;
using Content.Shared.Preferences;
using Content.Shared.Roles;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Map;
@@ -40,12 +37,12 @@ namespace Content.Client.Lobby.UI
Text = Loc.GetString("lobby-character-preview-panel-header")
};
CharacterSetupButton = new Button
{
Text = Loc.GetString("lobby-character-preview-panel-character-setup-button"),
HorizontalAlignment = HAlignment.Center,
Margin = new Thickness(0, 5, 0, 0),
};
// CharacterSetupButton = new Button
// {
// Text = Loc.GetString("lobby-character-preview-panel-character-setup-button"),
// HorizontalAlignment = HAlignment.Center,
// Margin = new Thickness(0, 5, 0, 0),
// };
_summaryLabel = new Label
{
@@ -69,12 +66,12 @@ namespace Content.Client.Lobby.UI
Orientation = LayoutOrientation.Horizontal,
HorizontalAlignment = HAlignment.Center,
};
var _vSpacer = new VSpacer();
var vSpacer = new VSpacer();
_loaded.AddChild(_summaryLabel);
_loaded.AddChild(_viewBox);
_loaded.AddChild(_vSpacer);
_loaded.AddChild(CharacterSetupButton);
_loaded.AddChild(vSpacer);
//_loaded.AddChild(CharacterSetupButton);
vBox.AddChild(header);
vBox.AddChild(_loaded);
@@ -84,14 +81,18 @@ namespace Content.Client.Lobby.UI
UpdateUI();
}
public Button CharacterSetupButton { get; }
// public Button CharacterSetupButton { get; }
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
if (!disposing) return;
if (_previewDummy != null) _entityManager.DeleteEntity(_previewDummy.Value);
if (!disposing)
return;
if (_previewDummy != null)
_entityManager.DeleteEntity(_previewDummy.Value);
_previewDummy = default;
}
@@ -134,7 +135,7 @@ namespace Content.Client.Lobby.UI
{
var protoMan = IoCManager.Resolve<IPrototypeManager>();
var entMan = IoCManager.Resolve<IEntityManager>();
var invSystem = EntitySystem.Get<ClientInventorySystem>();
var invSystem = entMan.System<ClientInventorySystem>();
var highPriorityJob = profile.JobPriorities.FirstOrDefault(p => p.Value == JobPriority.High).Key;

View File

@@ -1,116 +1,183 @@
<lobbyUi:LobbyGui
xmlns="https://spacestation14.io"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:maths="clr-namespace:Robust.Shared.Maths;assembly=Robust.Shared.Maths"
xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
xmlns:vote="clr-namespace:Content.Client.Voting.UI"
xmlns:style="clr-namespace:Content.Client.Stylesheets"
xmlns:lobbyUi="clr-namespace:Content.Client.Lobby.UI"
xmlns:info="clr-namespace:Content.Client.Info"
xmlns:widgets="clr-namespace:Content.Client.UserInterface.Systems.Chat.Widgets">
<lobbyUi:LobbyGui xmlns="https://spacestation14.io"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:maths="clr-namespace:Robust.Shared.Maths;assembly=Robust.Shared.Maths"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
xmlns:style="clr-namespace:Content.Client.Stylesheets"
xmlns:lobbyUi="clr-namespace:Content.Client.Lobby.UI"
xmlns:info="clr-namespace:Content.Client.Info"
xmlns:widgets="clr-namespace:Content.Client.UserInterface.Systems.Chat.Widgets"
xmlns:ui="clr-namespace:Content.Client._Ohio.UI"
xmlns:buttons="clr-namespace:Content.Client._Ohio.Buttons">
<!-- Background -->
<TextureRect Access="Public" VerticalExpand="True" HorizontalExpand="True" Name="Background"
Stretch="KeepAspectCovered" />
<ui:AnimatedBackgroundControl Name="Background" VerticalExpand="True" HorizontalExpand="True"
Stretch="KeepAspectCovered" />
<!-- Main Container -->
<BoxContainer Name="MainContainer" VerticalExpand="True" HorizontalExpand="True" Orientation="Horizontal"
Margin="10 10 10 10" SeparationOverride="2">
<SplitContainer State="Auto" HorizontalExpand="True">
<!-- LHS Controls -->
<BoxContainer Name="LeftSide" Orientation="Vertical" SeparationOverride="4" HorizontalExpand="True">
<Control Name="DefaultState" VerticalExpand="True">
<BoxContainer Name="TopLeft" Orientation="Vertical">
<!-- Left Top Panel -->
<PanelContainer StyleClasses="AngleRect" HorizontalAlignment="Left" Name="LeftSideTop"
VerticalAlignment="Top">
<BoxContainer Orientation="Vertical" HorizontalAlignment="Center" MaxWidth="800">
<info:LinkBanner Name="LinkBanner" VerticalExpand="false" HorizontalAlignment="Center"
Margin="3 3 3 3" />
<controls:StripeBack>
<BoxContainer Orientation="Horizontal" SeparationOverride="6" Margin="3 3 3 3">
<cc:UICommandButton Command="observe" Name="ObserveButton" Access="Public"
Text="{Loc 'ui-lobby-observe-button'}"
StyleClasses="ButtonBig"
WindowType="{x:Type lobbyUi:ObserveWarningWindow}" />
<Label Name="StartTime"
Access="Public"
Align="Left"
FontColorOverride="{x:Static maths:Color.DarkGray}"
StyleClasses="LabelBig" HorizontalExpand="True" />
<Button Name="ReadyButton" Access="Public" ToggleMode="True"
Text="{Loc 'ui-lobby-ready-up-button'}"
StyleClasses="ButtonBig" MinWidth="137" />
</BoxContainer>
</controls:StripeBack>
</BoxContainer>
</PanelContainer>
<BoxContainer Orientation="Horizontal" HorizontalAlignment="Stretch" VerticalAlignment="Top">
<PanelContainer Name="TopRightContainer" MinHeight="350" MinWidth="469" StyleClasses="LobbyGayBackground">
<info:ServerListBox Name="ServerListBox" Access="Public" MinSize="0 30" VerticalExpand="True" HorizontalExpand="True" Margin="3 3 3 3" HorizontalAlignment="Stretch"/>
</PanelContainer>
<!-- Split Container -->
<SplitContainer State="Auto" ResizeMode="NotResizable" HorizontalExpand="True">
<!-- Left Side -->
<BoxContainer Name="LeftSide" Orientation="Vertical" SeparationOverride="4" HorizontalExpand="True">
<!-- Default State -->
<Control Name="DefaultState" VerticalExpand="True">
<!-- Character Setup State -->
<Control Access="Public" Visible="False" Name="CharacterSetupState" VerticalExpand="True" />
<!-- Top Left Panel -->
<PanelContainer Name="TopPanel" MinWidth="722" StyleClasses="LobbyGayBackground"
VerticalExpand="True" HorizontalExpand="True" HorizontalAlignment="Stretch"
VerticalAlignment="Top" Visible="False">
<BoxContainer Orientation="Vertical" HorizontalExpand="True" HorizontalAlignment="Stretch"
Margin="8 8 8 8">
<BoxContainer Orientation="Horizontal" MinSize="0 40" HorizontalAlignment="Center">
<info:LinkBanner Name="LinkBanner" VerticalExpand="True" HorizontalAlignment="Center" />
<Button Name="AHelpButton" Access="Public" Text="{Loc 'ui-lobby-ahelp-button'}"
StyleClasses="Button" />
</BoxContainer>
</BoxContainer>
</PanelContainer>
<!-- Voting Popups -->
<BoxContainer Orientation="Vertical" SeparationOverride="4" Name="VoteContainer"
Access="Public" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 8" />
</BoxContainer>
<!-- Vertical Padding-->
<!-- Vote Container -->
<BoxContainer Orientation="Vertical" SeparationOverride="4" Name="VoteContainer" Access="Public"
HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 8" />
<!-- Vertical Padding -->
<Control VerticalExpand="True" />
<!-- Left Bot Panel -->
<ui:OhioRichTextLabel Name="LabelName" Access="Public" HorizontalAlignment="Left"
VerticalAlignment="Center" Margin="0 0 0 350" />
<!-- Ohio Container -->
<PanelContainer HorizontalAlignment="Left" Name="Center" VerticalAlignment="Center">
<BoxContainer Name="OhioContainer" Orientation="Vertical" HorizontalAlignment="Center"
VerticalAlignment="Center" Margin="40 0 0 150">
<buttons:OhioLobbyTextButton
Name="ReadyButton"
Access="Public"
ToggleMode="True"
ButtonText="Ready"
Margin="0 0 0 10" />
<buttons:OhioUICommandButton
Name="ObserveButton"
WindowType="{x:Type lobbyUi:ObserveWarningWindow}"
Access="Public"
ButtonText="Observe"
Margin="0 10 0 10" />
<buttons:OhioLobbyTextButton
Name="CharacterSetupButton"
Access="Public"
ButtonText="Character Setup"
Margin="0 10 0 10" />
<buttons:OhioLobbyTextButton
Name="OptionsButton"
Access="Public"
ButtonText="Options"
Margin="0 10 0 0" />
</BoxContainer>
</PanelContainer>
<BoxContainer Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Bottom">
<info:DevInfoBanner Name="DevInfoBanner" VerticalExpand="false" Margin="3 3 3 3" />
<PanelContainer StyleClasses="AngleRect">
<RichTextLabel Name="LobbySong" Access="Public" HorizontalAlignment="Center" />
<PanelContainer StyleClasses="LobbyGayBackground">
<RichTextLabel Name="Version" Access="Public" HorizontalAlignment="Center" />
</PanelContainer>
</BoxContainer>
<!-- Changelog -->
<PanelContainer Name="Changelog" StyleClasses="LobbyGayBackground" HorizontalAlignment="Right"
VerticalAlignment="Top">
<BoxContainer Orientation="Vertical">
<RichTextLabel Name="ChangelogLabel" Access="Public" HorizontalAlignment="Center" />
<!-- Auto populated via code -->
<BoxContainer Name="ChangelogContainer" Access="Public" Orientation="Vertical"
StyleClasses="LobbyGayBackground" />
</BoxContainer>
</PanelContainer>
</Control>
<!-- Character setup state -->
<!-- This is injected on startup. Funky! -->
<Control Access="Public" Visible="False" Name="CharacterSetupState" VerticalExpand="True" />
</BoxContainer>
<!-- Right Panel -->
<PanelContainer Name="RightSide" StyleClasses="AngleRect" HorizontalAlignment="Right" VerticalExpand="True"
VerticalAlignment="Stretch">
<PanelContainer Name="RightSide" StyleClasses="LobbyGayBackground" HorizontalAlignment="Right"
VerticalExpand="True" VerticalAlignment="Stretch">
<BoxContainer Orientation="Vertical" HorizontalExpand="True">
<!-- Top row -->
<!-- Header -->
<BoxContainer Orientation="Horizontal" MinSize="0 40" Name="HeaderContainer" Access="Public"
SeparationOverride="4">
<Label Margin="8 0 0 0" StyleClasses="LabelHeadingBigger" VAlign="Center"
Text="{Loc 'ui-lobby-title'}" />
<Label Name="ServerName" Access="Public" StyleClasses="LabelHeadingBigger" VAlign="Center"
HorizontalExpand="True" HorizontalAlignment="Center" />
</BoxContainer>
<!-- Gold line -->
<!-- Gold Line -->
<controls:HLine Color="{x:Static style:StyleNano.NanoGold}" Thickness="2" />
<controls:HSpacer Spacing="10" />
<!-- Voting & misc button bar -->
<BoxContainer Orientation="Horizontal" MinSize="0 40" HorizontalAlignment="Right">
<Button Name="AHelpButton" Access="Public" Text="{Loc 'ui-lobby-ahelp-button'}"
StyleClasses="ButtonBig" />
<vote:VoteCallMenuButton Name="CallVoteButton" StyleClasses="ButtonBig" />
<Button Name="OptionsButton" Access="Public" StyleClasses="ButtonBig"
Text="{Loc 'ui-lobby-options-button'}" />
<Button Name="LeaveButton" Access="Public" StyleClasses="ButtonBig"
Text="{Loc 'ui-lobby-leave-button'}" />
</BoxContainer>
<controls:HSpacer Spacing="10" />
<!-- Server info -->
<!-- Server Info -->
<controls:NanoHeading Text="{Loc 'ui-lobby-server-info-block'}" />
<info:ServerInfo Name="ServerInfo" Access="Public" MinSize="0 30" VerticalExpand="false"
Margin="3 3 3 3" MaxWidth="400" HorizontalAlignment="Left" />
<Label Name="StationTime" Access="Public" FontColorOverride="{x:Static maths:Color.LightGray}"
Margin="3 3 3 3" HorizontalAlignment="Left" />
<info:ServerInfo Name="ServerInfo" Access="Public" MinSize="0 100" VerticalExpand="false"
Margin="3" MaxWidth="400" HorizontalAlignment="Left" />
<Label Name="StationTime" Access="Public"
FontColorOverride="{x:Static maths:Color.MediumVioletRed}" Margin="3"
HorizontalAlignment="Left" />
<Label Name="StartTime" Access="Public" FontColorOverride="{x:Static maths:Color.MediumVioletRed}"
Margin="3" StyleClasses="Label" HorizontalExpand="True" />
<controls:HSpacer Spacing="5" />
<lobbyUi:LobbyCharacterPreviewPanel Name="CharacterPreview" Access="Public" />
<!--
<lobbyUi:LobbyCharacterPreviewPanel Name="CharacterPreview" Access="Public"/>
-->
<controls:HSpacer Spacing="5" />
<BoxContainer MinHeight="10" />
<!-- Gold line -->
<!-- Gold Line -->
<controls:HLine Color="{x:Static style:StyleNano.NanoGold}" Thickness="2" Access="Public" />
<controls:HSpacer Spacing="10" />
<widgets:ChatBox Name="Chat" Access="Public" VerticalExpand="True" Margin="3 3 3 3" MinHeight="50" />
<widgets:ChatBox Name="Chat" Access="Public" VerticalExpand="True" Margin="3" MinHeight="50" />
</BoxContainer>
</PanelContainer>
</SplitContainer>
</BoxContainer>
</lobbyUi:LobbyGui>

View File

@@ -1,29 +1,13 @@
using Content.Client.Chat.UI;
using Content.Client.Info;
using Content.Client.Preferences;
using Content.Client.Preferences.UI;
using Content.Client.UserInterface.Screens;
using Content.Client.UserInterface.Systems.Chat.Widgets;
using Content.Client.UserInterface.Systems.EscapeMenu;
using Robust.Client.AutoGenerated;
using Robust.Client.Console;
using Robust.Client.Graphics;
using Robust.Client.State;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Maths;
using Robust.Shared.Prototypes;
using static Robust.Client.UserInterface.Controls.BoxContainer;
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()
@@ -33,32 +17,28 @@ namespace Content.Client.Lobby.UI
SetAnchorPreset(MainContainer, LayoutPreset.Wide);
SetAnchorPreset(Background, LayoutPreset.Wide);
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;
CharacterSetupState.Visible = false;
Center.Visible = true;
RightSide.Visible = true;
Version.Visible = true;
LabelName.Visible = true;
Changelog.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;
}
Center.Visible = false;
RightSide.Visible = false;
Version.Visible = false;
LabelName.Visible = false;
Changelog.Visible = false;
break;
}
}

View File

@@ -15,7 +15,7 @@ public sealed class HTNOverlay : Overlay
public HTNOverlay(IEntityManager entManager, IResourceCache resourceCache)
{
_entManager = entManager;
_font = new VectorFont(resourceCache.GetResource<FontResource>("/Fonts/NotoSans/NotoSans-Regular.ttf"), 10);
_font = new VectorFont(resourceCache.GetResource<FontResource>("/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf"), 10);
}
protected override void Draw(in OverlayDrawArgs args)

View File

@@ -47,7 +47,7 @@ namespace Content.Client.NodeContainer
_inputManager = inputManager;
_entityManager = entityManager;
_font = cache.GetFont("/Fonts/NotoSans/NotoSans-Regular.ttf", 12);
_font = cache.GetFont("/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf", 12);
}
protected override void Draw(in OverlayDrawArgs args)

View File

@@ -25,7 +25,7 @@ public sealed partial class PdaNavigationButton : ContainerButton
};
public string InactiveBgColor { get; set; } = "#202023";
public string ActiveBgColor { get; set; } = "#25252a";
public string ActiveBgColor { get; set; } = "#141414";
public string InactiveFgColor { get; set; } = "#5a5a5a";
public string ActiveFgColor { get; set; } = "#FFFFFF";

View File

@@ -14,7 +14,7 @@ public sealed partial class PdaProgramItem : ContainerButton
private readonly StyleBoxFlat _styleBox = new()
{
BackgroundColor = Color.FromHex("#25252a"),
BackgroundColor = Color.FromHex("#141414")
};
public Color BackgroundColor

View File

@@ -18,7 +18,7 @@ public sealed partial class PdaSettingsButton : ContainerButton
private readonly StyleBoxFlat _styleBox = new()
{
BackgroundColor = Color.FromHex("#25252a")
BackgroundColor = Color.FromHex("#141414")
};
public string? Text

View File

@@ -86,7 +86,7 @@ namespace Content.Client.ParticleAccelerator.UI
var back = new StyleBoxTexture
{
Texture = panelTex,
Modulate = Color.FromHex("#25252A"),
Modulate = Color.FromHex("#141414"),
};
back.SetPatchMargin(StyleBox.Margin.All, 10);

View File

@@ -47,9 +47,9 @@ public sealed class PopupOverlay : Overlay
_popup = popup;
_shader = protoManager.Index<ShaderPrototype>("unshaded").Instance();
_smallFont = new VectorFont(cache.GetResource<FontResource>("/Fonts/NotoSans/NotoSans-Italic.ttf"), 10);
_mediumFont = new VectorFont(cache.GetResource<FontResource>("/Fonts/NotoSans/NotoSans-Italic.ttf"), 12);
_largeFont = new VectorFont(cache.GetResource<FontResource>("/Fonts/NotoSans/NotoSans-BoldItalic.ttf"), 14);
_smallFont = new VectorFont(cache.GetResource<FontResource>("/Fonts/IBMPlexMono/IBMPlexMono-Italic.ttf"), 10);
_mediumFont = new VectorFont(cache.GetResource<FontResource>("/Fonts/IBMPlexMono/IBMPlexMono-Italic.ttf"), 12);
_largeFont = new VectorFont(cache.GetResource<FontResource>("/Fonts/IBMPlexMono/IBMPlexMono-BoldItalic.ttf"), 14);
}
protected override void Draw(in OverlayDrawArgs args)

View File

@@ -57,7 +57,7 @@ namespace Content.Client.Preferences.UI
var back = new StyleBoxTexture
{
Texture = panelTex,
Modulate = new Color(37, 42, 37)
Modulate = new Color(15, 15, 15)
};
back.SetPatchMargin(StyleBox.Margin.All, 10);

View File

@@ -46,7 +46,7 @@ namespace Content.Client.Preferences.UI
{
PanelOverride = new StyleBoxFlat()
{
BackgroundColor = new Color(35, 48, 35),
BackgroundColor = new Color(25, 25, 25),
ContentMarginTopOverride = 10,
ContentMarginBottomOverride = 10,
ContentMarginLeftOverride = 10,
@@ -599,7 +599,7 @@ namespace Content.Client.Preferences.UI
category.AddChild(new PanelContainer
{
PanelOverride = new StyleBoxFlat {BackgroundColor = Color.FromHex("#464966")},
PanelOverride = new StyleBoxFlat {BackgroundColor = Color.FromHex("#232323")},
Children =
{
new Label

View File

@@ -24,7 +24,7 @@ public sealed class RadiationDebugOverlay : Overlay
_radiation = _entityManager.System<RadiationSystem>();
var cache = IoCManager.Resolve<IResourceCache>();
_font = new VectorFont(cache.GetResource<FontResource>("/Fonts/NotoSans/NotoSans-Regular.ttf"), 8);
_font = new VectorFont(cache.GetResource<FontResource>("/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf"), 8);
}
protected override void Draw(in OverlayDrawArgs args)

View File

@@ -43,11 +43,20 @@ namespace Content.Client.Stylesheets
protected StyleBase(IResourceCache resCache)
{
var wariowareinc = resCache.GetFont
(
new []
{
"/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf"
},
12
);
var notoSans12 = resCache.GetFont
(
new []
{
"/Fonts/IBMPlexSans/IBMPlexSans-Regular.ttf",
"/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf",
"/Fonts/NotoSans/NotoSansSymbols-Regular.ttf",
"/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf"
},
@@ -57,7 +66,7 @@ namespace Content.Client.Stylesheets
(
new []
{
"/Fonts/IBMPlexSans/IBMPlexSans-Italic.ttf",
"/Fonts/IBMPlexMono/IBMPlexMono-Italic.ttf",
"/Fonts/NotoSans/NotoSansSymbols-Regular.ttf",
"/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf"
},
@@ -124,7 +133,7 @@ namespace Content.Client.Stylesheets
var vScrollBarGrabberNormal = new StyleBoxFlat
{
BackgroundColor = Color.DarkKhaki.WithAlpha(0.35f), ContentMarginLeftOverride = DefaultGrabberSize,
BackgroundColor = Color.Gray.WithAlpha(0.35f), ContentMarginLeftOverride = DefaultGrabberSize,
ContentMarginTopOverride = DefaultGrabberSize
};
var vScrollBarGrabberHover = new StyleBoxFlat
@@ -140,7 +149,7 @@ namespace Content.Client.Stylesheets
var hScrollBarGrabberNormal = new StyleBoxFlat
{
BackgroundColor = Color.DarkKhaki.WithAlpha(0.35f), ContentMarginTopOverride = DefaultGrabberSize
BackgroundColor = Color.Gray.WithAlpha(0.35f), ContentMarginTopOverride = DefaultGrabberSize
};
var hScrollBarGrabberHover = new StyleBoxFlat
{
@@ -159,7 +168,7 @@ namespace Content.Client.Stylesheets
new SelectorElement(null, null, null, null),
new[]
{
new StyleProperty("font", notoSans12),
new StyleProperty("font", wariowareinc),
}),
// Default font.
@@ -167,7 +176,7 @@ namespace Content.Client.Stylesheets
new SelectorElement(null, new[] {StyleClassItalic}, null, null),
new[]
{
new StyleProperty("font", notoSans12Italic),
new StyleProperty("font", wariowareinc),
}),
// Window close button base texture.
@@ -177,7 +186,7 @@ namespace Content.Client.Stylesheets
new[]
{
new StyleProperty(TextureButton.StylePropertyTexture, textureCloseButton),
new StyleProperty(Control.StylePropertyModulateSelf, Color.FromHex("#4B596A")),
new StyleProperty(Control.StylePropertyModulateSelf, Color.FromHex("#1e1e1e")),
}),
// Window close button hover.
new StyleRule(
@@ -185,7 +194,7 @@ namespace Content.Client.Stylesheets
new[] {TextureButton.StylePseudoClassHover}),
new[]
{
new StyleProperty(Control.StylePropertyModulateSelf, Color.FromHex("#7F3636")),
new StyleProperty(Control.StylePropertyModulateSelf, Color.FromHex("#960000")),
}),
// Window close button pressed.
new StyleRule(
@@ -193,7 +202,7 @@ namespace Content.Client.Stylesheets
new[] {TextureButton.StylePseudoClassPressed}),
new[]
{
new StyleProperty(Control.StylePropertyModulateSelf, Color.FromHex("#753131")),
new StyleProperty(Control.StylePropertyModulateSelf, Color.FromHex("#141414")),
}),
// Scroll bars

View File

@@ -29,7 +29,7 @@ namespace Content.Client.Stylesheets
// Ew, but ok
new[]
{
$"/Fonts/IBMPlexSans/IBMPlexSans-{variation}.ttf",
$"/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf",
$"/Fonts/NotoSans/NotoSansSymbols-{sv}.ttf",
"/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf",
},
@@ -66,6 +66,7 @@ namespace Content.Client.Stylesheets
public const string StyleClassStorageButton = "storageButton";
public const string StyleClassFuckyWuckyBackground = "FuckyWuckyBackground";
public const string StyleClassGayShitBackground = "GayShitBackground";
public const string StyleClassLobbyGayBackground = "LobbyGayBackground";
public const string StyleClassSliderRed = "Red";
public const string StyleClassSliderGreen = "Green";
@@ -85,28 +86,28 @@ namespace Content.Client.Stylesheets
public const string StyleClassPopupMessageLarge = "PopupMessageLarge";
public const string StyleClassPopupMessageLargeCaution = "PopupMessageLargeCaution";
public static readonly Color PanelDark = Color.FromHex("#1E1E22");
public static readonly Color PanelDark = Color.FromHex("#0a0a0a");
public static readonly Color NanoGold = Color.FromHex("#A2B1A8");
public static readonly Color GoodGreenFore = Color.FromHex("#4D5B5C");
public static readonly Color ConcerningOrangeFore = Color.FromHex("#5C5A4D");
public static readonly Color DangerousRedFore = Color.FromHex("#5C4D5B");
public static readonly Color DisabledFore = Color.FromHex("#262E29");
public static readonly Color NanoGold = Color.FromHex("#76428a");
public static readonly Color GoodGreenFore = Color.FromHex("#006400");
public static readonly Color ConcerningOrangeFore = Color.FromHex("#99461d");
public static readonly Color DangerousRedFore = Color.FromHex("#1e1e1e");
public static readonly Color DisabledFore = Color.FromHex("#5A5A5A");
public static readonly Color ButtonColorDefault = Color.FromHex("#4D5D53");
public static readonly Color ButtonColorDefaultRed = Color.FromHex("#992723");
public static readonly Color ButtonColorHovered = Color.FromHex("#58695E");
public static readonly Color ButtonColorHoveredRed = Color.FromHex("#4D5D53");
public static readonly Color ButtonColorPressed = Color.FromHex("#000000");
public static readonly Color ButtonColorDisabled = Color.FromHex("#000000");
public static readonly Color ButtonColorDefault = Color.FromHex("#232323");
public static readonly Color ButtonColorDefaultRed = Color.FromHex("#640000");
public static readonly Color ButtonColorHovered = Color.FromHex("#2d2d2d");
public static readonly Color ButtonColorHoveredRed = Color.FromHex("#960000");
public static readonly Color ButtonColorPressed = Color.FromHex("#0f0f0f");
public static readonly Color ButtonColorDisabled = Color.FromHex("#0f0f0f");
public static readonly Color ButtonColorCautionDefault = Color.FromHex("#ab3232");
public static readonly Color ButtonColorCautionHovered = Color.FromHex("#cf2f2f");
public static readonly Color ButtonColorCautionPressed = Color.FromHex("#3e6c45");
public static readonly Color ButtonColorCautionDisabled = Color.FromHex("#602a2a");
public static readonly Color ButtonColorCautionDefault = Color.FromHex("#99461d");
public static readonly Color ButtonColorCautionHovered = Color.FromHex("#cc5b27");
public static readonly Color ButtonColorCautionPressed = Color.FromHex("#662e13");
public static readonly Color ButtonColorCautionDisabled = Color.FromHex("#33170a");
public static readonly Color ButtonColorGoodDefault = Color.FromHex("#3E6C45");
public static readonly Color ButtonColorGoodHovered = Color.FromHex("#31843E");
public static readonly Color ButtonColorGoodDefault = Color.FromHex("#006400");
public static readonly Color ButtonColorGoodHovered = Color.FromHex("#009600");
public static readonly Color ButtonColorPurpleDefault = Color.FromHex("#4a2eab");
public static readonly Color ButtonColorPurpleHovered = Color.FromHex("#654cbf");
@@ -129,10 +130,10 @@ namespace Content.Client.Stylesheets
public static readonly Color ExamineButtonColorContextDisabled = Color.FromHex("#262E29");
// UI Panel colors
public static readonly Color PanelColorDark = Color.FromHex("#1B211D");
public static readonly Color PanelColorDark = Color.FromHex("#0f0f0f");
// Fancy Tree elements
public static readonly Color FancyTreeEvenRowColor = Color.FromHex("#313B35");
public static readonly Color FancyTreeEvenRowColor = Color.FromHex("#141414");
public static readonly Color FancyTreeOddRowColor = FancyTreeEvenRowColor * new Color(0.8f, 0.9f, 0.8f);
public static readonly Color FancyTreeSelectedRowColor = new Color(55, 80, 68);
@@ -226,6 +227,17 @@ namespace Content.Client.Stylesheets
gayShitBackground.SetPatchMargin(StyleBox.Margin.All, 2);
gayShitBackground.SetExpandMargin(StyleBox.Margin.All, -2);
var lobbyGayBackgroundTex = resCache.GetTexture("/Textures/Interface/Nano/lobby_gay.png");
var lobbyGayBackground = new StyleBoxTexture
{
Texture = lobbyGayBackgroundTex,
Mode = StyleBoxTexture.StretchMode.Tile
};
lobbyGayBackground.SetPatchMargin(StyleBox.Margin.All, 24);
lobbyGayBackground.SetExpandMargin(StyleBox.Margin.All, -4);
lobbyGayBackground.SetContentMarginOverride(StyleBox.Margin.All, 8);
var contextMenuBackground = new StyleBoxTexture
{
Texture = borderedWindowBackgroundTex,
@@ -438,13 +450,13 @@ namespace Content.Client.Stylesheets
placeholder.SetExpandMargin(StyleBox.Margin.All, -5);
placeholder.Mode = StyleBoxTexture.StretchMode.Tile;
var itemListBackgroundSelected = new StyleBoxFlat {BackgroundColor = new Color(75, 90, 75)};
var itemListBackgroundSelected = new StyleBoxFlat {BackgroundColor = new Color(25, 25, 25)};
itemListBackgroundSelected.SetContentMarginOverride(StyleBox.Margin.Vertical, 2);
itemListBackgroundSelected.SetContentMarginOverride(StyleBox.Margin.Horizontal, 4);
var itemListItemBackgroundDisabled = new StyleBoxFlat {BackgroundColor = new Color(10, 20, 10)};
var itemListItemBackgroundDisabled = new StyleBoxFlat {BackgroundColor = new Color(10, 10, 10)};
itemListItemBackgroundDisabled.SetContentMarginOverride(StyleBox.Margin.Vertical, 2);
itemListItemBackgroundDisabled.SetContentMarginOverride(StyleBox.Margin.Horizontal, 4);
var itemListItemBackground = new StyleBoxFlat {BackgroundColor = new Color(55, 70, 55)};
var itemListItemBackground = new StyleBoxFlat {BackgroundColor = new Color(15, 15, 15)};
itemListItemBackground.SetContentMarginOverride(StyleBox.Margin.Vertical, 2);
itemListItemBackground.SetContentMarginOverride(StyleBox.Margin.Horizontal, 4);
var itemListItemBackgroundTransparent = new StyleBoxFlat {BackgroundColor = Color.Transparent};
@@ -488,7 +500,7 @@ namespace Content.Client.Stylesheets
var sliderFillBox = new StyleBoxTexture
{
Texture = sliderFillTex,
Modulate = Color.FromHex("#313B35")
Modulate = Color.FromHex("#141414")
};
var sliderBackBox = new StyleBoxTexture
@@ -500,12 +512,12 @@ namespace Content.Client.Stylesheets
var sliderForeBox = new StyleBoxTexture
{
Texture = sliderOutlineTex,
Modulate = Color.FromHex("#47554C")
Modulate = Color.FromHex("#1e1e1e")
};
var sliderGrabBox = new StyleBoxTexture
{
Texture = sliderGrabTex,
Texture = sliderGrabTex
};
sliderFillBox.SetPatchMargin(StyleBox.Margin.All, 12);
@@ -523,7 +535,7 @@ namespace Content.Client.Stylesheets
var insetBack = new StyleBoxTexture
{
Texture = buttonTex,
Modulate = Color.FromHex("#212723"),
Modulate = Color.FromHex("#202020"),
};
insetBack.SetPatchMargin(StyleBox.Margin.All, 10);
@@ -699,6 +711,13 @@ namespace Content.Client.Stylesheets
new StyleProperty("font-color", Color.FromHex("#3C484181")),
}),
new StyleRule(
new SelectorElement(null, new[] {StyleClassLobbyGayBackground}, null, null),
new[]
{
new StyleProperty(PanelContainer.StylePropertyPanel, lobbyGayBackground),
}),
// Context Menu window
Element<PanelContainer>().Class(ContextMenuPopup.StyleClassContextMenuPopup)
.Prop(PanelContainer.StylePropertyPanel, contextMenuBackground),
@@ -817,19 +836,19 @@ namespace Content.Client.Stylesheets
Element<ContainerButton>().Class(ListContainer.StyleClassListContainerButton)
.Pseudo(ContainerButton.StylePseudoClassNormal)
.Prop(Control.StylePropertyModulateSelf, new Color(55, 80, 68)),
.Prop(Control.StylePropertyModulateSelf, new Color(25, 25, 25)),
Element<ContainerButton>().Class(ListContainer.StyleClassListContainerButton)
.Pseudo(ContainerButton.StylePseudoClassHover)
.Prop(Control.StylePropertyModulateSelf, new Color(75, 90, 86)),
.Prop(Control.StylePropertyModulateSelf, new Color(30, 30, 30)),
Element<ContainerButton>().Class(ListContainer.StyleClassListContainerButton)
.Pseudo(ContainerButton.StylePseudoClassPressed)
.Prop(Control.StylePropertyModulateSelf, new Color(75, 90, 86)),
.Prop(Control.StylePropertyModulateSelf, new Color(30, 30, 30)),
Element<ContainerButton>().Class(ListContainer.StyleClassListContainerButton)
.Pseudo(ContainerButton.StylePseudoClassDisabled)
.Prop(Control.StylePropertyModulateSelf, new Color(10, 20, 12)),
.Prop(Control.StylePropertyModulateSelf, new Color(5, 5, 5)),
// Main menu: Make those buttons bigger.
new StyleRule(new SelectorChild(
@@ -1022,7 +1041,7 @@ namespace Content.Client.Stylesheets
new StyleRule(new SelectorElement(typeof(ItemList), null, null, null), new[]
{
new StyleProperty(ItemList.StylePropertyBackground,
new StyleBoxFlat {BackgroundColor = new Color(32, 40, 32)}),
new StyleBoxFlat {BackgroundColor = new Color(10, 10, 10)}),
new StyleProperty(ItemList.StylePropertyItemBackground,
itemListItemBackground),
new StyleProperty(ItemList.StylePropertyDisabledItemBackground,
@@ -1047,10 +1066,10 @@ namespace Content.Client.Stylesheets
new StyleRule(new SelectorElement(typeof(Tree), null, null, null), new[]
{
new StyleProperty(Tree.StylePropertyBackground,
new StyleBoxFlat {BackgroundColor = new Color(32, 40, 32)}),
new StyleBoxFlat {BackgroundColor = new Color(10, 10, 10)}),
new StyleProperty(Tree.StylePropertyItemBoxSelected, new StyleBoxFlat
{
BackgroundColor = new Color(55, 75, 68),
BackgroundColor = new Color(15, 15, 15),
ContentMarginLeftOverride = 4
})
}),
@@ -1338,7 +1357,7 @@ namespace Content.Client.Stylesheets
Element<PanelContainer>().Class(ClassAngleRect)
.Prop(PanelContainer.StylePropertyPanel, BaseAngleRect)
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#253025")),
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#141414")),
Element<PanelContainer>().Class(ClassLowDivider)
.Prop(PanelContainer.StylePropertyPanel, new StyleBoxFlat
@@ -1388,7 +1407,7 @@ namespace Content.Client.Stylesheets
.Prop(Control.StylePropertyModulateSelf, DangerousRedFore),
Element<TextureButton>().Class("CrossButtonRed").Pseudo(TextureButton.StylePseudoClassHover)
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#5C4D51")),
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#171717")),
Element<TextureButton>().Class("CrossButtonRed").Pseudo(TextureButton.StylePseudoClassHover)
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#5C4D51")),
@@ -1459,7 +1478,7 @@ namespace Content.Client.Stylesheets
//PDA - Backgrounds
Element<PanelContainer>().Class("PdaContentBackground")
.Prop(PanelContainer.StylePropertyPanel, BaseButtonOpenBoth)
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#262E29")),
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#141414")),
Element<PanelContainer>().Class("PdaBackground")
.Prop(PanelContainer.StylePropertyPanel, BaseButtonOpenBoth)
@@ -1473,7 +1492,7 @@ namespace Content.Client.Stylesheets
.Prop(PanelContainer.StylePropertyPanel, AngleBorderRect),
Element<PanelContainer>().Class("BackgroundDark")
.Prop(PanelContainer.StylePropertyPanel, new StyleBoxFlat(Color.FromHex("#262E29"))),
.Prop(PanelContainer.StylePropertyPanel, new StyleBoxFlat(Color.FromHex("#141414"))),
//PDA - Buttons
Element<PdaSettingsButton>().Pseudo(ContainerButton.StylePseudoClassNormal)

View File

@@ -10,27 +10,36 @@ namespace Content.Client.Stylesheets
{
public sealed class StyleSpace : StyleBase
{
public static readonly Color SpaceRed = Color.FromHex("#9b2236");
public static readonly Color SpaceRed = Color.FromHex("#960000");
public static readonly Color ButtonColorDefault = Color.FromHex("#464966");
public static readonly Color ButtonColorHovered = Color.FromHex("#575b7f");
public static readonly Color ButtonColorPressed = Color.FromHex("#3e6c45");
public static readonly Color ButtonColorDisabled = Color.FromHex("#30313c");
public static readonly Color ButtonColorDefault = Color.FromHex("#232323");
public static readonly Color ButtonColorHovered = Color.FromHex("#2d2d2d");
public static readonly Color ButtonColorPressed = Color.FromHex("#0f0f0f");
public static readonly Color ButtonColorDisabled = Color.FromHex("#0f0f0f");
public static readonly Color ButtonColorCautionDefault = Color.FromHex("#ab3232");
public static readonly Color ButtonColorCautionHovered = Color.FromHex("#cf2f2f");
public static readonly Color ButtonColorCautionPressed = Color.FromHex("#3e6c45");
public static readonly Color ButtonColorCautionDisabled = Color.FromHex("#602a2a");
public static readonly Color ButtonColorCautionDefault = Color.FromHex("#640000");
public static readonly Color ButtonColorCautionHovered = Color.FromHex("#960000");
public static readonly Color ButtonColorCautionPressed = Color.FromHex("#0f0f0f");
public static readonly Color ButtonColorCautionDisabled = Color.FromHex("#0f0f0f");
public override Stylesheet Stylesheet { get; }
public StyleSpace(IResourceCache resCache) : base(resCache)
{
var whiteRabbit = resCache.GetFont
(
new []
{
"/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf"
},
10
);
var notoSans10 = resCache.GetFont
(
new []
{
"/Fonts/NotoSans/NotoSans-Regular.ttf",
"/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf",
"/Fonts/NotoSans/NotoSansSymbols-Regular.ttf",
"/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf"
},
@@ -40,7 +49,7 @@ namespace Content.Client.Stylesheets
(
new []
{
"/Fonts/NotoSans/NotoSans-Bold.ttf",
"/Fonts/IBMPlexMono/IBMPlexMono-Bold.ttf",
"/Fonts/NotoSans/NotoSansSymbols-Regular.ttf",
"/Fonts/NotoSans/NotoSansSymbols2-Regular.ttf"
},
@@ -72,11 +81,11 @@ namespace Content.Client.Stylesheets
Stylesheet = new Stylesheet(BaseRules.Concat(new StyleRule[]
{
Element<Label>().Class(StyleClassLabelHeading)
.Prop(Label.StylePropertyFont, notoSansBold16)
.Prop(Label.StylePropertyFont, whiteRabbit)
.Prop(Label.StylePropertyFontColor, SpaceRed),
Element<Label>().Class(StyleClassLabelSubText)
.Prop(Label.StylePropertyFont, notoSans10)
.Prop(Label.StylePropertyFont, whiteRabbit)
.Prop(Label.StylePropertyFontColor, Color.DarkGray),
Element<PanelContainer>().Class(ClassHighDivider)
@@ -153,7 +162,7 @@ namespace Content.Client.Stylesheets
Element<PanelContainer>().Class(ClassAngleRect)
.Prop(PanelContainer.StylePropertyPanel, BaseAngleRect)
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#202030")),
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#191919")),
Child()
.Parent(Element<Button>().Class(ContainerButton.StylePseudoClassDisabled))

View File

@@ -15,11 +15,11 @@ public sealed class MenuButton : ContainerButton
public const string StyleClassLabelTopButton = "topButtonLabel";
public const string StyleClassRedTopButton = "topButtonLabel";
private static readonly Color ColorNormal = Color.FromHex("#879B8F");
private static readonly Color ColorRedNormal = Color.FromHex("#aC4D5B");
private static readonly Color ColorHovered = Color.FromHex("#ffffff");
private static readonly Color ColorRedHovered = Color.FromHex("#FFFFFF");
private static readonly Color ColorPressed = Color.FromHex("#789B8C");
private static readonly Color ColorNormal = Color.FromHex("#5a5a5a");
private static readonly Color ColorRedNormal = Color.FromHex("#640000");
private static readonly Color ColorHovered = Color.FromHex("#646464");
private static readonly Color ColorRedHovered = Color.FromHex("#960000");
private static readonly Color ColorPressed = Color.FromHex("#464646");
private const float VertPad = 8f;
private Color NormalColor => HasStyleClass(StyleClassRedTopButton) ? ColorRedNormal : ColorNormal;

View File

@@ -41,7 +41,7 @@ namespace Content.Client.UserInterface.Systems.Atmos.GasTank
var back = new StyleBoxTexture
{
Texture = panelTex,
Modulate = Color.FromHex("#25252A"),
Modulate = Color.FromHex("#141414"),
};
back.SetPatchMargin(StyleBox.Margin.All, 10);

View File

@@ -7,9 +7,9 @@ namespace Content.Client.UserInterface.Systems.Chat.Controls;
public sealed class ChannelFilterButton : ChatPopupButton<ChannelFilterPopup>
{
private static readonly Color ColorNormal = Color.FromHex("#7b7e9e");
private static readonly Color ColorHovered = Color.FromHex("#9699bb");
private static readonly Color ColorPressed = Color.FromHex("#789B8C");
private static readonly Color ColorNormal = Color.FromHex("#5a5a5a");
private static readonly Color ColorHovered = Color.FromHex("#646464");
private static readonly Color ColorPressed = Color.FromHex("#464646");
private readonly TextureRect? _textureRect;
private readonly ChatUIController _chatUIController;

View File

@@ -9,7 +9,7 @@
MinSize="465 225">
<PanelContainer HorizontalExpand="True" VerticalExpand="True">
<PanelContainer.PanelOverride>
<graphics:StyleBoxFlat BackgroundColor="#25252ADD" />
<graphics:StyleBoxFlat BackgroundColor="#141414AA" />
</PanelContainer.PanelOverride>
<BoxContainer Orientation="Vertical" SeparationOverride="4" HorizontalExpand="True" VerticalExpand="True">

View File

@@ -49,7 +49,7 @@ namespace Content.Client.Wires.UI
var back = new StyleBoxTexture
{
Texture = panelTex,
Modulate = Color.FromHex("#25252A"),
Modulate = Color.FromHex("#141414")
};
back.SetPatchMargin(StyleBox.Margin.All, 10);

View File

@@ -0,0 +1,34 @@
using Robust.Client.Console;
namespace Content.Client._Ohio.Buttons;
[Virtual]
public class OhioCommandButton : OhioLobbyTextButton
{
public string? Command { get; set; }
public OhioCommandButton()
{
OnPressed += Execute;
}
private bool CanPress()
{
return string.IsNullOrEmpty(Command) ||
IoCManager.Resolve<IClientConGroupController>().CanCommand(Command.Split(' ')[0]);
}
protected override void EnteredTree()
{
if (!CanPress())
{
Visible = false;
}
}
protected virtual void Execute(ButtonEventArgs obj)
{
if (!string.IsNullOrEmpty(Command))
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand(Command);
}
}

View File

@@ -0,0 +1,211 @@
using System.Numerics;
using Robust.Client.Graphics;
using Robust.Client.UserInterface.Controls;
namespace Content.Client._Ohio.Buttons;
[Virtual]
public class OhioLobbyButton : BaseButton
{
private Vector2 _scale = new(1, 1);
private Texture? _texture;
private Texture? _textureDefault;
private Texture? _textureHighLighted;
private Texture? _texturePressed;
private Texture? _textureDisabled;
private string? _texturePath;
private string? _textureHighLightedPath;
private string? _texturePressedPath;
private string? _textureDisabledPath;
private Texture? _arrowTexture;
private string? _arrowTexturePath = "/Textures/Ohio/Lobby/arrow.png";
public OhioLobbyButton()
{
_arrowTexture = Theme.ResolveTexture(_arrowTexturePath);
DrawModeChanged();
}
// Textures GET-SET Start
[ViewVariables]
private Texture? TextureNormal
{
get => _texture;
set
{
_texture = value;
InvalidateMeasure();
}
}
[ViewVariables]
public Texture? TextureDefault
{
get => _textureDefault;
set
{
_textureDefault = value;
InvalidateMeasure();
}
}
[ViewVariables]
public Texture? TextureHighLighted
{
get => _textureHighLighted;
set
{
_textureHighLighted = value;
InvalidateMeasure();
}
}
[ViewVariables]
public Texture? TexturePressed
{
get => _texturePressed;
set
{
_texturePressed = value;
InvalidateMeasure();
}
}
[ViewVariables]
public Texture? TextureDisabled
{
get => _textureDisabled;
set
{
_textureDisabled = value;
InvalidateMeasure();
}
}
// Textures GET-SET END
// Textures Path GET-SET START
public string TexturePath
{
set
{
_texturePath = value;
TextureNormal = Theme.ResolveTexture(_texturePath);
TextureDefault = TextureNormal;
}
}
public string TextureHighLightedPath
{
set
{
_textureHighLightedPath = value;
TextureHighLighted = Theme.ResolveTexture(_textureHighLightedPath);
}
}
public string TexturePressedPath
{
set
{
_texturePressedPath = value;
TexturePressed = Theme.ResolveTexture(_texturePressedPath);
}
}
public string TextureDisabledPath
{
set
{
_textureDisabledPath = value;
TextureDisabled = Theme.ResolveTexture(_textureDisabledPath);
}
}
// Textures Path GET-SET END
// Arrow Texture GET-SET START
public Texture? ArrowTexture
{
get => _arrowTexture;
set
{
_arrowTexture = value;
InvalidateMeasure();
}
}
public string ArrowTexturePath
{
set
{
_arrowTexturePath = value;
ArrowTexture = Theme.ResolveTexture(_arrowTexturePath);
}
}
// Arrow Texture GET-SET END
public Vector2 Scale
{
get => _scale;
set
{
_scale = value;
InvalidateMeasure();
}
}
protected override void DrawModeChanged()
{
_texture = DrawMode switch
{
DrawModeEnum.Normal => _textureDefault,
DrawModeEnum.Pressed => _texturePressed,
DrawModeEnum.Hover => _textureHighLighted,
DrawModeEnum.Disabled => _textureDisabled,
_ => _textureDefault
};
}
protected override void Draw(DrawingHandleScreen handle)
{
var texture = TextureNormal;
if (texture == null)
return;
handle.DrawTextureRectRegion(texture, PixelSizeBox);
// Draw the arrow indicator when selected
if (IsHovered)
{
var arrowTexture = _arrowTexture;
if (arrowTexture == null)
{
return;
}
var arrowPosition = new Vector2(SizeBox.Right - 150, SizeBox.Top + (SizeBox.Height - arrowTexture.Size.Y) / 2);
handle.DrawTextureRectRegion(arrowTexture, UIBox2.FromDimensions(arrowPosition, arrowTexture.Size));
}
}
protected override Vector2 MeasureOverride(Vector2 availableSize)
{
var texture = TextureNormal;
return Scale * (texture?.Size ?? Vector2.Zero);
}
}

View File

@@ -0,0 +1,132 @@
using System.Numerics;
using Robust.Client.Graphics;
using Robust.Client.ResourceManagement;
using Robust.Client.UserInterface.Controls;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
using Color = Robust.Shared.Maths.Color;
namespace Content.Client._Ohio.Buttons;
[Virtual]
public class OhioLobbyTextButton : TextureButton // ShitCode Edition
{
[Dependency] private readonly IResourceCache _resourceCache = default!;
private readonly Font _font;
private string? _buttonText;
public string ButtonText
{
set => _buttonText = value;
}
public OhioLobbyTextButton()
{
IoCManager.InjectDependencies(this);
_font = new VectorFont(_resourceCache.GetResource<FontResource>("/Fonts/Bedstead/Bedstead.otf"), 15);
}
private void RebuildTexture()
{
if (_buttonText == null)
return;
var fontMeasure = MeasureText(_font, _buttonText);
var blank = new Image<Rgba32>((int)fontMeasure.X, (int)fontMeasure.Y);
blank[0, 0] = new Rgba32(0, 0, 0, 0);
var texture = Texture.LoadFromImage(blank);
TextureNormal = texture;
}
protected override void Draw(DrawingHandleScreen handle)
{
base.Draw(handle);
switch (DrawMode)
{
case DrawModeEnum.Normal:
DrawNormal(handle);
break;
case DrawModeEnum.Pressed:
DrawPressed(handle);
break;
case DrawModeEnum.Hover:
DrawHover(handle);
break;
case DrawModeEnum.Disabled:
DrawDisabled(handle);
break;
}
}
private void DrawNormal(DrawingHandleScreen handle)
{
if (string.IsNullOrEmpty(_buttonText))
return;
var color = Color.White;
if (ToggleMode)
{
color = Color.Red;
}
DrawText(handle, color);
}
private void DrawHover(DrawingHandleScreen handle)
{
if (string.IsNullOrEmpty(_buttonText))
return;
DrawText(handle, Color.Yellow);
}
private void DrawDisabled(DrawingHandleScreen handle)
{
if (string.IsNullOrEmpty(_buttonText))
return;
DrawText(handle, Color.Gray);
}
private void DrawPressed(DrawingHandleScreen handle)
{
if (string.IsNullOrEmpty(_buttonText))
return;
var color = Pressed
? Color.Green
: Color.Red;
DrawText(handle, color);
}
private void DrawText(DrawingHandleScreen handle, Color color)
{
if (string.IsNullOrEmpty(_buttonText))
return;
RebuildTexture();
handle.DrawString(
_font,
Vector2.Zero,
_buttonText!,
color
);
}
private Vector2 MeasureText(Font font, string text)
{
var textSize = font.GetHeight(0.9f);
var width = textSize * text.Length / 1.5f;
return new Vector2(width, textSize);
}
}

View File

@@ -0,0 +1,18 @@
using Robust.Client.UserInterface.CustomControls;
namespace Content.Client._Ohio.Buttons;
public sealed class OhioUICommandButton : OhioCommandButton
{
public Type? WindowType { get; set; }
private DefaultWindow? _window;
protected override void Execute(ButtonEventArgs obj)
{
if (WindowType == null)
return;
_window = (DefaultWindow) IoCManager.Resolve<IDynamicTypeFactory>().CreateInstance(WindowType);
_window?.OpenCentered();
}
}

View File

@@ -0,0 +1,91 @@
using Robust.Client.Graphics;
using Robust.Client.ResourceManagement;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Graphics.RSI;
using Robust.Shared.Timing;
namespace Content.Client._Ohio.UI;
public sealed class AnimatedBackgroundControl : TextureRect
{
[Dependency] private readonly IResourceCache _resourceCache = default!;
[Dependency] private readonly IClyde _clyde = default!;
private const string RsiPath = "/Textures/Ohio/Lobby/anim.rsi";
private const int States = 1;
private IRenderTexture? _buffer;
private readonly float[] _timer = new float[States];
private readonly float[][] _frameDelays = new float[States][];
private readonly int[] _frameCounter = new int[States];
private readonly Texture[][] _frames = new Texture[States][];
public AnimatedBackgroundControl()
{
IoCManager.InjectDependencies(this);
InitializeStates();
}
private void InitializeStates()
{
var rsi = _resourceCache.GetResource<RSIResource>(RsiPath).RSI;
for (var i = 0; i < States; i++)
{
if (!rsi.TryGetState((i + 1).ToString(), out var state))
continue;
_frames[i] = state.GetFrames(RsiDirection.South);
_frameDelays[i] = state.GetDelays();
_frameCounter[i] = 0;
}
}
protected override void FrameUpdate(FrameEventArgs args)
{
base.FrameUpdate(args);
for (var i = 0; i < _frames.Length; i++)
{
var delays = _frameDelays[i];
if (delays.Length == 0)
continue;
_timer[i] += args.DeltaSeconds * 0.20f;
var currentFrameIndex = _frameCounter[i];
if (!(_timer[i] >= delays[currentFrameIndex]))
continue;
_timer[i] -= delays[currentFrameIndex];
_frameCounter[i] = (currentFrameIndex + 1) % _frames[i].Length;
Texture = _frames[i][_frameCounter[i]];
}
}
protected override void Draw(DrawingHandleScreen handle)
{
base.Draw(handle);
if (_buffer is null)
return;
handle.DrawTextureRect(_buffer.Texture, PixelSizeBox);
}
protected override void Resized()
{
base.Resized();
_buffer?.Dispose();
_buffer = _clyde.CreateRenderTarget(PixelSize, RenderTargetColorFormat.Rgba8Srgb);
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
_buffer?.Dispose();
}
}

View File

@@ -0,0 +1,30 @@
using System.Numerics;
using Robust.Client.Graphics;
using Robust.Client.UserInterface.Controls;
namespace Content.Client._Ohio.UI;
public sealed class OhioRichTextLabel : RichTextLabel
{
private Texture? _moonTexture;
private string? _moonTexturePath = "/Textures/Ohio/Lobby/moon.png";
public OhioRichTextLabel()
{
_moonTexture = Theme.ResolveTexture(_moonTexturePath);
}
protected override void Draw(DrawingHandleScreen handle)
{
base.Draw(handle);
var moonTexture = _moonTexture;
if (moonTexture == null)
return;
var moonPosition = new Vector2(SizeBox.Right + 2, SizeBox.Top + (SizeBox.Height - moonTexture.Size.Y) / 2);
handle.DrawTextureRectRegion(moonTexture, UIBox2.FromDimensions(moonPosition, moonTexture.Size));
}
}

View File

@@ -1,6 +1,6 @@
<BoxContainer xmlns="https://spacestation14.io"
Orientation="Vertical" HorizontalExpand="True">
<Label Text="Правила сервера White Dream"
<Label Text="Правила сервера Green Miracle"
StyleClasses="LabelHeading"
HorizontalExpand="True"
HorizontalAlignment="Center"/>