diff --git a/src/game/boe.actions.cpp b/src/game/boe.actions.cpp index fe24b3a5..6dbe2157 100644 --- a/src/game/boe.actions.cpp +++ b/src/game/boe.actions.cpp @@ -3274,4 +3274,15 @@ void handle_new_pc_graphic() { if(choice < 6) pick_pc_graphic(choice,1,nullptr); draw_terrain(); +} + +void handle_rename_pc() { + if(recording){ + record_action("handle_rename_pc", ""); + } + short choice = char_select_pc(1,"Rename who?"); + if(choice < 6) + pick_pc_name(choice,nullptr); + put_pc_screen(); + put_item_screen(stat_window); } \ No newline at end of file diff --git a/src/game/boe.actions.hpp b/src/game/boe.actions.hpp index 7c918f5c..0e961c2e 100644 --- a/src/game/boe.actions.hpp +++ b/src/game/boe.actions.hpp @@ -56,5 +56,6 @@ void handle_drop_item(location destination, bool& need_redraw); void handle_give_item(short item_hit, bool& did_something, bool& need_redraw); void show_dialog_action(std::string xml_file); void handle_new_pc_graphic(); +void handle_rename_pc(); #endif diff --git a/src/game/boe.main.cpp b/src/game/boe.main.cpp index 55f4eb49..3f83e811 100644 --- a/src/game/boe.main.cpp +++ b/src/game/boe.main.cpp @@ -346,6 +346,8 @@ static void replay_next_action() { do_abort(); }else if(t == "handle_new_pc_graphic"){ handle_new_pc_graphic(); + }else if(t == "handle_rename_pc"){ + handle_rename_pc(); } // TODO some of these actions shouldn't call advance_time(). They should return @@ -682,12 +684,7 @@ void handle_menu_choice(eMenu item_hit) { case eMenu::OPTIONS_RENAME_PC: - // TODO record and replay - choice = char_select_pc(1,"Rename who?"); - if(choice < 6) - pick_pc_name(choice,nullptr); - put_pc_screen(); - put_item_screen(stat_window); + handle_rename_pc(); break;