mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-22 07:27:59 -05:00
fix esc not showing unsaved changes popup
This commit is contained in:
parent
ad537375fa
commit
77268271ee
1 changed files with 5 additions and 3 deletions
|
@ -290,19 +290,21 @@ bool ModSettingsPopup::hasUncommitted() const {
|
|||
}
|
||||
|
||||
void ModSettingsPopup::onClose(CCObject* sender) {
|
||||
if (sender && this->hasUncommitted()) {
|
||||
if (this->hasUncommitted()) {
|
||||
createQuickPopup(
|
||||
"Unsaved Changes",
|
||||
"You have <cr>unsaved changes</c>! Are you sure you "
|
||||
"want to exit?",
|
||||
"Cancel", "Discard",
|
||||
[this](FLAlertLayer*, bool btn2) {
|
||||
if (btn2) this->onClose(nullptr);
|
||||
if (btn2) {
|
||||
GeodePopup::onClose(nullptr);
|
||||
}
|
||||
}
|
||||
);
|
||||
return;
|
||||
}
|
||||
Popup<Mod*>::onClose(sender);
|
||||
GeodePopup::onClose(sender);
|
||||
}
|
||||
|
||||
ModSettingsPopup* ModSettingsPopup::create(Mod* mod) {
|
||||
|
|
Loading…
Reference in a new issue