more understandable prompt to save

This commit is contained in:
2025-01-11 20:12:01 -06:00
committed by Celtic Minstrel
parent bf08f03b52
commit 11767f553d
4 changed files with 11 additions and 7 deletions

View File

@@ -2661,12 +2661,16 @@ void start_dialogue_editing(short restoring) {
redraw_screen();
}
bool save_check(std::string which_dlog) {
bool save_check(std::string which_dlog, bool allow_no) {
std::string choice;
if(!change_made)
return true;
choice = cChoiceDlog(which_dlog, {"save","revert","cancel"}).show();
cChoiceDlog dlog(which_dlog, {"save","revert","cancel"});
if(!allow_no){
dlog->getControl("revert").hide();
}
choice = dlog.show();
if(choice == "revert")
return true;
else if(choice == "cancel")