change some popups a bit

This commit is contained in:
ConfiG 2023-09-11 17:02:43 +03:00
parent 899b0ce82c
commit 20adf34d4a
No known key found for this signature in database
GPG key ID: 44DA1983F524C11B
2 changed files with 22 additions and 28 deletions

View file

@ -552,12 +552,11 @@ void LocalModInfoPopup::onUpdateProgress(ModInstallEvent* event) {
std::visit(makeVisitor {
[&](UpdateFinished const&) {
this->setInstallStatus(std::nullopt);
FLAlertLayer::create(
"Update complete",
"Mod successfully updated! :) "
"(You have to <cy>restart the game</c> "
"for the mod to take effect)",
"Update Complete",
"Mod updated successfully!\n"
"<cy>Restart</c> the game to apply changes.",
"OK"
)->show();
@ -573,7 +572,7 @@ void LocalModInfoPopup::onUpdateProgress(ModInstallEvent* event) {
this->setInstallStatus(std::nullopt);
FLAlertLayer::create(
"Update failed :(", info, "OK"
"Update Failed", info, "OK"
)->show();
m_installBtn->setEnabled(true);
@ -594,8 +593,8 @@ void LocalModInfoPopup::onUninstall(CCObject*) {
auto layer = FLAlertLayer::create(
this,
"Confirm Uninstall",
fmt::format("Are you sure you want to uninstall <cr>{}</c>?{}",
m_mod->getName(), m_mod == Mod::get() ?
fmt::format("Are you sure you want to uninstall <cr>{}</c>?{}", m_mod->getName(),
m_mod == Mod::get() ?
"\nThis will close the game and launch the <co>Geode Uninstaller</c>. "
"You will have to restart the game <cy>manually</c> after that." : ""),
"Cancel",
@ -606,13 +605,11 @@ void LocalModInfoPopup::onUninstall(CCObject*) {
}
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(
"Notice",
"<cb>Disabling</c> a <cy>mod</c> removes its hooks & patches and "
"calls its user-defined disable function if one exists. You may "
"still see some effects of the mod left however, and you may "
"need to <cg>restart</c> the game to have it fully unloaded.",
"<cb>Toggling</c> a mod requires you to <cg>restart</c> the game.\n"
"When a mod is <cr>disabled</c>, it will not get loaded at all.",
"OK"
)->show();
}
@ -672,7 +669,7 @@ void LocalModInfoPopup::FLAlert_Clicked(FLAlertLayer* layer, bool btn2) {
case TAG_CONFIRM_UNINSTALL_WITH_SAVEDATA: {
auto res = m_mod->uninstall(btn2);
if (!res) {
return FLAlertLayer::create("Uninstall failed :(", res.unwrapErr(), "OK")->show();
return FLAlertLayer::create("Uninstall Failed", res.unwrapErr(), "OK")->show();
}
if (m_layer) {
m_layer->reloadList();
@ -737,12 +734,11 @@ void IndexItemInfoPopup::onInstallProgress(ModInstallEvent* event) {
std::visit(makeVisitor {
[&](UpdateFinished const&) {
this->setInstallStatus(std::nullopt);
FLAlertLayer::create(
"Install complete",
"Mod successfully installed! :) "
"(You have to <cy>restart the game</c> "
"for the mod to take effect)",
"Install Complete",
"Mod installed successfully!\n"
"<cy>Restart</c> the game to apply changes.",
"OK"
)->show();
@ -758,7 +754,7 @@ void IndexItemInfoPopup::onInstallProgress(ModInstallEvent* event) {
this->setInstallStatus(std::nullopt);
FLAlertLayer::create(
"Installation failed :(", info, "OK"
"Installation Failed", info, "OK"
)->show();
m_installBtn->setEnabled(true);

View file

@ -219,13 +219,11 @@ ModCell* ModCell::create(
}
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(
"Notice",
"<cb>Disabling</c> a <cy>mod</c> removes its hooks & patches and "
"calls its user-defined disable function if one exists. You may "
"still see some effects of the mod left however, and you may "
"need to <cg>restart</c> the game to have it fully unloaded.",
"<cb>Toggling</c> a mod requires you to <cg>restart</c> the game.\n"
"When a mod is <cr>disabled</c>, it will not get loaded at all.",
"OK"
)->show();
}
@ -455,19 +453,19 @@ void InvalidGeodeFileCell::FLAlert_Clicked(FLAlertLayer*, bool btn2) {
try {
if (ghc::filesystem::remove(m_info.path)) {
FLAlertLayer::create(
"File removed", "Removed <cy>" + m_info.path.string() + "</c>", "OK"
"File Removed", "Removed <cy>" + m_info.path.string() + "</c>", "OK"
)->show();
}
else {
FLAlertLayer::create(
"Unable to remove file",
"Unable to Remove File",
"Unable to remove <cy>" + m_info.path.string() + "</c>", "OK"
)->show();
}
}
catch (std::exception& e) {
FLAlertLayer::create(
"Unable to remove file",
"Unable to Remove File",
"Unable to remove <cy>" + m_info.path.string() + "</c>: <cr>" +
std::string(e.what()) + "</c>",
"OK"