more understandable prompt to save
This commit is contained in:
@@ -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")
|
||||
|
@@ -44,7 +44,7 @@ void update_mouse_spot(location the_point);
|
||||
bool monst_on_space(location loc,short m_num);
|
||||
void place_edit_special(location loc);
|
||||
void set_special(location spot_hit);
|
||||
bool save_check(std::string which_dlog);
|
||||
bool save_check(std::string which_dlog, bool allow_no = true);
|
||||
|
||||
/// Represents the action of adding a new town to the end of the list
|
||||
class aNewTown : public cAction {
|
||||
|
@@ -108,7 +108,7 @@ void launch_scenario() {
|
||||
}
|
||||
|
||||
// Prompt to save first
|
||||
if(!save_check("save-before-launch")) return;
|
||||
if(!save_check("save-before-launch", false)) return;
|
||||
|
||||
fs::path game_binary;
|
||||
#ifdef SFML_SYSTEM_MACOS
|
||||
|
Reference in New Issue
Block a user