Also save chat messages or commands in history

This commit is contained in:
Gunter Labes 2025-03-16 19:04:49 +01:00
parent 403fc54790
commit 11f3bbf979
No known key found for this signature in database
GPG Key ID: C0C7B971CC910216

View File

@ -682,6 +682,7 @@ void play_controller::enter_textbox()
break;
case gui::TEXTBOX_MESSAGE:
if (menu_handler_.do_speak()) {
menu_handler_.get_textbox().memorize_command(str);
menu_handler_.get_textbox().close();
}
break;
@ -707,12 +708,6 @@ void play_controller::textbox_move_vertically(bool up)
return;
}
if(menu_handler_.get_textbox().mode() == gui::TEXTBOX_MESSAGE
|| menu_handler_.get_textbox().mode() == gui::TEXTBOX_NONE) {
// Not handling messages to avoid spam
return;
}
const std::string str = menu_handler_.get_textbox().box()->text();
const std::vector<std::string>& command_history = menu_handler_.get_textbox().command_history();