Implement the close and revert menu choices, as well as PC editor help

- Fix storing directions in save file as control characters
This commit is contained in:
2015-02-14 13:19:52 -05:00
parent 4fbc6cfa77
commit 0aaa299642
13 changed files with 96 additions and 31 deletions

View File

@@ -2058,6 +2058,8 @@ void town_entry(location spot_hit) {
// is slot >= 0, force that slot
// if -1, use 1st free slot
void set_up_start_screen() {
reset_lb();
reset_rb();
set_lb(0,LB_TITLE,LB_NO_ACTION,"Blades of Exile");
set_lb(1,LB_TITLE,LB_NO_ACTION,"Scenario Editor");
set_lb(3,LB_TEXT,LB_NEW_SCEN,"Make New Scenario");

View File

@@ -193,7 +193,11 @@ void handle_menu_choice(eMenu item_hit) {
case eMenu::FILE_OPEN:
if(change_made && !save_check("save-before-load"))
break;
file_to_load = nav_get_scenario();
if(false)
case eMenu::FILE_REVERT:
if(change_made && cChoiceDlog("save-before-revert", {"revert", "cancel"}).show() == "cancel")
break;
file_to_load = item_hit == eMenu::FILE_OPEN ? nav_get_scenario() : scenario.scen_file;
if(!file_to_load.empty() && load_scenario(file_to_load, scenario)) {
cur_town = scenario.last_town_edited;
town = scenario.towns[cur_town];
@@ -214,6 +218,12 @@ void handle_menu_choice(eMenu item_hit) {
set_up_main_screen();
}
break;
case eMenu::FILE_CLOSE:
if(!save_check("save-before-close"))
break;
overall_mode = MODE_INTRO_SCREEN;
set_up_start_screen();
break;
case eMenu::QUIT: // quit
if(!save_check("save-before-quit"))
break;