added a hotkey for clearing the chat messages (patch #770)
This commit is contained in:
parent
31f423668c
commit
21a6dd7b43
9 changed files with 85 additions and 0 deletions
|
@ -44,6 +44,7 @@ Version 1.3.6+svn:
|
|||
observing (bug #9610)
|
||||
* 'help' and 'more' button in the title screen now also have a tooltip
|
||||
(bug #9618 patch #790)
|
||||
* added a hotkey for clearing the chat messages (patch #770)
|
||||
* WML engine:
|
||||
* now [base_unit]id= inside [unit] can extend upon existing unit types
|
||||
* new tag [filter_radius] to allow greater control over radius expansion
|
||||
|
|
|
@ -25,6 +25,7 @@ Version 1.3.6+svn:
|
|||
menu commands for chat, saving games, etc. are available. Clicking
|
||||
end-of-turn ends the linger and takes you out.
|
||||
* The 'more' and 'help' button in the title screen now have a tooltip.
|
||||
* Added a hotkey for clearing the chat messages.
|
||||
|
||||
* Miscellaneous
|
||||
* Isle of Anduin renamed to Isle of Alduin to avoid copyright problems.
|
||||
|
|
|
@ -131,6 +131,11 @@ const struct {
|
|||
{ hotkey::HOTKEY_LANGUAGE, "changelanguage", N_("Change the language"), true },
|
||||
|
||||
{ hotkey::HOTKEY_USER_CMD, "command", N_("Enter user command"), false },
|
||||
{ hotkey::HOTKEY_USER_CMD_1, "clearmessages", N_("Clear messages"), false },
|
||||
#ifdef USRCMD2
|
||||
{ hotkey::HOTKEY_USER_CMD_2, "usercommand#2", N_("User-Command#2"), false },
|
||||
{ hotkey::HOTKEY_USER_CMD_3, "usercommand#3", N_("User-Command#3"), false },
|
||||
#endif
|
||||
{ hotkey::HOTKEY_NULL, NULL, NULL, true }
|
||||
};
|
||||
|
||||
|
@ -631,6 +636,21 @@ bool command_executor::execute_command(HOTKEY_COMMAND command, int /*index*/)
|
|||
case HOTKEY_USER_CMD:
|
||||
user_command();
|
||||
break;
|
||||
//%%
|
||||
case HOTKEY_USER_CMD_1:
|
||||
user_command_1();
|
||||
break;
|
||||
#ifdef USRCMD2
|
||||
case HOTKEY_USER_CMD_2:
|
||||
//user_command();
|
||||
user_command_2();
|
||||
break;
|
||||
case HOTKEY_USER_CMD_3:
|
||||
//user_command();
|
||||
user_command_3();
|
||||
break;
|
||||
#endif
|
||||
|
||||
case HOTKEY_EDIT_SET_TERRAIN:
|
||||
edit_set_terrain();
|
||||
break;
|
||||
|
@ -691,6 +711,7 @@ bool command_executor::execute_command(HOTKEY_COMMAND command, int /*index*/)
|
|||
case HOTKEY_EDIT_AUTO_UPDATE:
|
||||
edit_auto_update();
|
||||
break;
|
||||
|
||||
case HOTKEY_LANGUAGE:
|
||||
change_language();
|
||||
break;
|
||||
|
|
|
@ -60,6 +60,11 @@ enum HOTKEY_COMMAND {
|
|||
|
||||
//misc.
|
||||
HOTKEY_USER_CMD,
|
||||
HOTKEY_USER_CMD_1,
|
||||
#ifdef USRCMD2
|
||||
HOTKEY_USER_CMD_2,
|
||||
HOTKEY_USER_CMD_3,
|
||||
#endif
|
||||
HOTKEY_NULL
|
||||
};
|
||||
|
||||
|
@ -190,6 +195,11 @@ public:
|
|||
virtual void show_help() {}
|
||||
virtual void show_chat_log() {}
|
||||
virtual void user_command() {}
|
||||
virtual void user_command_1() {}
|
||||
#ifdef USRCMD2
|
||||
virtual void user_command_2() {}
|
||||
virtual void user_command_3() {}
|
||||
#endif
|
||||
virtual void change_language() {}
|
||||
virtual void play_replay() {}
|
||||
virtual void reset_replay() {}
|
||||
|
|
|
@ -1970,6 +1970,29 @@ namespace events{
|
|||
{
|
||||
textbox_info_.show(gui::TEXTBOX_COMMAND,sgettext("prompt^Command:"), "", false, *gui_);
|
||||
}
|
||||
//%%
|
||||
void menu_handler::user_command_1()
|
||||
{
|
||||
gui_->clear_chat_messages(); // clear messages
|
||||
}
|
||||
|
||||
#ifdef USRCMD2
|
||||
// not used yet - for future hotkey-commands:
|
||||
void menu_handler::user_command_2()
|
||||
{
|
||||
gui::message_dialog(*gui_, "Test", "User-Command#2").show();
|
||||
//sound::play_bell(game_config::sounds::turn_bell);
|
||||
sound::play_bell("bell.wav");
|
||||
}
|
||||
|
||||
void menu_handler::user_command_3()
|
||||
{
|
||||
gui::message_dialog(*gui_, "Info", _("User-Command#3")).show();
|
||||
//gui::show_error_message(disp(), "User-Command#3");
|
||||
//sound::play_sound("heal.wav");
|
||||
sound::play_sound("select.wav");
|
||||
}
|
||||
#endif
|
||||
|
||||
void menu_handler::change_side_controller(const std::string& side, const std::string& player, bool own_side)
|
||||
{
|
||||
|
|
|
@ -105,6 +105,11 @@ public:
|
|||
void end_unit_turn(mouse_handler& mousehandler, const unsigned int team_num);
|
||||
void search();
|
||||
void user_command();
|
||||
void user_command_1();
|
||||
#ifdef USRCMD2
|
||||
void user_command_2();
|
||||
void user_command_3();
|
||||
#endif
|
||||
|
||||
unit_map::iterator current_unit(mouse_handler& mousehandler);
|
||||
unit_map::const_iterator current_unit(const mouse_handler& mousehandler) const;
|
||||
|
|
|
@ -505,6 +505,11 @@ bool play_controller::can_execute_command(hotkey::HOTKEY_COMMAND command, int in
|
|||
case hotkey::HOTKEY_SEARCH:
|
||||
case hotkey::HOTKEY_HELP:
|
||||
case hotkey::HOTKEY_USER_CMD:
|
||||
case hotkey::HOTKEY_USER_CMD_1:
|
||||
#ifdef USRCMD2
|
||||
case hotkey::HOTKEY_USER_CMD_2:
|
||||
case hotkey::HOTKEY_USER_CMD_3:
|
||||
#endif
|
||||
return true;
|
||||
|
||||
case hotkey::HOTKEY_SAVE_GAME:
|
||||
|
|
|
@ -116,6 +116,20 @@ void playsingle_controller::user_command(){
|
|||
menu_handler_.user_command();
|
||||
}
|
||||
|
||||
void playsingle_controller::user_command_1(){
|
||||
menu_handler_.user_command_1(); // clear messages
|
||||
}
|
||||
|
||||
#ifdef USRCMD2
|
||||
void playsingle_controller::user_command_2(){
|
||||
menu_handler_.user_command_2();
|
||||
}
|
||||
|
||||
void playsingle_controller::user_command_3(){
|
||||
menu_handler_.user_command_3();
|
||||
}
|
||||
#endif
|
||||
|
||||
LEVEL_RESULT playsingle_controller::play_scenario(const std::vector<config*>& story, upload_log& log,
|
||||
bool skip_replay)
|
||||
{
|
||||
|
|
|
@ -52,6 +52,11 @@ public:
|
|||
virtual void unit_hold_position();
|
||||
virtual void end_unit_turn();
|
||||
virtual void user_command();
|
||||
virtual void user_command_1();
|
||||
#ifdef USRCMD2
|
||||
virtual void user_command_2();
|
||||
virtual void user_command_3();
|
||||
#endif
|
||||
void linger(upload_log& log);
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Add table
Reference in a new issue