[feat] New Interface (#10)
This commit is contained in:
@@ -15,9 +15,9 @@ public sealed class MenuButton : ContainerButton
|
||||
public const string StyleClassLabelTopButton = "topButtonLabel";
|
||||
public const string StyleClassRedTopButton = "topButtonLabel";
|
||||
|
||||
private static readonly Color ColorNormal = Color.FromHex("#7b7e9e");
|
||||
private static readonly Color ColorRedNormal = Color.FromHex("#FEFEFE");
|
||||
private static readonly Color ColorHovered = Color.FromHex("#9699bb");
|
||||
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");
|
||||
|
||||
|
||||
@@ -26,10 +26,8 @@
|
||||
</BoxContainer>
|
||||
<alerts:AlertsUI Name="Alerts" Access="Protected" />
|
||||
</LayoutContainer>
|
||||
<PanelContainer HorizontalExpand="True" MinWidth="300">
|
||||
<PanelContainer.PanelOverride>
|
||||
<graphics:StyleBoxFlat BackgroundColor="#2B2C3B" />
|
||||
</PanelContainer.PanelOverride>
|
||||
<PanelContainer HorizontalExpand="True" MinWidth="300" StyleClasses="GayShitBackground">
|
||||
|
||||
|
||||
<BoxContainer Orientation="Vertical" HorizontalExpand="True" SeparationOverride="10" Margin="10">
|
||||
<menuBar:GameTopMenuBar Name="TopBar" HorizontalExpand="True" Access="Protected" />
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace Content.Client.UserInterface.Systems.Atmos.GasTank
|
||||
|
||||
var middle = new PanelContainer
|
||||
{
|
||||
PanelOverride = new StyleBoxFlat {BackgroundColor = Color.FromHex("#202025")},
|
||||
PanelOverride = new StyleBoxFlat {BackgroundColor = Color.FromHex("#3C4841")},
|
||||
Children =
|
||||
{
|
||||
(_contentContainer = new BoxContainer
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Content.Client.Administration.Managers;
|
||||
@@ -19,6 +18,8 @@ using Content.Shared.Damage.ForceSay;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Input;
|
||||
using Content.Shared.Radio;
|
||||
using Content.Shared.White;
|
||||
using Content.Shared.White.Utils;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.Input;
|
||||
using Robust.Client.Player;
|
||||
@@ -235,19 +236,28 @@ public sealed class ChatUIController : UIController
|
||||
}
|
||||
|
||||
ChatBox chatBox;
|
||||
string? chatSizeRaw;
|
||||
//White modification start
|
||||
string chatSizeRaw;
|
||||
Vector2 chatSize;
|
||||
//End
|
||||
|
||||
switch (UIManager.ActiveScreen)
|
||||
{
|
||||
case DefaultGameScreen defaultScreen:
|
||||
chatBox = defaultScreen.ChatBox;
|
||||
chatSizeRaw = _config.GetCVar(CCVars.DefaultScreenChatSize);
|
||||
SetChatSizing(chatSizeRaw, defaultScreen, setting);
|
||||
//White modification start
|
||||
chatSizeRaw = _config.GetCVar(WhiteCVars.DefaultChatSize);
|
||||
chatSize = Vector2Utils.ParseVector2FromString(chatSizeRaw, ';');
|
||||
//End
|
||||
SetChatSizing(chatSize, defaultScreen, setting);
|
||||
break;
|
||||
case SeparatedChatGameScreen separatedScreen:
|
||||
chatBox = separatedScreen.ChatBox;
|
||||
chatSizeRaw = _config.GetCVar(CCVars.SeparatedScreenChatSize);
|
||||
SetChatSizing(chatSizeRaw, separatedScreen, setting);
|
||||
//White modification start
|
||||
chatSizeRaw = _config.GetCVar(WhiteCVars.SeparatedChatSize);
|
||||
chatSize = Vector2Utils.ParseVector2FromString(chatSizeRaw, ';');
|
||||
//End
|
||||
SetChatSizing(chatSize, separatedScreen, setting);
|
||||
break;
|
||||
default:
|
||||
// this could be better?
|
||||
@@ -261,7 +271,7 @@ public sealed class ChatUIController : UIController
|
||||
chatBox.Main = setting;
|
||||
}
|
||||
|
||||
private void SetChatSizing(string sizing, InGameScreen screen, bool setting)
|
||||
private void SetChatSizing(Vector2 sizing, InGameScreen screen, bool setting)
|
||||
{
|
||||
if (!setting)
|
||||
{
|
||||
@@ -271,19 +281,9 @@ public sealed class ChatUIController : UIController
|
||||
|
||||
screen.OnChatResized += StoreChatSize;
|
||||
|
||||
if (string.IsNullOrEmpty(sizing))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var split = sizing.Split(",");
|
||||
|
||||
var chatSize = new Vector2(
|
||||
float.Parse(split[0], CultureInfo.InvariantCulture),
|
||||
float.Parse(split[1], CultureInfo.InvariantCulture));
|
||||
|
||||
|
||||
screen.SetChatSize(chatSize);
|
||||
//White modification start
|
||||
screen.SetChatSize(sizing);
|
||||
//End
|
||||
}
|
||||
|
||||
private void StoreChatSize(Vector2 size)
|
||||
@@ -293,15 +293,17 @@ public sealed class ChatUIController : UIController
|
||||
throw new Exception("Cannot get active screen!");
|
||||
}
|
||||
|
||||
var stringSize =
|
||||
$"{size.X.ToString(CultureInfo.InvariantCulture)},{size.Y.ToString(CultureInfo.InvariantCulture)}";
|
||||
switch (UIManager.ActiveScreen)
|
||||
{
|
||||
case DefaultGameScreen _:
|
||||
_config.SetCVar(CCVars.DefaultScreenChatSize, stringSize);
|
||||
//White modification start
|
||||
_config.SetCVar(WhiteCVars.DefaultChatSize, size.ConvertToString(';'));
|
||||
//End
|
||||
break;
|
||||
case SeparatedChatGameScreen _:
|
||||
_config.SetCVar(CCVars.SeparatedScreenChatSize, stringSize);
|
||||
//White modification start
|
||||
_config.SetCVar(WhiteCVars.SeparatedChatSize, size.ConvertToString(';'));
|
||||
//End
|
||||
break;
|
||||
default:
|
||||
// do nothing
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
HorizontalExpand="True"
|
||||
VerticalExpand="True"
|
||||
MinSize="465 225">
|
||||
<PanelContainer HorizontalExpand="True" VerticalExpand="True">
|
||||
<PanelContainer.PanelOverride>
|
||||
<graphics:StyleBoxFlat BackgroundColor="#25252AAA" />
|
||||
</PanelContainer.PanelOverride>
|
||||
|
||||
<PanelContainer HorizontalExpand="True" VerticalExpand="True" StyleClasses="FuckyWuckyBackground" >
|
||||
<BoxContainer Orientation="Vertical" SeparationOverride="4" HorizontalExpand="True" VerticalExpand="True">
|
||||
<OutputPanel Name="Contents" HorizontalExpand="True" VerticalExpand="True" Margin="8 8 8 4" />
|
||||
<OutputPanel Name="Contents" HorizontalExpand="True" VerticalExpand="True" Margin="2 2 2 2" >
|
||||
<OutputPanel.StyleBoxOverride>
|
||||
<graphics:StyleBoxFlat PaddingRight="16" />
|
||||
</OutputPanel.StyleBoxOverride>
|
||||
</OutputPanel>
|
||||
<controls:ChatInputBox HorizontalExpand="True" Name="ChatInput" Access="Public" Margin="2"/>
|
||||
</BoxContainer>
|
||||
</PanelContainer>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
Orientation="Horizontal"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Top"
|
||||
SeparationOverride="5"
|
||||
SeparationOverride="0"
|
||||
>
|
||||
<ui:MenuButton
|
||||
Name="EscapeButton"
|
||||
|
||||
Reference in New Issue
Block a user