Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Sponsor] Add info window & implement ghost themes #1549

Merged
merged 2 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading