mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-23 07:57:51 -05:00
change some popups a bit
This commit is contained in:
parent
899b0ce82c
commit
20adf34d4a
2 changed files with 22 additions and 28 deletions
|
@ -552,12 +552,11 @@ void LocalModInfoPopup::onUpdateProgress(ModInstallEvent* event) {
|
||||||
std::visit(makeVisitor {
|
std::visit(makeVisitor {
|
||||||
[&](UpdateFinished const&) {
|
[&](UpdateFinished const&) {
|
||||||
this->setInstallStatus(std::nullopt);
|
this->setInstallStatus(std::nullopt);
|
||||||
|
|
||||||
FLAlertLayer::create(
|
FLAlertLayer::create(
|
||||||
"Update complete",
|
"Update Complete",
|
||||||
"Mod successfully updated! :) "
|
"Mod updated successfully!\n"
|
||||||
"(You have to <cy>restart the game</c> "
|
"<cy>Restart</c> the game to apply changes.",
|
||||||
"for the mod to take effect)",
|
|
||||||
"OK"
|
"OK"
|
||||||
)->show();
|
)->show();
|
||||||
|
|
||||||
|
@ -573,7 +572,7 @@ void LocalModInfoPopup::onUpdateProgress(ModInstallEvent* event) {
|
||||||
this->setInstallStatus(std::nullopt);
|
this->setInstallStatus(std::nullopt);
|
||||||
|
|
||||||
FLAlertLayer::create(
|
FLAlertLayer::create(
|
||||||
"Update failed :(", info, "OK"
|
"Update Failed", info, "OK"
|
||||||
)->show();
|
)->show();
|
||||||
|
|
||||||
m_installBtn->setEnabled(true);
|
m_installBtn->setEnabled(true);
|
||||||
|
@ -594,8 +593,8 @@ void LocalModInfoPopup::onUninstall(CCObject*) {
|
||||||
auto layer = FLAlertLayer::create(
|
auto layer = FLAlertLayer::create(
|
||||||
this,
|
this,
|
||||||
"Confirm Uninstall",
|
"Confirm Uninstall",
|
||||||
fmt::format("Are you sure you want to uninstall <cr>{}</c>?{}",
|
fmt::format("Are you sure you want to uninstall <cr>{}</c>?{}", m_mod->getName(),
|
||||||
m_mod->getName(), m_mod == Mod::get() ?
|
m_mod == Mod::get() ?
|
||||||
"\nThis will close the game and launch the <co>Geode Uninstaller</c>. "
|
"\nThis will close the game and launch the <co>Geode Uninstaller</c>. "
|
||||||
"You will have to restart the game <cy>manually</c> after that." : ""),
|
"You will have to restart the game <cy>manually</c> after that." : ""),
|
||||||
"Cancel",
|
"Cancel",
|
||||||
|
@ -606,13 +605,11 @@ void LocalModInfoPopup::onUninstall(CCObject*) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocalModInfoPopup::onEnableMod(CCObject* sender) {
|
void LocalModInfoPopup::onEnableMod(CCObject* sender) {
|
||||||
if (!Mod::get()->setSavedValue("shown-disable-vs-unload-info", true)) {
|
if (!Mod::get()->setSavedValue("shown-mod-toggle-info", true)) {
|
||||||
FLAlertLayer::create(
|
FLAlertLayer::create(
|
||||||
"Notice",
|
"Notice",
|
||||||
"<cb>Disabling</c> a <cy>mod</c> removes its hooks & patches and "
|
"<cb>Toggling</c> a mod requires you to <cg>restart</c> the game.\n"
|
||||||
"calls its user-defined disable function if one exists. You may "
|
"When a mod is <cr>disabled</c>, it will not get loaded at all.",
|
||||||
"still see some effects of the mod left however, and you may "
|
|
||||||
"need to <cg>restart</c> the game to have it fully unloaded.",
|
|
||||||
"OK"
|
"OK"
|
||||||
)->show();
|
)->show();
|
||||||
}
|
}
|
||||||
|
@ -672,7 +669,7 @@ void LocalModInfoPopup::FLAlert_Clicked(FLAlertLayer* layer, bool btn2) {
|
||||||
case TAG_CONFIRM_UNINSTALL_WITH_SAVEDATA: {
|
case TAG_CONFIRM_UNINSTALL_WITH_SAVEDATA: {
|
||||||
auto res = m_mod->uninstall(btn2);
|
auto res = m_mod->uninstall(btn2);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
return FLAlertLayer::create("Uninstall failed :(", res.unwrapErr(), "OK")->show();
|
return FLAlertLayer::create("Uninstall Failed", res.unwrapErr(), "OK")->show();
|
||||||
}
|
}
|
||||||
if (m_layer) {
|
if (m_layer) {
|
||||||
m_layer->reloadList();
|
m_layer->reloadList();
|
||||||
|
@ -737,12 +734,11 @@ void IndexItemInfoPopup::onInstallProgress(ModInstallEvent* event) {
|
||||||
std::visit(makeVisitor {
|
std::visit(makeVisitor {
|
||||||
[&](UpdateFinished const&) {
|
[&](UpdateFinished const&) {
|
||||||
this->setInstallStatus(std::nullopt);
|
this->setInstallStatus(std::nullopt);
|
||||||
|
|
||||||
FLAlertLayer::create(
|
FLAlertLayer::create(
|
||||||
"Install complete",
|
"Install Complete",
|
||||||
"Mod successfully installed! :) "
|
"Mod installed successfully!\n"
|
||||||
"(You have to <cy>restart the game</c> "
|
"<cy>Restart</c> the game to apply changes.",
|
||||||
"for the mod to take effect)",
|
|
||||||
"OK"
|
"OK"
|
||||||
)->show();
|
)->show();
|
||||||
|
|
||||||
|
@ -758,7 +754,7 @@ void IndexItemInfoPopup::onInstallProgress(ModInstallEvent* event) {
|
||||||
this->setInstallStatus(std::nullopt);
|
this->setInstallStatus(std::nullopt);
|
||||||
|
|
||||||
FLAlertLayer::create(
|
FLAlertLayer::create(
|
||||||
"Installation failed :(", info, "OK"
|
"Installation Failed", info, "OK"
|
||||||
)->show();
|
)->show();
|
||||||
|
|
||||||
m_installBtn->setEnabled(true);
|
m_installBtn->setEnabled(true);
|
||||||
|
|
|
@ -219,13 +219,11 @@ ModCell* ModCell::create(
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModCell::onEnable(CCObject* sender) {
|
void ModCell::onEnable(CCObject* sender) {
|
||||||
if (!Mod::get()->setSavedValue("shown-disable-vs-unload-info", true)) {
|
if (!Mod::get()->getSavedValue("shown-mod-toggle-info", true)) {
|
||||||
FLAlertLayer::create(
|
FLAlertLayer::create(
|
||||||
"Notice",
|
"Notice",
|
||||||
"<cb>Disabling</c> a <cy>mod</c> removes its hooks & patches and "
|
"<cb>Toggling</c> a mod requires you to <cg>restart</c> the game.\n"
|
||||||
"calls its user-defined disable function if one exists. You may "
|
"When a mod is <cr>disabled</c>, it will not get loaded at all.",
|
||||||
"still see some effects of the mod left however, and you may "
|
|
||||||
"need to <cg>restart</c> the game to have it fully unloaded.",
|
|
||||||
"OK"
|
"OK"
|
||||||
)->show();
|
)->show();
|
||||||
}
|
}
|
||||||
|
@ -455,19 +453,19 @@ void InvalidGeodeFileCell::FLAlert_Clicked(FLAlertLayer*, bool btn2) {
|
||||||
try {
|
try {
|
||||||
if (ghc::filesystem::remove(m_info.path)) {
|
if (ghc::filesystem::remove(m_info.path)) {
|
||||||
FLAlertLayer::create(
|
FLAlertLayer::create(
|
||||||
"File removed", "Removed <cy>" + m_info.path.string() + "</c>", "OK"
|
"File Removed", "Removed <cy>" + m_info.path.string() + "</c>", "OK"
|
||||||
)->show();
|
)->show();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
FLAlertLayer::create(
|
FLAlertLayer::create(
|
||||||
"Unable to remove file",
|
"Unable to Remove File",
|
||||||
"Unable to remove <cy>" + m_info.path.string() + "</c>", "OK"
|
"Unable to remove <cy>" + m_info.path.string() + "</c>", "OK"
|
||||||
)->show();
|
)->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (std::exception& e) {
|
catch (std::exception& e) {
|
||||||
FLAlertLayer::create(
|
FLAlertLayer::create(
|
||||||
"Unable to remove file",
|
"Unable to Remove File",
|
||||||
"Unable to remove <cy>" + m_info.path.string() + "</c>: <cr>" +
|
"Unable to remove <cy>" + m_info.path.string() + "</c>: <cr>" +
|
||||||
std::string(e.what()) + "</c>",
|
std::string(e.what()) + "</c>",
|
||||||
"OK"
|
"OK"
|
||||||
|
|
Loading…
Reference in a new issue