feat: Added update to Nighly/Stable release option

This commit is contained in:
WerWolv
2025-08-09 12:25:22 +02:00
parent 5c3dfa08b2
commit a403980976
3 changed files with 13 additions and 1 deletions

View File

@@ -633,6 +633,16 @@ namespace hex::plugin::builtin {
static void createExtrasMenu() {
ContentRegistry::Interface::registerMainMenuItem("hex.builtin.menu.extras", 5000);
if (ImHexApi::System::isNightlyBuild()) {
ContentRegistry::Interface::addMenuItem({ "hex.builtin.menu.extras", "hex.builtin.menu.extras.switch_to_stable" }, ICON_VS_ROCKET, 2750, Shortcut::None, [] {
ImHexApi::System::updateImHex(ImHexApi::System::UpdateType::Stable);
});
} else {
ContentRegistry::Interface::addMenuItem({ "hex.builtin.menu.extras", "hex.builtin.menu.extras.switch_to_nightly" }, ICON_VS_ROCKET, 2750, Shortcut::None, [] {
ImHexApi::System::updateImHex(ImHexApi::System::UpdateType::Nightly);
});
}
}
static void createHelpMenu() {