Public Types | |
typedef map_command_handler < console_handler > | chmap |
Public Types inherited from events::map_command_handler< console_handler > | |
typedef void(console_handler::* | command_handler )() |
typedef std::map< std::string, command > | command_map |
typedef std::map< std::string, std::string > | command_alias_map |
Public Member Functions | |
console_handler (menu_handler &menu_handler) | |
Public Member Functions inherited from events::map_command_handler< console_handler > | |
map_command_handler () | |
virtual | ~map_command_handler () |
bool | empty () const |
void | dispatch (std::string cmd) |
std::vector< std::string > | get_commands_list () const |
void | command_failed (const std::string &message, bool=false) |
Private Attributes | |
menu_handler & | menu_handler_ |
const unsigned int | team_num_ |
Private Attributes inherited from events::map_command_handler< chat_command_handler > | |
cmd_arg_parser | cap_ |
Definition at line 1255 of file menu_events.cpp.
Definition at line 1259 of file menu_events.cpp.
|
inline |
Definition at line 1260 of file menu_events.cpp.
|
inlineprotectedvirtual |
Reimplemented from events::map_command_handler< console_handler >.
Definition at line 1275 of file menu_events.cpp.
References events::map_command_handler< console_handler >::assert_existence().
|
protected |
Definition at line 1900 of file menu_events.cpp.
References events::menu_handler::gui_, menu_handler_, and display::toggle_benchmark().
Referenced by init_map().
|
protected |
Definition at line 1925 of file menu_events.cpp.
References _(), config::child_range(), events::menu_handler::game_config_, events::menu_handler::gamedata(), play_controller::get_mp_settings(), events::menu_handler::gui_, menu_handler_, mp_game_settings::mp_scenario, next, game_data::next_scenario(), preferences::options(), events::menu_handler::pc_, synced_context::run_and_throw(), gui2::tsimple_item_selector::selected_index(), gui2::tsimple_item_selector::set_selected_index(), gui2::tdialog::show(), sort(), and display::video().
Referenced by init_map().
|
protected |
Definition at line 1784 of file menu_events.cpp.
References display_chat_manager::clear_chat_messages(), game_display::get_chat_manager(), events::menu_handler::gui_, and menu_handler_.
Referenced by init_map().
|
protected |
Definition at line 1720 of file menu_events.cpp.
References gui::floating_textbox::close(), events::map_command_handler< console_handler >::command_failed(), events::map_command_handler< console_handler >::command_failed_need_arg(), get_arg(), events::menu_handler::gui_, play_controller::is_networked_mp(), lexical_cast(), menu_handler_, events::menu_handler::pc_, events::menu_handler::request_control_change(), resources::teams, events::menu_handler::teams(), events::menu_handler::textbox_info_, and vgettext().
Referenced by init_map().
|
protected |
Definition at line 2074 of file menu_events.cpp.
References events::menu_handler::gui_, menu_handler_, gui2::tdialog::show(), and display::video().
Referenced by init_map().
|
protected |
Definition at line 1754 of file menu_events.cpp.
References events::map_command_handler< console_handler >::command_failed(), get_arg(), get_cmd(), lexical_cast(), menu_handler_, print(), report(), events::menu_handler::teams(), and vgettext().
Referenced by init_map().
|
protected |
Implements the (debug mode) console command that creates a unit.
Definition at line 2122 of file menu_events.cpp.
References _(), events::map_command_handler< console_handler >::command_failed(), unit_type_data::find(), get_data(), events::mouse_handler::get_last_hex(), play_controller::get_mouse_handler_base(), events::menu_handler::gui_, events::menu_handler::map(), menu_handler_, gamemap::on_board(), events::menu_handler::pc_, unit_types, and events::menu_handler::units().
Referenced by init_map().
|
protected |
Definition at line 2021 of file menu_events.cpp.
References get_data(), and preferences::set_custom_command().
Referenced by init_map().
|
protected |
Definition at line 1986 of file menu_events.cpp.
References _(), events::map_command_handler< console_handler >::command_failed(), game_config::debug, get_cmd(), play_controller::is_networked_mp(), menu_handler_, game_config::mp_debug, events::menu_handler::pc_, and print().
Referenced by init_map().
|
protected |
Definition at line 2107 of file menu_events.cpp.
References preferences::encountered_units(), i, unit_type_data::types(), and unit_types.
Referenced by init_map().
|
protected |
Definition at line 1629 of file menu_events.cpp.
References gui::floating_textbox::close(), events::map_command_handler< console_handler >::command_failed(), get_arg(), events::menu_handler::gui_, menu_handler_, events::menu_handler::pc_, team_num_, events::menu_handler::teams(), events::menu_handler::textbox_info_, and vgettext().
Referenced by init_map().
|
protected |
Definition at line 2148 of file menu_events.cpp.
References get_data(), and synced_context::run_and_throw().
Referenced by init_map().
|
protected |
Definition at line 2139 of file menu_events.cpp.
References synced_context::run_and_throw().
Referenced by init_map().
|
protected |
Definition at line 1792 of file menu_events.cpp.
References events::menu_handler::gui_, menu_handler_, and display::toggle_debug_foreground().
Referenced by init_map().
|
protected |
Definition at line 1897 of file menu_events.cpp.
References preferences::set_show_fps(), and preferences::show_fps().
Referenced by init_map().
|
protected |
Definition at line 2145 of file menu_events.cpp.
References get_data(), and synced_context::run_and_throw().
Referenced by init_map().
|
protected |
Definition at line 1668 of file menu_events.cpp.
References gui::floating_textbox::close(), events::map_command_handler< console_handler >::command_failed(), get_arg(), events::menu_handler::gui_, menu_handler_, events::menu_handler::pc_, team_num_, events::menu_handler::teams(), events::menu_handler::textbox_info_, and vgettext().
Referenced by init_map().
|
protected |
Definition at line 1913 of file menu_events.cpp.
References get_data(), and game_config::ignore_replay_errors.
Referenced by init_map().
|
protected |
Definition at line 2068 of file menu_events.cpp.
References vconfig::empty_vconfig(), events::menu_handler::gui_, menu_handler_, gui2::tdialog::show(), and display::video().
Referenced by init_map().
|
protected |
Definition at line 1796 of file menu_events.cpp.
References _(), terrain_builder::rule_image::basex, terrain_builder::rule_image::basey, terrain_builder::rule_image::center_x, terrain_builder::rule_image::center_y, COLUMN_SEPARATOR, sdl::create_rect(), terrain_builder::tile::flags, display::get_builder(), image::locator::get_center_x(), image::locator::get_center_y(), image::locator::get_filename(), image::get_image(), events::mouse_handler::get_last_hex(), image::locator::get_loc(), play_controller::get_mouse_handler_base(), terrain_builder::get_tile(), display::get_time_of_day(), events::menu_handler::gui_, HEADING_PREFIX, time_of_day::id, IMAGE_PREFIX, terrain_builder::rule_image_variant::images, IMG_TEXT_SEPARATOR, lg::info(), sdl::intersect_rects(), terrain_builder::rule_image::is_background(), utils::join(), terrain_builder::rule_image::layer, menu_handler_, gui::OK_CANCEL, events::menu_handler::pc_, terrain_builder::tile::rebuild_cache(), gui::dialog::set_menu(), surf, game_config::tile_size, map_location::valid(), display::video(), map_location::x, and map_location::y.
Referenced by init_map().
|
protected |
Definition at line 2000 of file menu_events.cpp.
References events::menu_handler::gamestate(), get_data(), game_state::lua_kernel_, menu_handler_, and synced_context::run_and_throw().
Referenced by init_map().
|
protected |
Definition at line 1920 of file menu_events.cpp.
References get_data(), and synced_context::run_and_throw().
Referenced by init_map().
|
protected |
Definition at line 1994 of file menu_events.cpp.
References _(), game_config::debug, get_cmd(), and print().
Referenced by init_map().
|
protected |
Definition at line 1916 of file menu_events.cpp.
References game_config::disable_autosave, and get_data().
Referenced by init_map().
|
protected |
Definition at line 1910 of file menu_events.cpp.
References throw_quit_game_exception().
Referenced by do_save_quit(), and init_map().
|
protected |
Definition at line 1621 of file menu_events.cpp.
References display::create_buttons(), image::flush_cache(), events::menu_handler::gui_, menu_handler_, and display::redraw_everything().
Referenced by init_map().
|
protected |
Definition at line 1903 of file menu_events.cpp.
References play_controller::do_consolesave(), get_data(), menu_handler_, and events::menu_handler::pc_.
Referenced by do_save_quit(), and init_map().
|
protected |
Definition at line 1906 of file menu_events.cpp.
References do_quit(), and do_save().
Referenced by init_map().
|
protected |
Definition at line 2024 of file menu_events.cpp.
References preferences::add_alias(), gui2::event::find(), events::map_command_handler< console_handler >::get_actual_cmd(), get_cmd(), get_data(), print(), register_alias(), and preferences::write_preferences().
Referenced by init_map().
|
protected |
Definition at line 2047 of file menu_events.cpp.
References _(), events::map_command_handler< console_handler >::command_failed(), events::map_command_handler< console_handler >::command_failed_need_arg(), gui2::event::find(), get_data(), and synced_context::run_and_throw().
Referenced by init_map().
|
protected |
Definition at line 2063 of file menu_events.cpp.
References events::menu_handler::gamedata(), get_data(), game_data::get_variable_const(), events::menu_handler::gui_, menu_handler_, and gui2::show_transient_message().
Referenced by init_map().
|
protected |
Definition at line 2142 of file menu_events.cpp.
References synced_context::run_and_throw().
Referenced by init_map().
|
protected |
Definition at line 1787 of file menu_events.cpp.
References get_data(), events::menu_handler::gui_, menu_handler_, gui2::twindow::set_sunset(), and display::sunset().
Referenced by init_map().
|
protected |
Definition at line 1706 of file menu_events.cpp.
References events::menu_handler::gui_, menu_handler_, preferences::show_theme_dialog(), and display::video().
Referenced by init_map().
|
protected |
Definition at line 2151 of file menu_events.cpp.
References display::get_draw_coordinates(), events::menu_handler::gui_, display::invalidate_all(), menu_handler_, and display::set_draw_coordinates().
Referenced by init_map().
|
protected |
Definition at line 2155 of file menu_events.cpp.
References display::get_draw_terrain_codes(), events::menu_handler::gui_, display::invalidate_all(), menu_handler_, and display::set_draw_terrain_codes().
Referenced by init_map().
|
protected |
Definition at line 2160 of file menu_events.cpp.
References _(), get_cmd(), play_controller::get_whiteboard(), menu_handler_, events::menu_handler::pc_, and print().
Referenced by init_map().
|
protected |
Definition at line 1968 of file menu_events.cpp.
References events::menu_handler::gamestate(), get_data(), menu_handler_, synced_context::run_and_throw(), game_state::tod_manager_, and tod_manager::turn().
Referenced by init_map().
|
protected |
Definition at line 1980 of file menu_events.cpp.
References get_data(), and synced_context::run_and_throw().
Referenced by init_map().
|
protected |
Definition at line 2113 of file menu_events.cpp.
References _(), gui2::twindow::CANCEL, preferences::encountered_units(), events::menu_handler::gui_, menu_handler_, gui2::show_message(), and gui2::tmessage::yes_no_buttons.
Referenced by init_map().
|
protected |
Definition at line 2080 of file menu_events.cpp.
References events::map_command_handler< console_handler >::command_failed(), events::commands_disabled, events::menu_handler::current_unit(), unit_map::end(), get_arg(), get_data(), i, menu_handler_, parameters, synced_context::run_and_throw(), utils::split(), utils::STRIP_SPACES, events::menu_handler::units(), VGETTEXT, map_location::x, and map_location::y.
Referenced by init_map().
|
protected |
Definition at line 2007 of file menu_events.cpp.
References _(), events::menu_handler::gamestate(), get_cmd(), events::menu_handler::gui_, game_state::lua_kernel_, menu_handler_, gui2::twindow::OK, gui2::tmessage::ok_cancel_buttons, print(), gui2::show_message(), and display::video().
Referenced by init_map().
|
protected |
Definition at line 2172 of file menu_events.cpp.
References play_controller::get_whiteboard(), menu_handler_, and events::menu_handler::pc_.
Referenced by init_map().
|
inlineprotectedvirtual |
Reimplemented from events::map_command_handler< console_handler >.
Definition at line 1283 of file menu_events.cpp.
References events::map_command_handler< console_handler >::get_arg().
Referenced by do_control(), do_controller(), do_droid(), do_idle(), and do_unit().
|
inlineprotectedvirtual |
Reimplemented from events::map_command_handler< console_handler >.
Definition at line 1287 of file menu_events.cpp.
References events::map_command_handler< console_handler >::get_cmd().
Referenced by do_controller(), do_debug(), do_nodebug(), do_set_alias(), do_toggle_whiteboard(), and do_unsafe_lua().
|
inlineprotected |
Definition at line 1353 of file menu_events.cpp.
References _(), and schema_validation::space.
|
inlineprotectedvirtual |
Reimplemented from events::map_command_handler< console_handler >.
Definition at line 1291 of file menu_events.cpp.
References events::map_command_handler< console_handler >::get_data().
Referenced by do_create(), do_custom(), do_event(), do_gold(), do_ignore_replay_errors(), do_lua(), do_next_level(), do_nosaves(), do_save(), do_set_alias(), do_set_var(), do_show_var(), do_sunset(), do_turn(), do_turn_limit(), and do_unit().
|
inlineprotectedvirtual |
Reimplemented from events::chat_command_handler.
Definition at line 1349 of file menu_events.cpp.
References _().
|
inlineprotectedvirtual |
Reimplemented from events::chat_command_handler.
Definition at line 1373 of file menu_events.cpp.
References _(), do_benchmark(), do_choose_level(), do_clear(), do_control(), do_control_dialog(), do_controller(), do_create(), do_custom(), do_debug(), do_discover(), do_droid(), do_event(), do_fog(), do_foreground(), do_fps(), do_gold(), do_idle(), do_ignore_replay_errors(), do_inspect(), do_layers(), do_lua(), do_next_level(), do_nodebug(), do_nosaves(), do_quit(), do_refresh(), do_save(), do_save_quit(), do_set_alias(), do_set_var(), do_show_var(), do_shroud(), do_sunset(), do_theme(), do_toggle_draw_coordinates(), do_toggle_draw_terrain_codes(), do_toggle_whiteboard(), do_turn(), do_turn_limit(), do_undiscover(), do_unit(), do_unsafe_lua(), do_whiteboard_options(), preferences::get_alias(), events::map_command_handler< console_handler >::get_command(), events::chat_command_handler::init_map(), register_alias(), register_command(), and events::map_command_handler< console_handler >::set_cmd_prefix().
|
inlineprotected |
Definition at line 1362 of file menu_events.cpp.
References game_config::debug, synced_context::get_synced_state(), preferences::is_authenticated(), play_controller::is_networked_mp(), menu_handler_, events::menu_handler::pc_, and synced_context::UNSYNCED.
|
inlineprotectedvirtual |
Reimplemented from events::chat_command_handler.
Definition at line 1369 of file menu_events.cpp.
References events::menu_handler::add_chat_message(), and menu_handler_.
Referenced by do_controller(), do_debug(), do_nodebug(), do_set_alias(), do_toggle_whiteboard(), and do_unsafe_lua().
|
inlineprotectedvirtual |
Reimplemented from events::map_command_handler< console_handler >.
Definition at line 1278 of file menu_events.cpp.
References events::map_command_handler< console_handler >::register_alias().
Referenced by do_set_alias(), and init_map().
|
inlineprotectedvirtual |
Reimplemented from events::map_command_handler< chat_command_handler >.
Definition at line 1269 of file menu_events.cpp.
References events::map_command_handler< console_handler >::register_command().
Referenced by init_map().
|
private |
Definition at line 1491 of file menu_events.cpp.
Referenced by do_benchmark(), do_choose_level(), do_clear(), do_control(), do_control_dialog(), do_controller(), do_create(), do_debug(), do_droid(), do_foreground(), do_idle(), do_inspect(), do_layers(), do_lua(), do_refresh(), do_save(), do_show_var(), do_sunset(), do_theme(), do_toggle_draw_coordinates(), do_toggle_draw_terrain_codes(), do_toggle_whiteboard(), do_turn(), do_undiscover(), do_unit(), do_unsafe_lua(), do_whiteboard_options(), is_enabled(), and print().
|
private |
Definition at line 1492 of file menu_events.cpp.
Referenced by do_droid(), and do_idle().