UI: Add menu item to report an issue (#113)

This commit is contained in:
N3xoX1 2026-08-07 11:15:47 +09:30 committed by GitHub
parent 5336d56007
commit 3cfc7b3ef6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 24 additions and 2 deletions

View File

@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/>
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 2H9a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1z"/>
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m8 12 1.5 1.5L12.5 10.5"/>
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12h2"/>
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m8 17 1.5 1.5L12.5 15.5"/>
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 17h2"/>
</svg>

After

Width:  |  Height:  |  Size: 950 B

View File

@ -37,7 +37,8 @@
namespace
{
constexpr const char * kNxEmuDiscordUrl = "https://discord.gg/hEa4hNyFWU";
constexpr const char * discordUrl = "https://discord.gg/hEa4hNyFWU";
constexpr const char * reportUrl = "https://report.nxemu.com/";
constexpr int kDefaultMouseHideTimeoutMs = 2500;
const char * RendererBackendLabel(RendererBackend backend)
@ -286,6 +287,8 @@ const char * SciterMainWindow::MenuIconResource(GuiAction action) const
return "about.svg";
case GuiAction::OpenDiscord:
return "discord.svg";
case GuiAction::OpenReportIssues:
return "report.svg";
default:
return nullptr;
}
@ -459,6 +462,7 @@ void SciterMainWindow::ResetMenu()
MenuBarItemList helpMenu;
helpMenu.push_back(MenuBarItem(static_cast<int32_t>(GuiAction::OpenDiscord), "&Discord", nullptr, nullptr, MenuBarItem::CheckState::None, MenuIconSvg(GuiAction::OpenDiscord)));
helpMenu.push_back(MenuBarItem(static_cast<int32_t>(GuiAction::OpenReportIssues), "&Report Issues", nullptr, nullptr, MenuBarItem::CheckState::None, MenuIconSvg(GuiAction::OpenReportIssues)));
helpMenu.push_back(MenuBarItem(MenuBarItem::SPLITER));
helpMenu.push_back(MenuBarItem(static_cast<int32_t>(GuiAction::OpenAboutDialog), "&About NXEmu...", nullptr, nullptr, MenuBarItem::CheckState::None, MenuIconSvg(GuiAction::OpenAboutDialog)));
mainTitleMenu.push_back(MenuBarItem(MenuBarItem::SUB_MENU, "&Help", &helpMenu));
@ -1395,7 +1399,12 @@ void SciterMainWindow::OnAbout()
void SciterMainWindow::OnOpenDiscord()
{
ShellOpen(kNxEmuDiscordUrl);
ShellOpen(discordUrl);
}
void SciterMainWindow::OnOpenReportIssues()
{
ShellOpen(reportUrl);
}
void SciterMainWindow::OnOpenAppDirectory()
@ -1659,6 +1668,9 @@ void SciterMainWindow::OnGuiAction(GuiAction action)
case GuiAction::OpenDiscord:
OnOpenDiscord();
break;
case GuiAction::OpenReportIssues:
OnOpenReportIssues();
break;
case GuiAction::OpenAppDirectory:
OnOpenAppDirectory();
break;

View File

@ -59,6 +59,7 @@ class SciterMainWindow :
ResetWindowSize1080p,
OpenAboutDialog,
OpenDiscord,
OpenReportIssues,
OpenAppDirectory,
OpenLogDirectory,
RecentFileMenuFirst,
@ -145,6 +146,7 @@ private:
void OnToggleStartGamesWithUiHidden();
void OnAbout();
void OnOpenDiscord();
void OnOpenReportIssues();
void OnOpenAppDirectory();
void OnOpenLogDirectory();
void UpdateEmulationStatusText();