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

Added discord to menu #136

Merged
merged 1 commit into from
May 9, 2024
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
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 = Выйти
Loading