Skip to content

Commit

Permalink
[Sponsor] Add info window & implement ghost themes (#1549)
Browse files Browse the repository at this point in the history
  • Loading branch information
Morb0 authored Nov 3, 2023
1 parent 447d462 commit e0e9905
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Content.Client/Preferences/UI/CharacterSetupGui.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
Text="{Loc 'character-setup-gui-character-setup-rules-button'}"
StyleClasses="ButtonBig"
HorizontalAlignment="Right" />
<Button Name="SponsorButton"
Text="{Loc 'character-setup-gui-character-setup-sponsor-button'}"
Visible="False"
StyleClasses="ButtonBig" />
<Button Name="SaveButton"
Access="Public"
Text="{Loc 'character-setup-gui-character-setup-save-button'}"
Expand Down
6 changes: 6 additions & 0 deletions Content.Client/Preferences/UI/CharacterSetupGui.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Content.Client.Lobby.UI;
using Content.Client.Resources;
using Content.Client.Stylesheets;
using Content.Corvax.Interfaces.Client;
using Content.Shared.Humanoid;
using Content.Shared.Humanoid.Prototypes;
using Content.Shared.Preferences;
Expand Down Expand Up @@ -80,6 +81,11 @@ public CharacterSetupGui(
UpdateUI();

RulesButton.OnPressed += _ => new RulesAndInfoWindow().Open();
if (IoCManager.Instance!.TryResolveType<ISponsorWindowCreator>(out var creator))
{
SponsorButton.Visible = true;
SponsorButton.OnPressed += _ => creator.OpenWindow();
}
preferencesManager.OnServerDataLoaded += UpdateUI;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Content.Corvax.Interfaces.Client;

public interface ISponsorWindowCreator
{
public void OpenWindow();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
character-setup-gui-character-setup-sponsor-button = Спонсор
2 changes: 1 addition & 1 deletion Secrets

0 comments on commit e0e9905

Please sign in to comment.