35 , playsingle_controller_(pc)
36 , whiteboard_manager_(pc.get_whiteboard())
73 playsingle_controller_.end_turn();
140 symbols[
"hotkey"] = hk;
201 int prefixlen = wml_menu_hotkey_prefix.length();
202 if(cmd.
command.compare(0, prefixlen, wml_menu_hotkey_prefix) != 0) {
210 return !(**it).is_synced() || play_controller_.can_use_synced_wml_menu();
224 && (viewing_team().uses_fog() || viewing_team().uses_shroud())
225 && viewing_team_is_playing()
226 && viewing_team().is_local_human()
230 && viewing_team_is_playing()
231 && viewing_team().is_local_human()
233 && viewing_team().auto_shroud_updates() ==
false;
261 if (!i.
valid())
return false;
262 return i->move_interrupted();
290 return playsingle_controller_.get_replay_controller() && playsingle_controller_.get_replay_controller()->can_execute_command(cmd, index);
292 return playsingle_controller_.is_replay();
300 if(playsingle_controller_.is_networked_mp())
306 if(!error_log.empty() || savegame.
child_or_empty(
"snapshot")[
"replay_pos"].to_int(-1) < 0 ) {
308 _(
"The file you have tried to load is corrupt: '") +
323 if(!playsingle_controller_.is_networked_mp()) {
326 playsingle_controller_.set_player_type_changed();
void label_terrain(mouse_handler &mousehandler, bool team_only)
virtual void rename_unit()
void delete_upcoming_commands()
void show_error_message(CVideo &video, const std::string &message, bool message_use_markup)
Shows an error message to the user.
virtual void end_unit_turn()
const map_location & get_location() const
virtual void clear_labels()
void read_save_file(const std::string &name, config &cfg, std::string *error_log)
Read the complete config information out of a savefile.
events::mouse_handler mouse_handler_
virtual hotkey::ACTION_STATE get_action_state(hotkey::HOTKEY_COMMAND command, int index) const
virtual void load_autosave(const std::string &filename)
virtual void unit_hold_position()
virtual void replay_exit() override
Stores all information related to functions that can be bound to hotkeys.
void update_shroud_now(int side_num)
virtual void user_command()
virtual void whiteboard_bump_down_action()
const map_location & get_last_hex() const
const config & child_or_empty(const std::string &key) const
Returns the first child with the given key, or an empty config if there is none.
virtual void toggle_shroud_updates()
void create_unit(mouse_handler &mousehandler)
Creates a unit (in debug mode via hotkey or context menu).
const SDL_Color NORMAL_COLOR
iterator find(const std::string &id)
Returns an iterator to a menu item with the given id, if one exists.
map_location get_selected_hex() const
An extension of play_controller::hotkey_handler, which has support for SP wesnoth features like white...
events::menu_handler menu_handler_
virtual void create_unit()
virtual void whiteboard_suppose_dead()
static UNUSEDNOWARN std::string _(const char *str)
void toggle_shroud_updates(int side_num)
std::map< std::string, t_string > string_map
virtual void update_shroud_now()
Applies the planned unit map for the duration of the struct's life.
void recall(int side_num, const map_location &last_hex)
virtual void whiteboard_execute_all_actions()
void end_unit_turn(mouse_handler &mousehandler, int side_num)
void recruit(int side_num, const map_location &last_hex)
virtual bool can_execute_command(const hotkey::hotkey_command &command, int index=-1) const
Check if a command can be executed.
virtual void change_side()
Encapsulates the map of the game.
virtual void clear_messages()
Declarations for a container for wml_menu_item.
virtual void continue_move()
virtual void load_autosave(const std::string &filename)
void continue_move(mouse_handler &mousehandler, int side_num)
virtual void whiteboard_bump_up_action()
const std::string command
The command is unique.
virtual hotkey::ACTION_STATE get_action_state(hotkey::HOTKEY_COMMAND command, int index) const
virtual bool can_execute_command(const hotkey::hotkey_command &command, int index=-1) const
Check if a command can be executed.
virtual void whiteboard_toggle()
void unit_hold_position(mouse_handler &mousehandler, int side_num)
void change_side(mouse_handler &mousehandler)
std::string get_names(std::string id)
Returns a comma-separated string of hotkey names.
void kill_unit(mouse_handler &mousehandler)
virtual void whiteboard_delete_action()
virtual void ai_formula()
hotkey_handler(playsingle_controller &, saved_game &)
To store label data Class implements logic for rendering.
unit_map::iterator current_unit()
const hotkey::HOTKEY_COMMAND id
the names are strange: the "hotkey::HOTKEY_COMMAND" is named id, and the string to identify the objec...
boost::shared_ptr< wb::manager > whiteboard_manager_
virtual void label_settings()
virtual void whiteboard_execute_action()
virtual void custom_command()
This is a const_iterator class that extends an existing const_iterator by overriding dereference...
A config object defines a single node in a WML file, with access to child nodes.
virtual void repeat_recruit()
void repeat_recruit(int side_num, const map_location &last_hex)
GLsizei const GLcharARB ** string
static const hotkey_command & get_command_by_command(HOTKEY_COMMAND command)
the execute_command argument was changed from HOTKEY_COMMAND to hotkey_command, to be able to call it...
virtual void label_terrain(bool)
game_events::wmi_container & get_wml_menu_items()