15 #define GETTEXT_DOMAIN "wesnoth-lib"
36 std::string get_orb_widget_prefix(
const std::string& base_id)
38 return "orb_" + base_id +
"_";
92 const std::string prefix = get_orb_widget_prefix(base_id);
109 const std::string prefix = get_orb_widget_prefix(base_id);
110 grid& selection = find_widget<grid>(
get_window(), prefix +
"selection",
false);
114 const std::string&
id =
button->
id();
126 const std::string prefix = get_orb_widget_prefix(base_id);
135 const std::string prefix = get_orb_widget_prefix(base_id);
144 groups_[base_id].set_member_states(initial);
151 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.
Contains the base iterator class for the gui2 widgets.
#define REGISTER_DIALOG(window_id)
Wrapper for REGISTER_DIALOG2.
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
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.
Modify, read and display user preferences.
void set_show_disengaged_orb(bool show_orb)
void set_allied_color(const std::string &color_id)
void set_show_partial_orb(bool show_orb)
void set_show_enemy_orb(bool show_orb)
std::string moved_color()
void set_unmoved_color(const std::string &color_id)
std::string partial_color()
void set_show_ally_orb(bool show_orb)
std::string enemy_color()
std::string allied_color()
std::string unmoved_color()
void set_enemy_color(const std::string &color_id)
void set_moved_color(const std::string &color_id)
void set_show_status_on_ally_orb(bool show_orb)
void set_show_moved_orb(bool show_orb)
void set_show_unmoved_orb(bool show_orb)
void set_partial_color(const std::string &color_id)
This file contains the settings handling of the widget library.