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 |
const unsigned | screen_pitch_microns = 265 |
screen_pitch_microns is deprecated. More... | |
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 |
unsigned | popup_show_delay = 0 |
These are copied from the active gui. More... | |
unsigned | popup_show_time = 0 |
unsigned | help_show_time = 0 |
unsigned | double_click_time = 0 |
unsigned | 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_tip > | tips |
This namespace contains the 'global' settings.
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 57 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().
unsigned gui2::settings::double_click_time = 0 |
Definition at line 45 of file settings.cpp.
Referenced by gui2::gui_definition::activate(), and gui2::event::mouse_button< I >::mouse_button_click().
unsigned gui2::settings::gamemap_height = 0 |
Definition at line 40 of file settings.cpp.
Referenced by gui2::get_screen_size_variables(), gui2::window::signal_handler_sdl_video_resize(), and update_screen_size_variables().
unsigned gui2::settings::gamemap_width = 0 |
The size of the map area, if not available equal to the screen size.
Definition at line 39 of file settings.cpp.
Referenced by gui2::get_screen_size_variables(), gui2::window::signal_handler_sdl_video_resize(), and update_screen_size_variables().
unsigned gui2::settings::gamemap_x_offset = 0 |
The offset between the left edge of the screen and the gamemap.
Definition at line 37 of file settings.cpp.
Referenced by gui2::get_screen_size_variables(), and update_screen_size_variables().
t_string gui2::settings::has_helptip_message |
Definition at line 53 of file settings.cpp.
Referenced by gui2::gui_definition::activate().
unsigned gui2::settings::help_show_time = 0 |
Definition at line 44 of file settings.cpp.
Referenced by gui2::gui_definition::activate().
unsigned gui2::settings::popup_show_delay = 0 |
These are copied from the active gui.
Definition at line 42 of file settings.cpp.
Referenced by gui2::gui_definition::activate().
unsigned gui2::settings::popup_show_time = 0 |
Definition at line 43 of file settings.cpp.
Referenced by gui2::gui_definition::activate().
unsigned gui2::settings::repeat_button_repeat_time = 0 |
Definition at line 46 of file settings.cpp.
Referenced by gui2::gui_definition::activate(), and gui2::repeating_button::signal_handler_left_button_down().
unsigned gui2::settings::screen_height = 0 |
Definition at line 28 of file settings.cpp.
Referenced by events::mouse_handler::drag_threshold(), gui2::get_screen_size_variables(), gui2::window::layout(), gui2::window::signal_handler_sdl_video_resize(), and update_screen_size_variables().
const unsigned gui2::settings::screen_pitch_microns = 265 |
screen_pitch_microns is deprecated.
Do not use it.
This value corresponds to a physical DPI of 96. But physical DPI should not be used to make rendering decisions. With the ability to set pixel scale, it can be assumed that one pixel in draw-space is neither too small nor too large.
Definition at line 36 of file settings.cpp.
Referenced by gui2::get_screen_size_variables().
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().
std::string gui2::settings::sound_button_click = "" |
Definition at line 48 of file settings.cpp.
Referenced by gui2::gui_definition::activate(), gui2::rich_label::signal_handler_left_button_click(), gui2::button::signal_handler_left_button_click(), gui2::menu_button::signal_handler_left_button_click(), gui2::multimenu_button::signal_handler_left_button_click(), and gui2::repeating_button::signal_handler_left_button_down().
std::string gui2::settings::sound_slider_adjust = "" |
Definition at line 51 of file settings.cpp.
Referenced by gui2::gui_definition::activate(), and gui2::slider::child_callback_positioner_moved().
std::string gui2::settings::sound_toggle_button_click = "" |
Definition at line 49 of file settings.cpp.
Referenced by gui2::gui_definition::activate(), and gui2::toggle_button::signal_handler_left_button_click().
std::string gui2::settings::sound_toggle_panel_click = "" |
Definition at line 50 of file settings.cpp.
Referenced by gui2::gui_definition::activate(), and gui2::toggle_panel::signal_handler_left_button_click().
std::vector< game_tip > gui2::settings::tips |
Definition at line 55 of file settings.cpp.
Referenced by gui2::gui_definition::activate(), tooltips::add_tooltip(), clear_active(), tooltips::clear_tooltips(), tooltips::click(), tooltips::manager::expose(), gui2::dialogs::title_screen::init_callbacks(), tooltips::manager::layout(), tooltips::process(), tooltips::remove_tooltip(), tooltips::manager::screen_location(), tooltips::select_active(), gui2::tip_of_the_day::shuffle(), and tooltips::update_tooltip().