The Battle for Wesnoth  1.19.0-dev
Namespaces | Classes | Typedefs | Functions | Variables
gui2::dialogs Namespace Reference

Namespaces

 tip
 

Classes

class  achievements_dialog
 This shows a dialog displaying achievements. More...
 
class  addon_auth
 This shows the dialog to provide a password when uploading an add-on. More...
 
class  addon_connect
 This shows the dialog for managing addons and connecting to the addon server. More...
 
class  install_dependencies
 
class  addon_license_prompt
 
class  addon_manager
 Shows the list of addons on the server available for installation. More...
 
class  addon_uninstall_list
 Dialog with a checkbox list for choosing installed add-ons to remove. More...
 
class  attack_predictions
 
class  campaign_difficulty
 The campaign mode difficulty menu. More...
 
class  campaign_selection
 This shows the dialog which allows the user to choose which campaign to play. More...
 
class  chat_log
 
class  core_selection
 This shows the dialog which allows the user to choose which core to play. More...
 
class  debug_clock
 Clock to test the draw events. More...
 
class  depcheck_confirm_change
 Asks the user to confirm a change required to proceed. More...
 
class  depcheck_select_new
 Offers a list of compatible items if a currently selected one is incompatible. More...
 
class  drop_down_menu
 Used by the menu_button widget. More...
 
class  edit_label
 Dialog for editing gamemap labels. More...
 
class  edit_text
 Dialog for renaming units in-game. More...
 
class  editor_choose_addon
 Dialog for adding a translation while editing an add-on's _server.pbl. More...
 
class  custom_tod
 This shows the dialog to modify tod schedules. More...
 
class  editor_edit_label
 Dialog for editing gamemap labels. More...
 
class  editor_edit_pbl
 Dialog for editing an add-on's _server.pbl. More...
 
class  editor_edit_pbl_translation
 Dialog for adding a translation while editing an add-on's _server.pbl. More...
 
class  editor_edit_scenario
 Dialog for editing gamemap scenarios. More...
 
class  editor_edit_side
 Dialog for editing gamemap sides. More...
 
class  editor_generate_map
 The dialog for selecting which random generator to use in the editor. More...
 
class  generator_settings
 
class  editor_new_map
 
class  editor_resize_map
 This shows the dialog to resize the current map. More...
 
class  tod_new_schedule
 Dialog that takes new schedule ID and name from the player. More...
 
class  end_credits
 
class  file_dialog
 
class  file_progress
 
class  folder_create
 Dialog for providing the name of a new folder to create. More...
 
class  bookmark_create
 
class  formula_debugger
 This shows the debugger for the formulas. More...
 
class  game_cache_options
 A Preferences subdialog including a report on the location and size of the game's WML cache, buttons to copy its path to clipboard or browse to it, and the possibility of clearing stale files from the cache or purging it entirely. More...
 
class  game_delete
 This shows the dialog to confirm deleting a savegame file. More...
 
class  game_load
 This shows the dialog to select and load a savegame file. More...
 
class  game_save
 This shows the dialog to create a savegame file. More...
 
class  game_save_message
 
class  game_save_oos
 
class  game_stats
 
class  game_version
 Dialog displaying the various paths used by the game to locate resource and configuration files. More...
 
class  stuff_list_adder
 
class  single_mode_controller
 
class  variable_mode_controller
 
class  event_mode_controller
 
class  unit_mode_controller
 
class  team_mode_controller
 
class  gamestate_inspector
 This shows the gamestate inspector. More...
 
class  help_browser
 Help browser dialog. More...
 
class  hotkey_bind
 
class  label_settings
 
class  language_selection
 This shows the dialog to select the language to use. More...
 
class  loading_screen
 
class  log_settings
 
class  lua_interpreter
 
struct  message_implementation
 Helper to implement private functions without modifying the header. More...
 
class  message
 Main class to show messages to the user. More...
 
class  migrate_version_selection
 This shows the dialog to select a previous version of Wesnoth to migrate preferences from and redownload add-ons. More...
 
class  modal_dialog
 Abstract base class for all modal dialogs. More...
 
class  modeless_dialog
 The popup class shows windows that are shown non-modal. More...
 
class  faction_select
 
struct  lobby_delay_gamelist_update_guard
 
class  mp_lobby
 
class  mp_match_history
 
class  mp_alerts_options
 A Preferences subdialog permitting to configure the sounds and notifications generated in response to various mp lobby / game events. More...
 
class  mp_change_control
 This shows the multiplayer change control dialog. More...
 
class  mp_connect
 This shows the dialog to the MP server to connect to. More...
 
class  mp_create_game
 
class  mp_host_game_prompt
 This shows the dialog to confirm deleting a savegame file. More...
 
class  mp_join_game
 
class  mp_join_game_password_prompt
 Dialog for entering a password for joining a password-protected MP game. More...
 
class  mp_login
 This shows the dialog to log in to the MP server. More...
 
class  mp_method_selection
 This shows the dialog to select the kind of MP game the user wants to play. More...
 
class  mp_options_helper
 
class  mp_report
 This shows a dialog to report players on the multiplayer server. More...
 
class  mp_staging
 
class  lobby_player_info
 
class  plugin_executor
 
class  synched_choice_wait
 
class  network_transmission
 Dialog that tracks network transmissions. More...
 
class  outro
 Dialog to display 'The End' at the end of a campaign. More...
 
class  preferences_dialog
 
class  prompt
 Dialog for getting a single text value from the player. More...
 
class  screenshot_notification
 Notification dialog used after saving a game or map screenshot to display information about it for the user. More...
 
class  select_orb_colors
 
class  server_info
 
class  simple_item_selector
 A simple one-column listbox with OK and Cancel buttons. More...
 
class  sp_options_configure
 
struct  hitrate_table_element
 
class  statistics_dialog
 
class  story_viewer
 Dialog to view the storyscreen. More...
 
class  surrender_quit
 This shows the dialog to confirm surrender and/or quitting the game. More...
 
class  terrain_layers
 
class  theme_list
 Dialog for selecting a GUI theme. More...
 
class  title_screen
 This class implements the title screen. More...
 
class  tooltip
 Class to show the tips. More...
 
class  transient_message
 Shows a transient message. More...
 
class  unit_advance
 
class  unit_attack
 This shows the dialog for attacking units. More...
 
class  unit_create
 This shows the debug-mode dialog to create new units on the map. More...
 
class  unit_list
 
class  unit_recall
 
class  unit_recruit
 
class  wml_error
 WML preprocessor/parser error report dialog. More...
 
class  wml_message_option
 Helper class for message options. More...
 
class  wml_message_base
 Base class for the wml generated messages. More...
 
class  wml_message_left
 Shows a dialog with the portrait on the left side. More...
 
class  wml_message_right
 Shows a dialog with the portrait on the right side. More...
 
class  wml_message_double
 Shows a dialog with two portraits, one on each side. More...
 
struct  wml_message_options
 Parameter pack for message list input options. More...
 
struct  wml_message_input
 Parameter pack for message text input options. More...
 
struct  wml_message_portrait
 Parameter pack for message portrait. More...
 

Typedefs

using hp_probability_vector = std::vector< std::pair< int, double > >
 
using avp = preferences::advanced_manager::option
 
using btn_callback = std::function< void()>
 

Functions

static std::string describe_status_verbose (const addon_tracking_info &state)
 
static std::string format_addon_time (std::time_t time)
 
static std::string get_probability_string (const double prob)
 
config generate_difficulty_config (const config &source)
 Helper function to convert old difficulty markup. More...
 
static custom_tod::string_pair tod_getter_image (const time_of_day &tod)
 
static custom_tod::string_pair tod_getter_mask (const time_of_day &tod)
 
static custom_tod::string_pair tod_getter_sound (const time_of_day &tod)
 
static int resize_grid_xy_to_idx (const int x, const int y)
 Convert a coordinate on a 3 by 3 grid to an index, return 9 for out of bounds. More...
 
 REGISTER_DIALOG (tod_new_schedule)
 
static bool get_dont_ask_again ()
 Helper to invert preferences::ask_delete_saves. More...
 
static void set_dont_ask_again (const bool ask_again)
 Helper to invert preferences::set_ask_delete_saves. More...
 
static std::string controller_name (const team &t)
 
static stuff_list_adder add_unit_entry (stuff_list_adder &progress, const unit &u, const display_context &dc)
 
static toggle_buttonsetup_pref_toggle_button (const std::string &id, bool def, window &window)
 
static void setup_item (const std::string &item, window &window)
 
static void set_pref_and_button (const std::string &id, bool value, window &window)
 
static void revert_to_default_pref_values (window &window)
 
static bool get_do_not_show_again ()
 Helper for preferences::ask_delete_saves. More...
 
static void set_do_not_show_again (const bool do_not_show_again)
 Helper for preferences::set_ask_delete_saves. More...
 
static std::string generate_user_description (const config &side)
 
static std::ostream & write_actual_and_expected (std::ostream &str, const long long actual, const double expected)
 
static hitrate_table_element tally (const statistics_t::stats::hitrate_map &by_cth, const bool more_is_better)
 
static config get_title_area_decor_config ()
 
static void register_button (window &win, const std::string &id, hotkey::HOTKEY_COMMAND hk, btn_callback callback)
 
static void launch_lua_console ()
 
static void make_screenshot ()
 
static std::string format_level_string (const int level)
 
static std::string format_if_leader (unit_const_ptr u, const std::string &str)
 
static std::string format_movement_string (unit_const_ptr u)
 
void show_unit_list (display &gui)
 
template<typename T >
static void dump_recall_list_to_console (const T &units)
 
static const std::string maybe_inactive (const std::string &str, bool active)
 
static std::string format_level_string (const int level, bool recallable)
 
static std::string format_cost_string (int unit_recall_cost, const int team_recall_cost)
 
static std::string get_title_suffix (int side_num)
 
static std::string gray_if_unrecruitable (const std::string &text, const bool is_recruitable)
 
int show_wml_message (const std::string &title, const std::string &message, const wml_message_portrait *left, const wml_message_portrait *right, const wml_message_options &options, const wml_message_input &input)
 Helper function to show a portrait. More...
 
std::string get_modal_dialog_id (const modal_dialog &dialog)
 
std::string get_modeless_dialog_id (const modeless_dialog &dialog)
 

Variables

const std::array type_values
 
const std::array tag_values
 
static int max_coastal = 5
 
static int extra_size_per_player = 2
 
static int min_size = 20
 
static const int LOAD_GAME = 100
 
static const std::string forum_registration_url = "https://forums.wesnoth.org/ucp.php?mode=register"
 
static const unsigned int LAYER_BACKGROUND = 1
 
static const unsigned int LAYER_TEXT = 2
 
bool show_debug_clock_button = false
 Do we wish to show the button for the debug clock. More...
 
static listbox::order_pair sort_last {-1, sort_order::type::none}
 
static listbox::order_pair sort_default { 2, sort_order::type::descending}
 
static const color_t inactive_row_color (0x96, 0x96, 0x96)
 
static const color_t inactive_row_color (0x96, 0x96, 0x96)
 

Typedef Documentation

◆ avp

Definition at line 110 of file preferences_dialog.cpp.

◆ btn_callback

using gui2::dialogs::btn_callback = typedef std::function<void()>

Definition at line 86 of file title_screen.cpp.

◆ hp_probability_vector

using gui2::dialogs::hp_probability_vector = typedef std::vector<std::pair<int, double> >

Definition at line 33 of file attack_predictions.hpp.

Function Documentation

◆ add_unit_entry()

static stuff_list_adder gui2::dialogs::add_unit_entry ( stuff_list_adder progress,
const unit u,
const display_context dc 
)
static

◆ controller_name()

static std::string gui2::dialogs::controller_name ( const team t)
static

Definition at line 61 of file game_stats.cpp.

References _(), names, and t.

Referenced by gui2::dialogs::game_stats::pre_show(), and ng::side_engine::set_controller_commandline().

◆ describe_status_verbose()

static std::string gui2::dialogs::describe_status_verbose ( const addon_tracking_info state)
static

◆ dump_recall_list_to_console()

template<typename T >
static void gui2::dialogs::dump_recall_list_to_console ( const T &  units)
static

Definition at line 68 of file unit_recall.cpp.

References log_display, LOG_DP, and log_scope2.

Referenced by gui2::dialogs::unit_recall::dismiss_unit().

◆ format_addon_time()

static std::string gui2::dialogs::format_addon_time ( std::time_t  time)
static

◆ format_cost_string()

static std::string gui2::dialogs::format_cost_string ( int  unit_recall_cost,
const int  team_recall_cost 
)
static

Definition at line 112 of file unit_recall.cpp.

Referenced by gui2::dialogs::unit_recall::pre_show().

◆ format_if_leader()

static std::string gui2::dialogs::format_if_leader ( unit_const_ptr  u,
const std::string &  str 
)
static

Definition at line 64 of file unit_list.cpp.

Referenced by gui2::dialogs::unit_list::pre_show().

◆ format_level_string() [1/2]

static std::string gui2::dialogs::format_level_string ( const int  level)
static

◆ format_level_string() [2/2]

static std::string gui2::dialogs::format_level_string ( const int  level,
bool  recallable 
)
static

◆ format_movement_string()

static std::string gui2::dialogs::format_movement_string ( unit_const_ptr  u)
static

Definition at line 69 of file unit_list.cpp.

References moves_left.

Referenced by gui2::dialogs::unit_list::pre_show().

◆ generate_difficulty_config()

config gui2::dialogs::generate_difficulty_config ( const config source)

Helper function to convert old difficulty markup.

Declared outside class to allow other classes to make use of it.

Definition at line 38 of file campaign_difficulty.cpp.

References config::append_children(), deprecated_message(), config::empty(), and REMOVED.

Referenced by gui2::dialogs::campaign_selection::campaign_selected(), and mp::game_info::game_info().

◆ generate_user_description()

static std::string gui2::dialogs::generate_user_description ( const config side)
static

Definition at line 209 of file mp_join_game.cpp.

References _(), config::get(), and VGETTEXT.

Referenced by gui2::dialogs::mp_join_game::generate_side_list().

◆ get_do_not_show_again()

static bool gui2::dialogs::get_do_not_show_again ( )
static

◆ get_dont_ask_again()

static bool gui2::dialogs::get_dont_ask_again ( )
static

Helper to invert preferences::ask_delete_saves.

The value stored and the way shown is inverted.

Definition at line 30 of file game_delete.cpp.

References preferences::ask_delete_saves().

Referenced by gui2::dialogs::game_delete::game_delete().

◆ get_modal_dialog_id()

std::string gui2::dialogs::get_modal_dialog_id ( const modal_dialog dialog)

This is used in the unit tests, but these implementation details shouldn't be used in the normal code.

Definition at line 176 of file test_gui2.cpp.

◆ get_modeless_dialog_id()

std::string gui2::dialogs::get_modeless_dialog_id ( const modeless_dialog dialog)

This is used in the unit tests, but these implementation details shouldn't be used in the normal code.

Definition at line 181 of file test_gui2.cpp.

◆ get_probability_string()

static std::string gui2::dialogs::get_probability_string ( const double  prob)
static

◆ get_title_area_decor_config()

static config gui2::dialogs::get_title_area_decor_config ( )
static

Definition at line 37 of file story_viewer.cpp.

Referenced by gui2::dialogs::story_viewer::display_part().

◆ get_title_suffix()

static std::string gui2::dialogs::get_title_suffix ( int  side_num)
static

◆ gray_if_unrecruitable()

static std::string gui2::dialogs::gray_if_unrecruitable ( const std::string &  text,
const bool  is_recruitable 
)
inlinestatic

Definition at line 57 of file unit_recruit.cpp.

References inactive_row_color, and font::span_color().

Referenced by gui2::dialogs::unit_recruit::pre_show().

◆ launch_lua_console()

static void gui2::dialogs::launch_lua_console ( )
static

◆ make_screenshot()

static void gui2::dialogs::make_screenshot ( )
static

◆ maybe_inactive()

static const std::string gui2::dialogs::maybe_inactive ( const std::string &  str,
bool  active 
)
inlinestatic

Definition at line 82 of file unit_recall.cpp.

References inactive_row_color, and font::span_color().

Referenced by gui2::dialogs::unit_recall::pre_show().

◆ register_button()

static void gui2::dialogs::register_button ( window win,
const std::string &  id,
hotkey::HOTKEY_COMMAND  hk,
btn_callback  callback 
)
static

◆ REGISTER_DIALOG()

gui2::dialogs::REGISTER_DIALOG ( tod_new_schedule  )

◆ resize_grid_xy_to_idx()

static int gui2::dialogs::resize_grid_xy_to_idx ( const int  x,
const int  y 
)
static

Convert a coordinate on a 3 by 3 grid to an index, return 9 for out of bounds.

Definition at line 78 of file resize_map.cpp.

Referenced by gui2::dialogs::editor_resize_map::update_expand_direction().

◆ revert_to_default_pref_values()

static void gui2::dialogs::revert_to_default_pref_values ( window window)
static

◆ set_do_not_show_again()

static void gui2::dialogs::set_do_not_show_again ( const bool  do_not_show_again)
static

◆ set_dont_ask_again()

static void gui2::dialogs::set_dont_ask_again ( const bool  ask_again)
static

Helper to invert preferences::set_ask_delete_saves.

The value stored and the way shown is inverted.

Definition at line 40 of file game_delete.cpp.

References preferences::set_ask_delete_saves().

Referenced by gui2::dialogs::game_delete::game_delete().

◆ set_pref_and_button()

static void gui2::dialogs::set_pref_and_button ( const std::string &  id,
bool  value,
window window 
)
static

Definition at line 73 of file mp_alerts_options.cpp.

References preferences::set().

Referenced by revert_to_default_pref_values().

◆ setup_item()

static void gui2::dialogs::setup_item ( const std::string &  item,
window window 
)
static

◆ setup_pref_toggle_button()

static toggle_button* gui2::dialogs::setup_pref_toggle_button ( const std::string &  id,
bool  def,
window window 
)
static

◆ show_unit_list()

void gui2::dialogs::show_unit_list ( display gui)

◆ show_wml_message()

int gui2::dialogs::show_wml_message ( const std::string &  title,
const std::string &  message,
const wml_message_portrait left,
const wml_message_portrait right,
const wml_message_options options,
const wml_message_input input 
)

Helper function to show a portrait.

Parameters
titleThe title of the dialog.
messageThe message to show.
leftPortrait to show on the left.
rightPortrait to show on the right.
optionsOptions to offer.
inputInfo on text input.

Definition at line 154 of file wml_message.cpp.

References config::empty(), and preferences::options().

Referenced by lua_gui2::show_message_dialog().

◆ tally()

static hitrate_table_element gui2::dialogs::tally ( const statistics_t::stats::hitrate_map by_cth,
const bool  more_is_better 
)
static

◆ tod_getter_image()

static custom_tod::string_pair gui2::dialogs::tod_getter_image ( const time_of_day tod)
static

Definition at line 38 of file custom_tod.cpp.

References time_of_day::image.

Referenced by gui2::dialogs::custom_tod::pre_show().

◆ tod_getter_mask()

static custom_tod::string_pair gui2::dialogs::tod_getter_mask ( const time_of_day tod)
static

Definition at line 44 of file custom_tod.cpp.

References time_of_day::image_mask.

Referenced by gui2::dialogs::custom_tod::pre_show().

◆ tod_getter_sound()

static custom_tod::string_pair gui2::dialogs::tod_getter_sound ( const time_of_day tod)
static

Definition at line 50 of file custom_tod.cpp.

References time_of_day::sounds.

Referenced by gui2::dialogs::custom_tod::pre_show().

◆ write_actual_and_expected()

static std::ostream& gui2::dialogs::write_actual_and_expected ( std::ostream &  str,
const long long  actual,
const double  expected 
)
static

Variable Documentation

◆ extra_size_per_player

int gui2::dialogs::extra_size_per_player = 2
static

◆ forum_registration_url

const std::string gui2::dialogs::forum_registration_url = "https://forums.wesnoth.org/ucp.php?mode=register"
static

◆ inactive_row_color [1/2]

const color_t gui2::dialogs::inactive_row_color(0x96, 0x96, 0x96) ( 0x96  ,
0x96  ,
0x96   
)
static

◆ inactive_row_color [2/2]

const color_t gui2::dialogs::inactive_row_color(0x96, 0x96, 0x96) ( 0x96  ,
0x96  ,
0x96   
)
static

◆ LAYER_BACKGROUND

const unsigned int gui2::dialogs::LAYER_BACKGROUND = 1
static

Definition at line 50 of file story_viewer.cpp.

Referenced by gui2::dialogs::story_viewer::display_part().

◆ LAYER_TEXT

const unsigned int gui2::dialogs::LAYER_TEXT = 2
static

Definition at line 51 of file story_viewer.cpp.

Referenced by gui2::dialogs::story_viewer::display_part().

◆ LOAD_GAME

const int gui2::dialogs::LOAD_GAME = 100
static

◆ max_coastal

int gui2::dialogs::max_coastal = 5
static

◆ min_size

int gui2::dialogs::min_size = 20
static

◆ show_debug_clock_button

bool gui2::dialogs::show_debug_clock_button = false

Do we wish to show the button for the debug clock.

Definition at line 71 of file title_screen.cpp.

Referenced by game_launcher::game_launcher(), gui2::dialogs::title_screen::init_callbacks(), and gui2::dialogs::title_screen::show_debug_clock_window().

◆ sort_default

listbox::order_pair gui2::dialogs::sort_default { 2, sort_order::type::descending}
static

Definition at line 53 of file unit_recall.cpp.

Referenced by gui2::dialogs::unit_recall::pre_show().

◆ sort_last

listbox::order_pair gui2::dialogs::sort_last {-1, sort_order::type::none}
static

◆ tag_values

const std::array gui2::dialogs::tag_values
Initial value:
= {
"cooperative",
"cosmetic",
"difficulty",
"rng",
"survival",
"terraforming",
}

Definition at line 62 of file edit_pbl.cpp.

Referenced by gui2::dialogs::editor_edit_pbl::create_cfg(), and gui2::dialogs::editor_edit_pbl::pre_show().

◆ type_values

const std::array gui2::dialogs::type_values
Initial value:
= {
"",
"core",
"campaign",
"campaign_sp_mp",
"campaign_mp",
"scenario",
"scenario_mp",
"faction",
"era",
"map_pack",
"mod_mp",
"media",
"other",
}

Definition at line 46 of file edit_pbl.cpp.

Referenced by gui2::dialogs::editor_edit_pbl::create_cfg(), and gui2::dialogs::editor_edit_pbl::pre_show().