Skip to content

Commit

Permalink
Merge branch 'master' into Christmas-Clothing
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiserMaus committed Dec 29, 2024
2 parents c8cab91 + bc3e3ed commit 4ee83b7
Show file tree
Hide file tree
Showing 86 changed files with 30,830 additions and 43,998 deletions.
31 changes: 21 additions & 10 deletions Content.Client/Holopad/HolopadWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@
<!-- Header text -->
<BoxContainer MinHeight="60" Orientation="Vertical" VerticalAlignment="Center">
<Label Name="CallStatusText" Margin="10 5 10 0" ReservesSpace="False"/>
<RichTextLabel Name="CallerIdText" HorizontalAlignment="Center" Margin="0 0 0 0" ReservesSpace="False"/>
<BoxContainer Name="CallerIdContainer" Orientation="Vertical" ReservesSpace="False">
<RichTextLabel Name="CallerIdText" HorizontalAlignment="Center" Margin="0 0 0 0"/>
<Label Text="{Loc 'holopad-window-relay-label'}" Margin="10 5 10 0" ReservesSpace="False"/>
<RichTextLabel Name="HolopadIdText" HorizontalAlignment="Center" Margin="0 0 0 10"/>
</BoxContainer>
</BoxContainer>

<!-- Controls (the answer call button is absent when the phone is not ringing) -->
Expand Down Expand Up @@ -68,18 +72,25 @@
<PanelContainer Name="HolopadContactListHeaderPanel">
<Label Text="{Loc 'holopad-window-select-contact-from-list'}" HorizontalAlignment="Center" Margin="0 3 0 3"/>
</PanelContainer>

<PanelContainer Name="HolopadContactListPanel">
<ScrollContainer HorizontalExpand="True" VerticalExpand="True" Margin="8, 8, 8, 8" MinHeight="256">
<BoxContainer Orientation="Vertical">

<!-- Contact filter -->
<LineEdit Name="SearchLineEdit" HorizontalExpand="True" Margin="4, 4, 4, 0"
PlaceHolder="{Loc holopad-window-filter-line-placeholder}" />

<!-- If there is no data yet, this will be displayed -->
<BoxContainer Name="FetchingAvailableHolopadsContainer" HorizontalAlignment="Center" HorizontalExpand="True" VerticalExpand="True" ReservesSpace="False">
<Label Text="{Loc 'holopad-window-fetching-contacts-list'}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</BoxContainer>
<ScrollContainer HorizontalExpand="True" VerticalExpand="True" Margin="8, 8, 8, 8" MinHeight="256">

<!-- Container for the contacts -->
<BoxContainer Name="ContactsList" Orientation="Vertical" HorizontalExpand="True" VerticalExpand="True" Margin="10 0 10 0"/>
</ScrollContainer>
<!-- If there is no data yet, this will be displayed -->
<BoxContainer Name="FetchingAvailableHolopadsContainer" HorizontalAlignment="Center" HorizontalExpand="True" VerticalExpand="True" ReservesSpace="False">
<Label Text="{Loc 'holopad-window-fetching-contacts-list'}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</BoxContainer>

<!-- Container for the contacts -->
<BoxContainer Name="ContactsList" Orientation="Vertical" HorizontalExpand="True" VerticalExpand="True" Margin="10 0 10 0"/>
</ScrollContainer>
</BoxContainer>
</PanelContainer>
</BoxContainer>

Expand Down
12 changes: 9 additions & 3 deletions Content.Client/Holopad/HolopadWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,10 @@ public void UpdateState(Dictionary<NetEntity, string> holopads)

// Caller ID text
var callerId = _telephoneSystem.GetFormattedCallerIdForEntity(telephone.LastCallerId.Item1, telephone.LastCallerId.Item2, Color.LightGray, "Default", 11);
var holoapdId = _telephoneSystem.GetFormattedDeviceIdForEntity(telephone.LastCallerId.Item3, Color.LightGray, "Default", 11);

CallerIdText.SetMessage(FormattedMessage.FromMarkupOrThrow(callerId));
HolopadIdText.SetMessage(FormattedMessage.FromMarkupOrThrow(holoapdId));
LockOutIdText.SetMessage(FormattedMessage.FromMarkupOrThrow(callerId));

// Sort holopads alphabetically
Expand Down Expand Up @@ -236,10 +238,13 @@ private void UpdateAppearance()
// Make / update required children
foreach (var child in ContactsList.Children)
{
if (child is not HolopadContactButton)
if (child is not HolopadContactButton contactButton)
continue;

var contactButton = (HolopadContactButton)child;
var passesFilter = string.IsNullOrEmpty(SearchLineEdit.Text) ||
contactButton.Text?.Contains(SearchLineEdit.Text, StringComparison.CurrentCultureIgnoreCase) == true;

contactButton.Visible = passesFilter;
contactButton.Disabled = (_currentState != TelephoneState.Idle || lockButtons);
}

Expand Down Expand Up @@ -290,7 +295,7 @@ private void UpdateAppearance()
FetchingAvailableHolopadsContainer.Visible = (ContactsList.ChildCount == 0);
ActiveCallControlsContainer.Visible = (_currentState != TelephoneState.Idle || _currentUiKey == HolopadUiKey.AiRequestWindow);
CallPlacementControlsContainer.Visible = !ActiveCallControlsContainer.Visible;
CallerIdText.Visible = (_currentState == TelephoneState.Ringing);
CallerIdContainer.Visible = (_currentState == TelephoneState.Ringing);
AnswerCallButton.Visible = (_currentState == TelephoneState.Ringing);
}

Expand All @@ -316,6 +321,7 @@ public HolopadContactButton()
HorizontalExpand = true;
SetHeight = 32;
Margin = new Thickness(0f, 1f, 0f, 1f);
ReservesSpace = false;
}

public void UpdateValues(NetEntity netEntity, string label)
Expand Down
15 changes: 14 additions & 1 deletion Content.Client/Stylesheets/StyleNano.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ public sealed class StyleNano : StyleBase
public const string StyleClassCrossButtonRed = "CrossButtonRed";
public const string StyleClassButtonColorRed = "ButtonColorRed";
public const string StyleClassButtonColorGreen = "ButtonColorGreen";
public const string StyleClassNoStyle = "NoStyle"; // Sunrise-Edit

public static readonly Color ChatBackgroundColor = Color.FromHex("#25252ADD");

Expand Down Expand Up @@ -1722,7 +1723,19 @@ public StyleNano(IResourceCache resCache) : base(resCache)
new[]
{
new StyleProperty(TextureButton.StylePropertyTexture, resCache.GetTexture("/Textures/Interface/Bwoink/un_pinned.png"))
})
}),
// Sunrise-Edit

Element<Button>().Class(StyleClassNoStyle)
.Prop(Button.StylePropertyStyleBox, new StyleBoxFlat
{
BackgroundColor = Color.Transparent,
ContentMarginLeftOverride = 15,
ContentMarginRightOverride = 15,
ContentMarginTopOverride = 12,
ContentMarginBottomOverride = 12
}),
// Sunrise-Edit
}).ToList());
}
}
Expand Down
111 changes: 106 additions & 5 deletions Content.Client/_Sunrise/Roadmap/Roadmap.xaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,109 @@
<Control xmlns="https://spacestation14.io">
<ScrollContainer>
<Control xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client">
<PanelContainer>
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat
BackgroundColor="#1b1a1f"
ContentMarginLeftOverride="10"
ContentMarginRightOverride="10"/>
</PanelContainer.PanelOverride>
<BoxContainer Orientation="Vertical">
<RichTextLabel Name="Header" Access="Public" Margin="0 15 0 10" />
<BoxContainer Name="Versions" Access="Public" Orientation="Horizontal"/>
<RichTextLabel Name="Header"
Access="Public"
StyleClasses="LabelBigger"
Margin="0 15 0 10" />
<PanelContainer MinHeight="1">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#ffffff"/>
</PanelContainer.PanelOverride>
</PanelContainer>
<BoxContainer Orientation="Horizontal"
HorizontalExpand="True"
VerticalExpand="True"
Margin="0 10 0 10"
SeparationOverride="0">
<!-- 2024 Column -->
<BoxContainer Name="Column2024"
Access="Public"
Orientation="Vertical"
HorizontalExpand="True"
VerticalExpand="True"
Margin="0 0 10 0">
<Label Text="2024"
StyleClasses="LabelHeadingBigger"
HorizontalAlignment="Center"
HorizontalExpand="True"
FontColorOverride="#ffffff"
Margin="0 0 0 10"/>
<ScrollContainer VerticalExpand="True"
HScrollEnabled="False"
MinHeight="400">
<BoxContainer Name="Items2024"
Access="Public"
Orientation="Vertical"
Margin="0 0 10 0"/>
</ScrollContainer>
</BoxContainer>

<PanelContainer MinWidth="1" Margin="0 0 10 0" VerticalExpand="True">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat
BackgroundColor="#2a292f"/>
</PanelContainer.PanelOverride>
</PanelContainer>

<!-- 2025 Column -->
<BoxContainer Name="Column2025"
Access="Public"
Orientation="Vertical"
HorizontalExpand="True"
VerticalExpand="True"
Margin="0 0 10 0">
<Label Text="2025"
StyleClasses="LabelHeadingBigger"
HorizontalAlignment="Center"
HorizontalExpand="True"
FontColorOverride="#ffffff"
Margin="0 0 0 10"/>
<ScrollContainer VerticalExpand="True"
HScrollEnabled="False"
MinHeight="400">
<BoxContainer Name="Items2025"
Access="Public"
Orientation="Vertical"
Margin="0 0 10 0"/>
</ScrollContainer>
</BoxContainer>

<PanelContainer MinWidth="1" Margin="0 0 10 0" VerticalExpand="True">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat
BackgroundColor="#2a292f"/>
</PanelContainer.PanelOverride>
</PanelContainer>

<!-- 2026 Column -->
<BoxContainer Name="Column2026"
Access="Public"
Orientation="Vertical"
HorizontalExpand="True"
VerticalExpand="True">
<Label Text="2026"
StyleClasses="LabelHeadingBigger"
HorizontalAlignment="Center"
HorizontalExpand="True"
FontColorOverride="#ffffff"
Margin="0 0 0 10"/>
<ScrollContainer VerticalExpand="True"
HScrollEnabled="False"
MinHeight="400">
<BoxContainer Name="Items2026"
Access="Public"
Orientation="Vertical"/>
</ScrollContainer>
</BoxContainer>
</BoxContainer>
</BoxContainer>
</ScrollContainer>
</PanelContainer>
</Control>
30 changes: 13 additions & 17 deletions Content.Client/_Sunrise/Roadmap/Roadmap.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,24 @@ private void PopulateRoadmap(RoadmapVersionsPrototype roadmapVersions)
{
var msg = new FormattedMessage();
var headerLocale = Loc.GetString("ui-roadmap-header");
msg.AddMarkupOrThrow($"[font size=24]{headerLocale} [bold]{roadmapVersions.Fork}[/bold][/font]");
msg.AddMarkupOrThrow($"[font size=24][bold]{headerLocale} {roadmapVersions.Fork}[/bold][/font]");
Header.SetMessage(msg);

foreach (var roadmapVersion in roadmapVersions.Versions)
{
var version = new BoxContainer()
{
Orientation = BoxContainer.LayoutOrientation.Vertical,
Margin = new Thickness(0, 0, 20, 0),
HorizontalExpand = true,
};
Items2024.RemoveAllChildren();
Items2025.RemoveAllChildren();
Items2026.RemoveAllChildren();

var versionHeader = new RoadmapVersionHeader()
foreach (var version in roadmapVersions.Versions)
{
var targetColumn = version.Key switch
{
Text = roadmapVersion.Value.Name,
"2024" => Items2024,
"2025" => Items2025,
"2026" => Items2026,
_ => Items2024
};

version.AddChild(versionHeader);

foreach (var goal in roadmapVersion.Value.Goals)
foreach (var goal in version.Value.Goals)
{
var roadmapItem = new RoadmapItem()
{
Expand All @@ -60,10 +58,8 @@ private void PopulateRoadmap(RoadmapVersionsPrototype roadmapVersions)
ItemState = goal.Value.State,
};

version.AddChild(roadmapItem);
targetColumn.AddChild(roadmapItem);
}

Versions.AddChild(version);
}
}
}
Expand Down
64 changes: 50 additions & 14 deletions Content.Client/_Sunrise/Roadmap/RoadmapItem.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,56 @@
xmlns="https://spacestation14.io"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
xmlns:roadmap="clr-namespace:Content.Client._Sunrise.Roadmap"
Margin="0 0 0 10"
MaxWidth="275">
<BoxContainer Orientation="Horizontal" SeparationOverride="0">
<BoxContainer Orientation="Vertical" HorizontalExpand="True">
<Button Name="HeaderButton" Access="Public" StyleClasses="OpenBoth" />
<BoxContainer Name="ContentsContainer" Access="Public" Orientation="Vertical" Visible="False">
<RichTextLabel Name="Contents" Access="Public" RectClipContent="True" />
<Label Name="StateText" Access="Public" HorizontalAlignment="Right" Align="Right" Margin="0 0 5 0" />
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Margin="0 0 0 5">
<PanelContainer>
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat
BackgroundColor="#232228"
BorderColor="#2a292f"
BorderThickness="1"
ContentMarginLeftOverride="10"
ContentMarginRightOverride="10"
ContentMarginTopOverride="5"
ContentMarginBottomOverride="5"/>
</PanelContainer.PanelOverride>
<BoxContainer Orientation="Horizontal" SeparationOverride="0">
<BoxContainer Orientation="Vertical" HorizontalExpand="True">
<Button Name="HeaderButton"
Access="Public"
MinHeight="35"
StyleClasses="NoStyle">
<BoxContainer Orientation="Horizontal">
<Label Name="HeaderLabel"
StyleClasses="LabelSubText"
HorizontalExpand="True"/>
<Label Name="StateText"
Access="Public"
StyleClasses="LabelSubText"
Margin="10 0 0 0"/>
</BoxContainer>
</Button>
<BoxContainer Name="ContentsContainer"
Access="Public"
Orientation="Vertical"
Visible="False"
Margin="0 5 0 0">
<RichTextLabel Name="Contents"
Access="Public"
RectClipContent="True"
StyleClasses="LabelSubText"
Margin="0 5"/>
</BoxContainer>
</BoxContainer>
<PanelContainer Name="StateColor"
Access="Public"
VerticalExpand="True"
MinWidth="3"
MaxWidth="3">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat />
</PanelContainer.PanelOverride>
</PanelContainer>
</BoxContainer>
<PanelContainer Name="StateColor" Access="Public" VerticalExpand="True" MinWidth="5" MaxWidth="5">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat />
</PanelContainer.PanelOverride>
</PanelContainer>
</BoxContainer>
</PanelContainer>
</roadmap:RoadmapItem>
12 changes: 6 additions & 6 deletions Content.Client/_Sunrise/Roadmap/RoadmapItem.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ public RoadmapItemState ItemState
var panel = (StyleBoxFlat) StateColor.PanelOverride!;
panel.BackgroundColor = _itemState switch
{
RoadmapItemState.Planned => Color.Red,
RoadmapItemState.InProgress => Color.FromHex("#20C9FF"),
RoadmapItemState.Partial => Color.Yellow,
RoadmapItemState.Complete => Color.Green,
RoadmapItemState.Planned => Color.FromHex("#e74c3c"),
RoadmapItemState.InProgress => Color.FromHex("#3498db"),
RoadmapItemState.Partial => Color.FromHex("#f1c40f"),
RoadmapItemState.Complete => Color.FromHex("#2ecc71"),
_ => Color.Transparent
};

Expand All @@ -42,8 +42,8 @@ public RoadmapItemState ItemState

public string? HeaderText
{
get => HeaderButton.Text;
set => HeaderButton.Text = value;
get => HeaderLabel.Text;
set => HeaderLabel.Text = value;
}

public string? Text
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/_Sunrise/Roadmap/RoadmapUIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public void OnStateEntered(LobbyState state)
if (_shown || _window != null)
return;

//ToggleRoadmap();
ToggleRoadmap();
}

public void ToggleRoadmap()
Expand Down
Loading

0 comments on commit 4ee83b7

Please sign in to comment.