14 #define GETTEXT_DOMAIN "wesnoth-editor"
23 #ifdef GUI2_EXPERIMENTAL_LISTBOX
34 #define ERR_ED LOG_STREAM_INDENT(err, editor)
66 , last_map_generator_(
nullptr)
67 , current_map_generator_(0)
74 tlistbox& list = find_widget<tlistbox>(&window,
"generators_list",
false);
110 tlistbox& list = find_widget<tlistbox>(&window,
"generators_list",
false);
111 window.keyboard_capture(&list);
113 std::map<std::string, string_map> lrow;
117 lrow[
"generator_name"][
"label"] = gen->config_name();
137 tbutton& settings_button = find_widget<tbutton>(&window,
"settings",
false);
map_generator * get_selected_map_generator()
std::string random_seed_
random seed integer input
bool select_row(const unsigned row, const bool select=true)
Selectes a row.
REGISTER_DIALOG(label_settings)
void do_settings(twindow &window)
Callback for the generator settings button.
void connect_signal_mouse_left_click(tdispatcher &dispatcher, const tsignal_function &signal)
Connects a signal handler for a left mouse button click.
To lexical_cast(From value)
Lexical cast converts one type to another.
base class of top level items, the only item which needs to store the final canvases to draw on ...
void do_generator_selected(twindow &window)
Callback for generator list selection changes.
A class inherited from ttext_box that displays its input as stars.
unsigned get_item_count() const
Returns the number of items in the listbox.
void add_row(const string_map &item, const int index=-1)
When an item in the list is selected by the user we need to update the state.
void select_map_generator(map_generator *mg)
The dialog for selecting which random generator to use in the editor.
std::vector< map_generator * > map_generators_
Available map generators.
Contains the general settings which have a default.
void pre_show(twindow &window)
Inherited from tdialog.
boost::optional< boost::uint32_t > get_seed()
void set_callback_item_change(const std::function< void(size_t)> &callback)
map_generator * last_map_generator_
Last used map generator, must be in map_generators_.
virtual void user_config(CVideo &v)
Display the interactive screen, which allows the user to modify how the generator behaves...
int get_selected_row() const
Returns the first selected row.
Thrown when a lexical_cast fails.
tfield_text * register_text(const std::string &id, const bool mandatory, const std::function< std::string()> &callback_load_value=std::function< std::string()>(), const std::function< void(const std::string &)> &callback_save_value=std::function< void(const std::string &)>(), const bool capture_focus=false)
Creates a new text field.
int current_map_generator_
Current map generator index.