The Battle for Wesnoth  1.19.7+dev
Functions | Variables
gui2::settings Namespace Reference

This namespace contains the 'global' settings. More...

Functions

void update_screen_size_variables ()
 Update the size of the screen variables in settings. More...
 

Variables

unsigned screen_width = 0
 The screen resolution and pixel pitch should be available for all widgets since their drawing method might depend on it. More...
 
unsigned screen_height = 0
 
unsigned gamemap_x_offset = 0
 The offset between the left edge of the screen and the gamemap. More...
 
unsigned gamemap_width = 0
 The size of the map area, if not available equal to the screen size. More...
 
unsigned gamemap_height = 0
 
std::chrono::milliseconds popup_show_delay {0}
 These are copied from the active gui. More...
 
std::chrono::milliseconds popup_show_time {0}
 
std::chrono::milliseconds help_show_time {0}
 
std::chrono::milliseconds double_click_time {0}
 
std::chrono::milliseconds repeat_button_repeat_time {0}
 
std::string sound_button_click = ""
 
std::string sound_toggle_button_click = ""
 
std::string sound_toggle_panel_click = ""
 
std::string sound_slider_adjust = ""
 
t_string has_helptip_message
 
std::vector< game_tiptips
 

Detailed Description

This namespace contains the 'global' settings.

Function Documentation

◆ update_screen_size_variables()

void gui2::settings::update_screen_size_variables ( )

Update the size of the screen variables in settings.

Before a window gets build the screen sizes need to be updated. This function does that. It's only done when no other window is active, if another window is active it already updates the sizes with it's resize event.

Definition at line 49 of file settings.cpp.

References video::game_canvas_size(), gamemap_height, gamemap_width, gamemap_x_offset, display::get_singleton(), display::map_outside_area(), screen_height, and screen_width.

Referenced by gui2::get_window_builder(), and gui2::init().

Variable Documentation

◆ double_click_time

std::chrono::milliseconds gui2::settings::double_click_time {0}

◆ gamemap_height

unsigned gui2::settings::gamemap_height = 0

◆ gamemap_width

unsigned gui2::settings::gamemap_width = 0

The size of the map area, if not available equal to the screen size.

Definition at line 31 of file settings.cpp.

Referenced by gui2::get_screen_size_variables(), gui2::window::signal_handler_sdl_video_resize(), and update_screen_size_variables().

◆ gamemap_x_offset

unsigned gui2::settings::gamemap_x_offset = 0

The offset between the left edge of the screen and the gamemap.

Definition at line 29 of file settings.cpp.

Referenced by gui2::get_screen_size_variables(), and update_screen_size_variables().

◆ has_helptip_message

t_string gui2::settings::has_helptip_message

Definition at line 45 of file settings.cpp.

Referenced by gui2::gui_definition::activate().

◆ help_show_time

std::chrono::milliseconds gui2::settings::help_show_time {0}

Definition at line 36 of file settings.cpp.

Referenced by gui2::gui_definition::activate().

◆ popup_show_delay

std::chrono::milliseconds gui2::settings::popup_show_delay {0}

These are copied from the active gui.

Definition at line 34 of file settings.cpp.

Referenced by gui2::gui_definition::activate().

◆ popup_show_time

std::chrono::milliseconds gui2::settings::popup_show_time {0}

Definition at line 35 of file settings.cpp.

Referenced by gui2::gui_definition::activate().

◆ repeat_button_repeat_time

std::chrono::milliseconds gui2::settings::repeat_button_repeat_time {0}

◆ screen_height

unsigned gui2::settings::screen_height = 0

◆ screen_width

unsigned gui2::settings::screen_width = 0

The screen resolution and pixel pitch should be available for all widgets since their drawing method might depend on it.

Definition at line 27 of file settings.cpp.

Referenced by events::mouse_handler::drag_threshold(), gui2::get_screen_size_variables(), gui2::window::layout(), help::unit_topic_generator::operator()(), gui2::window::signal_handler_sdl_video_resize(), and update_screen_size_variables().

◆ sound_button_click

std::string gui2::settings::sound_button_click = ""

◆ sound_slider_adjust

std::string gui2::settings::sound_slider_adjust = ""

◆ sound_toggle_button_click

std::string gui2::settings::sound_toggle_button_click = ""

◆ sound_toggle_panel_click

std::string gui2::settings::sound_toggle_panel_click = ""

◆ tips

std::vector< game_tip > gui2::settings::tips