record and replay preferences menu item

This commit is contained in:
2024-08-23 21:58:00 -05:00
committed by Celtic Minstrel
parent 4fcb0ba417
commit 92870587a8
4 changed files with 11 additions and 3 deletions

View File

@@ -40,6 +40,7 @@
#include "scenario/shop.hpp"
#include "tools/cursors.hpp"
#include "tools/enum_map.hpp"
#include "replay.hpp"
extern eItemWinMode stat_window;
extern eGameMode overall_mode;
@@ -1216,7 +1217,11 @@ static bool prefs_event_filter (cDialog& me, std::string id, eKeyMod) {
return true;
}
void pick_preferences() {
void pick_preferences(bool record) {
if(record && recording){
record_action("pick_preferences", "");
}
set_cursor(sword_curs);
cDialog prefsDlog(*ResMgr::dialogs.get("preferences"));

View File

@@ -20,7 +20,7 @@ void do_sign(short town_num, short which_sign, short sign_type);
void do_talk(short personality, unsigned short m_num);
void put_party_stats();
void edit_party();
void pick_preferences();
void pick_preferences(bool record = true);
void save_prefs(bool resetHelp = false);
void tip_of_day();
struct scen_header_type pick_a_scen();

View File

@@ -340,6 +340,8 @@ static void replay_next_action() {
drop_pc();
}else if(t == "new_party"){
new_party();
}else if(t == "pick_preferences"){
pick_preferences();
}
advance_time(did_something, need_redraw, need_reprint);

View File

@@ -75,7 +75,8 @@ void handle_startup_button_click(eStartButton btn, eKeyMod mods) {
break;
case STARTBTN_ORDER:
pick_preferences();
// pass false so another action is not recorded (the start button action is enough)
pick_preferences(false);
break;
case STARTBTN_CUSTOM: break; // Currently unused