15#define GETTEXT_DOMAIN "wesnoth-lib"
36std::string get_reachmap_widget_prefix(
const std::string& base_id)
38 return "reachmap_" + base_id +
"_";
57 find_widget<slider>(
"reachmap_opacity_border").set_value(
prefs::get().reach_map_border_opacity());
58 find_widget<slider>(
"reachmap_opacity_tint").set_value(
prefs::get().reach_map_tint_opacity());
59 find_widget<slider>(
"reachmap_opacity_darken").set_value(
prefs::get().reach_map_darken_opacity());
60 find_widget<toggle_button>(
"reachmap_darken_tex").set_value_bool(
prefs::get().reach_map_darken_tex());
62 connect_signal_mouse_left_click(
93 const std::string prefix = get_reachmap_widget_prefix(base_id);
94 grid& selection = find_widget<grid>(prefix +
"selection");
98 const std::string&
id =
button->
id();
108 groups_[base_id].set_member_states(initial);
113 find_widget<slider>(base_id).set_value(initial);
Abstract base class for all modal dialogs.
void reset_reachmap_callback()
virtual void pre_show() override
Actions to be taken before showing the window.
virtual void post_show() override
Actions to be taken after the window has been shown.
void setup_reachmap_group(const std::string &base_id, const std::string &initial)
Sets up the checkbox and row of color buttons for the one-color options, including connecting the cal...
std::map< std::string, group< std::string > > groups_
void reset_reachmap_group(const std::string &base_id, const std::string &initial)
Change the UI's ticked/unticked state.
void reset_reachmap_slider(const std::string &base_id, const int &initial)
void add_member(selectable_item *w, const T &value)
Adds a widget/value pair to the group map.
void set_member_states(const T &value)
Sets the toggle values for all widgets besides the one associated with the specified value to false.
bool at_end() const
Has the iterator reached the end?
void set_reach_map_enemy_color(const std::string &color_id)
void set_reach_map_border_opacity(const int new_opacity)
void set_reach_map_tint_opacity(const int new_opacity)
void set_reach_map_darken_opacity(const int new_opacity)
void set_reach_map_darken_tex(const bool value)
void set_reach_map_color(const std::string &color_id)
Contains the base iterator class for the gui2 widgets.
#define REGISTER_DIALOG(window_id)
Wrapper for REGISTER_DIALOG2.
std::string reach_map_enemy_color
std::string reach_map_color
int reach_map_border_opacity
int reach_map_darken_opacity
bool reach_map_darken_tex
int reach_map_tint_opacity
@ OK
Dialog was closed with the OK button.