17 #define GETTEXT_DOMAIN "wesnoth-lib"
32 , schedule_id_(schedule_id)
33 , schedule_name_(schedule_name)
38 find_widget<text_box>(&win,
"id_box",
false).set_value(
schedule_id_);
39 find_widget<text_box>(&win,
"name_box",
false).set_value(
schedule_name_);
41 find_widget<button>(
get_window(),
"ok",
false).set_active(
false);
44 find_widget<text_box>(&win,
"name_box",
false),
47 find_widget<text_box>(&win,
"id_box",
false),
53 find_widget<text_box>(
get_window(),
"id_box",
false).get_value().empty()
54 || find_widget<text_box>(
get_window(),
"name_box",
false).get_value().empty())
56 find_widget<button>(
get_window(),
"ok",
false).set_active(
false);
58 find_widget<button>(
get_window(),
"ok",
false).set_active(
true);
66 schedule_id_ = find_widget<text_box>(&win,
"id_box",
false).get_value();
67 schedule_name_ = find_widget<text_box>(&win,
"name_box",
false).get_value();
Abstract base class for all modal dialogs.
window * get_window()
Returns a pointer to the dialog's window.
Dialog that takes new schedule ID and name from the player.
virtual void pre_show(window &window) override
Actions to be taken before showing the window.
void button_state_change()
tod_new_schedule(std::string &schedule_id, std::string &schedule_name)
std::string & schedule_name_
std::string & schedule_id_
virtual void post_show(window &window) override
Actions to be taken after the window has been shown.
base class of top level items, the only item which needs to store the final canvases to draw on.
REGISTER_DIALOG(editor_edit_unit)
void connect_signal_notify_modified(dispatcher &dispatcher, const signal_notification &signal)
Connects a signal handler for getting a notification upon modification.