15 #define GETTEXT_DOMAIN "wesnoth-lib"
35 std::string get_orb_widget_prefix(
const std::string& base_id)
37 return "orb_" + base_id +
"_";
91 const std::string prefix = get_orb_widget_prefix(base_id);
108 const std::string prefix = get_orb_widget_prefix(base_id);
109 grid& selection = find_widget<grid>(
get_window(), prefix +
"selection",
false);
113 const std::string&
id =
button->
id();
125 const std::string prefix = get_orb_widget_prefix(base_id);
134 const std::string prefix = get_orb_widget_prefix(base_id);
143 groups_[base_id].set_member_states(initial);
150 const std::string prefix = get_orb_widget_prefix(base_id);
Abstract base class for all modal dialogs.
int get_retval() const
Returns the cached window exit code.
window * get_window()
Returns a pointer to the dialog's window.
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 pre_show(window &window) 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)
virtual void post_show(window &window) override
Actions to be taken after the window has been shown.
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)
base class of top level items, the only item which needs to store the final canvases to draw on.
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.