15 #define GETTEXT_DOMAIN "wesnoth-lib"
34 std::string get_orb_widget_prefix(
const std::string& base_id)
36 return "orb_" + base_id +
"_";
90 const std::string prefix = get_orb_widget_prefix(base_id);
91 toggle_button& toggle = find_widget<toggle_button>(prefix +
"show");
107 const std::string prefix = get_orb_widget_prefix(base_id);
108 grid& selection = find_widget<grid>(prefix +
"selection");
112 const std::string&
id =
button->
id();
124 const std::string prefix = get_orb_widget_prefix(base_id);
125 toggle_button& toggle = find_widget<toggle_button>(prefix +
"two_color");
133 const std::string prefix = get_orb_widget_prefix(base_id);
135 toggle_button& toggle = find_widget<toggle_button>(prefix +
"show");
142 groups_[base_id].set_member_states(initial);
149 const std::string prefix = get_orb_widget_prefix(base_id);
151 toggle_button& toggle = find_widget<toggle_button>(prefix +
"two_color");
Abstract base class for all modal dialogs.
int get_retval() const
Returns the cached window exit code.
void setup_orb_toggle(const std::string &base_id, bool &shown)
The display function.
void reset_orb_group(const std::string &base_id, bool shown, const std::string &initial)
virtual void post_show() override
Actions to be taken after the window has been shown.
virtual void pre_show() override
Actions to be taken before showing the window.
void setup_orb_group(const std::string &base_id, bool &shown, const std::string &initial)
Sets up the checkbox and row of color buttons for the one-color options, including connecting the cal...
void setup_orb_group_two_color(const std::string &base_id, bool &shown, bool &two_color, const std::string &initial)
Sets up two checkboxes and a row of color buttons.
void toggle_orb_callback(bool &storage)
void reset_orb_group_two_color(const std::string &base_id, bool shown, bool two_color, const std::string &initial)
std::map< std::string, group< std::string > > groups_
void reset_orb_callback()
void reset_orb_toggle(const std::string &base_id, bool shown)
Change the UI's ticked/unticked state.
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_value_bool(bool value, bool fire_event=false)
void set_allied_color(const std::string &color_id)
void set_enemy_color(const std::string &color_id)
void set_unmoved_color(const std::string &color_id)
void set_partial_color(const std::string &color_id)
void set_moved_color(const std::string &color_id)
Contains the base iterator class for the gui2 widgets.
std::string partial_orb_color
std::string moved_orb_color
std::string unmoved_orb_color
std::string ally_orb_color
std::string enemy_orb_color
bool show_status_on_ally_orb
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.