Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
Added discord to menu
Browse files Browse the repository at this point in the history
  • Loading branch information
FireNameFN committed May 9, 2024
1 parent 48d72b0 commit e49a3cf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions Content.Client/Options/UI/EscapeMenu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<Button Access="Public" Name="RulesButton" Text="{Loc 'ui-escape-rules'}" />
<Button Access="Public" Name="GuidebookButton" Text="{Loc 'ui-escape-guidebook'}" />
<Button Access="Public" Name="WikiButton" Text="{Loc 'ui-escape-wiki'}" />
<Button Access="Public" Name="DiscordButton" Text="{Loc 'ui-escape-discord'}" />
<Button Access="Public" Name="DisconnectButton" Text="{Loc 'ui-escape-disconnect'}" />
<Button Access="Public" Name="QuitButton" Text="{Loc 'ui-escape-quit'}" />
</BoxContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ public void OnStateEntered(GameplayState state)
_uri.OpenUri(_cfg.GetCVar(CCVars.InfoLinksWiki));
};

_escapeWindow.DiscordButton.OnPressed += _ =>
{
_uri.OpenUri(_cfg.GetCVar(CCVars.InfoLinksDiscord));
};

_escapeWindow.GuidebookButton.OnPressed += _ =>
{
_guidebook.ToggleGuidebook();
Expand All @@ -106,6 +111,8 @@ public void OnStateEntered(GameplayState state)
// Hide wiki button if we don't have a link for it.
_escapeWindow.WikiButton.Visible = _cfg.GetCVar(CCVars.InfoLinksWiki) != "";

_escapeWindow.DiscordButton.Visible = _cfg.GetCVar(CCVars.InfoLinksDiscord) != "";

CommandBinds.Builder
.Bind(EngineKeyFunctions.EscapeMenu,
InputCmdHandler.FromDelegate(_ => ToggleWindow()))
Expand Down
1 change: 1 addition & 0 deletions Resources/Locale/en-US/escape-menu/ui/escape-menu.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ui-escape-options = Options
ui-escape-rules = Rules
ui-escape-guidebook = Guidebook
ui-escape-wiki = Wiki
ui-escape-discord = Discord
ui-escape-disconnect = Disconnect
ui-escape-quit = Quit
1 change: 1 addition & 0 deletions Resources/Locale/ru-RU/escape-menu/ui/escape-menu.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ ui-escape-options = Настройки
ui-escape-rules = Правила
ui-escape-guidebook = Руководство
ui-escape-wiki = Wiki
ui-escape-discord = Discord
ui-escape-disconnect = Отключиться
ui-escape-quit = Выйти

0 comments on commit e49a3cf

Please sign in to comment.