Skip to content

Commit

Permalink
Add forum link to Help menu
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Oct 10, 2021
1 parent 4d72f24 commit c50151d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions install/menu.xml
Expand Up @@ -328,6 +328,7 @@

<subMenu name="help" caption="&amp;Help">
<menuItem name="about" caption="&amp;About" command="About" />
<menuItem name="openForumLink" caption="&amp;Community Forum" command="OpenForumUrl" />
<menuItem name="userGuide" caption="&amp;User Guide" command="ShowUserGuide" />
</subMenu>
</menu>
1 change: 1 addition & 0 deletions install/user.xml
Expand Up @@ -322,6 +322,7 @@
<toggletoolbutton name="usedarktheme" action="TextureToolUseDarkTheme" tooltip="Use Dark Colour Theme" icon="bulb_unlit.png" />
</toolbar>
<userGuideUrl value="https://www.darkradiant.net/userguide" />
<forumUrl value="https://forums.thedarkmod.com/index.php?/forum/51-darkradiant-feedback-and-development/" />
<vcs>
<git>
<autoFetchEnabled value="1" />
Expand Down
6 changes: 6 additions & 0 deletions radiant/ui/Documentation.cpp
Expand Up @@ -9,11 +9,17 @@ namespace ui
namespace
{
const char* const RKEY_USER_GUIDE_URL = "user/ui/userGuideUrl";
const char* const RKEY_FORUM_URL = "user/ui/forumUrl";
}

void Documentation::showUserGuide(const cmd::ArgumentList&)
{
wxLaunchDefaultBrowser(registry::getValue<std::string>(RKEY_USER_GUIDE_URL));
}

void Documentation::OpenForumUrl(const cmd::ArgumentList&)
{
wxLaunchDefaultBrowser(registry::getValue<std::string>(RKEY_FORUM_URL));
}

}
3 changes: 3 additions & 0 deletions radiant/ui/Documentation.h
Expand Up @@ -12,6 +12,9 @@ class Documentation

/// Show the user guide
static void showUserGuide(const cmd::ArgumentList&);

// Open the TDM forums
static void OpenForumUrl(const cmd::ArgumentList&);
};

}
1 change: 1 addition & 0 deletions radiant/ui/UserInterfaceModule.cpp
Expand Up @@ -396,6 +396,7 @@ void UserInterfaceModule::registerUICommands()
GlobalCommandSystem().addCommand("ShowCommandList", CommandList::ShowDialog);
GlobalCommandSystem().addCommand("About", AboutDialog::showDialog);
GlobalCommandSystem().addCommand("ShowUserGuide", Documentation::showUserGuide);
GlobalCommandSystem().addCommand("OpenForumUrl", Documentation::OpenForumUrl);
GlobalCommandSystem().addCommand("ExportSelectedAsModelDialog", ExportAsModelDialog::ShowDialog);
GlobalCommandSystem().addCommand("ConvertModelDialog", ConvertModelDialog::ShowDialog);

Expand Down

0 comments on commit c50151d

Please sign in to comment.