15 #define GETTEXT_DOMAIN "wesnoth-lib"
36 std::string get_reachmap_widget_prefix(
const std::string& base_id)
38 return "reachmap_" + base_id +
"_";
89 const std::string prefix = get_reachmap_widget_prefix(base_id);
90 grid& selection = find_widget<grid>(prefix +
"selection");
94 const std::string&
id =
button->
id();
104 groups_[base_id].set_member_states(initial);
109 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_color(const std::string &color_id)
Contains the base iterator class for the gui2 widgets.
std::string reach_map_enemy_color
std::string reach_map_color
int reach_map_border_opacity
int reach_map_tint_opacity
REGISTER_DIALOG(editor_edit_unit)
void connect_signal_mouse_left_click(dispatcher &dispatcher, const signal &signal)
Connects a signal handler for a left mouse button click.
@ OK
Dialog was closed with the OK button.