16 #define GETTEXT_DOMAIN "wesnoth-lib"
35 std::
string& category)
39 register_text(
"label",
true, text,
true);
40 register_text(
"category",
true, category,
false);
41 register_bool(
"immutable_toggle",
true, immutable);
42 register_bool(
"visible_fog_toggle",
true, visible_fog);
43 register_bool(
"visible_shroud_toggle",
true, visible_shroud);
44 register_color_component(
"slider_red", &color_t::r);
45 register_color_component(
"slider_green", &
color_t::g);
46 register_color_component(
"slider_blue", &
color_t::b);
virtual void pre_show() override
Actions to be taken before showing the window.
void register_color_component(std::string widget_id, uint8_t color_t::*component)
int load_color_component(uint8_t color_t::*component)
color_t & color_store
The execute function.
void save_color_component(uint8_t color_t::*component, const int value)
Abstract base class for all modal dialogs.
field_integer * register_integer(const std::string &id, const bool mandatory, const std::function< int()> callback_load_value=nullptr, const std::function< void(int)> callback_save_value=nullptr)
Creates a new integer field.
void add_to_tab_order(widget *widget, int at=-1)
Add the widget to the tabbing order.
REGISTER_DIALOG(editor_edit_unit)
The basic class for representing 8-bit RGB or RGBA colour values.