16 #define GETTEXT_DOMAIN "wesnoth-lib"
37 text_box* user_widget = find_widget<text_box>(
"user_name",
false,
true);
41 listbox* list = find_widget<listbox>(
"method_list",
false,
true);
43 #if defined(__IPHONEOS__)
44 if(
prefs::get().mp_connect_type() ==
static_cast<int>(choice::HOST)) {
45 list->
select_row(
static_cast<unsigned>(choice::LOCAL));
50 add_to_tab_order(list);
51 add_to_tab_order(user_widget);
59 prefs::get().set_mp_connect_type(find_widget<listbox>(
"method_list").get_selected_row());
62 text_box& user_widget = find_widget<text_box>(
"user_name");
virtual void post_show() override
Actions to be taken after the window has been shown.
choice get_choice() const
choice
Corresponds to each connection option.
void set_row_active(const unsigned row, const bool active)
Makes a row active or inactive.
bool select_row(const unsigned row, const bool select=true)
Selects a row.
std::string get_value() const
virtual void set_value(const std::string &text)
The set_value is virtual for the password_box class.
void set_maximum_length(const std::size_t maximum_length)
A widget that allows the user to input text in single line.
void save_to_history()
Saves the text in the widget to the history.
void set_login(const std::string &login)
bool open_object([[maybe_unused]] const std::string &path_or_url)
REGISTER_DIALOG(editor_edit_unit)
static const std::string forum_registration_url
Link to the wesnoth forum account registration page.
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.
const std::size_t max_login_size
Max length of a player name.
Desktop environment interaction functions.