14 #define GETTEXT_DOMAIN "wesnoth-editor"
94 bool& copy_edge_terrain)
95 : width_(register_integer("width", true, width))
96 , height_(register_integer("height", true, height))
99 , expand_direction_(expand_direction)
101 register_bool(
"copy_edge_terrain",
false, copy_edge_terrain);
103 register_label(
"old_width",
false, std::to_string(width));
104 register_label(
"old_height",
false, std::to_string(height));
109 tslider&
height = find_widget<tslider>(&window,
"height",
false);
116 tslider&
width = find_widget<tslider>(&window,
"width",
false);
124 for(
int i = 0;
i < 9; ++
i) {
127 = find_widget<ttoggle_button>(&window,
name,
false,
true);
160 for(
int i = 0;
i < 9; ++
i) {
199 if(xdiff < 0 || ydiff < 0 || (xdiff > 0 && ydiff > 0)) {
204 if(xdiff < 0 || ydiff < 0) {
ttoggle_button * direction_buttons_[9]
The toggle buttons show the state of expand_direction_.
int old_width_
The original width.
void connect_signal_notify_modified(tdispatcher &dispatcher, const tsignal_notification_function &signal)
Connects a signal handler for getting a notification upon modification.
REGISTER_DIALOG(label_settings)
static int resize_grid_xy_to_idx(const int x, const int y)
Convert a coordinate on a 3 by 3 grid to an index, return 9 for out of bounds.
GLint GLint GLint GLint GLint GLint y
T get_widget_value(twindow &window)
Gets the value of the field.
Implements some helper classes to ease adding fields to a dialog and hide the synchronization needed...
tfield_integer * height_
The currently selected height.
void update_expand_direction(twindow &window)
base class of top level items, the only item which needs to store the final canvases to draw on ...
A class inherited from ttext_box that displays its input as stars.
tfield_integer * width_
The currently selected width.
EXPAND_DIRECTION & expand_direction_
The selected expansion direction.
static map_location::DIRECTION se
void pre_show(twindow &window)
Inherited from tdialog.
GLint GLint GLint GLint GLint x
int old_height_
The original height.
static map_location::DIRECTION sw
GLint GLint GLint GLint GLint GLint GLsizei GLsizei height
GLuint const GLchar * name
static map_location::DIRECTION nw
void swap(game_board &one, game_board &other)
void set_direction_icon(int index, std::string icon)
static map_location::DIRECTION ne
GLint GLint GLint GLint GLint GLint GLsizei width
GLsizei const GLcharARB ** string
void dialog_callback(twidget &caller)
Template for dialog callbacks.