64 mConnectButton(
new Button(this,
_(
"Connect"),
"connect",
72 true, this,
"persistentIp")),
76 mServerDialog(parent),
83 Label *
const nameLabel =
new Label(
this,
_(
"Name:"));
85 Label *
const serverAdressLabel =
new Label(
this,
_(
"Address:"));
87 Label *
const portLabel =
new Label(
this,
_(
"Port:"));
89 Label *
const typeLabel =
new Label(
this,
_(
"Server type:"));
91 Label *
const descriptionLabel =
new Label(
this,
_(
"Description:"));
93 Label *
const onlineListUrlLabel =
new Label(
this,
_(
"Online list url:"));
95 Label *
const packetVersionLabel =
new Label(
this,
_(
"Packet version:"));
104 place(0, 0, nameLabel, 1, 1);
106 place(0, 1, serverAdressLabel, 1, 1);
108 place(0, 2, portLabel, 1, 1);
110 place(0, 3, typeLabel, 1, 1);
112 place(0, 4, descriptionLabel, 1, 1);
114 place(0, 5, onlineListUrlLabel, 1, 1);
116 place(0, 6, packetVersionLabel, 1, 1);
198 const std::string &eventId =
event.getId();
205 if (eventId ==
"addServer" || eventId ==
"connect")
215 _(
"Please at least type both the address and the port "
279 if (eventId ==
"connect")
284 else if (eventId ==
"cancel")
void setSelected(const bool selected)
void setSelected(int selected)
TextField * mServerAddressField
void keyPressed(KeyEvent &event)
IntTextField * mPacketVersionField
EditServerDialog(ServerDialog *const parent, const ServerInfo &server, const int index)
ServerDialog * mServerDialog
TypeListModel * mTypeListModel
TextField * mOnlineListUrlField
TextField * mDescriptionField
void action(const ActionEvent &event)
void setValue(const int value)
LayoutCell & setPadding(int p)
void reflow(int &nW, int &nH)
void updateServer(const ServerInfo &server, const int index)
void connectToSelectedServer()
std::string onlineListUrl
void setNumeric(const bool numeric)
const std::string & getText() const
void setText(const std::string &text)
void setRange(const int min, const int max)
void setResizable(const bool resize)
virtual void setVisible(Visible visible)
void setContentSize(int width, int height)
Window * getParentWindow() const
void setWindowName(const std::string &name)
void setMinHeight(const int height)
void setMinWidth(const int width)
virtual void scheduleDelete()
LayoutCell & place(const int x, const int y, Widget *const wg, const int w, const int h)
void setLocationRelativeTo(const Widget *const widget)
const bool LoseFocusOnTab_true
static const uint32_t maxPacketVersion
std::string toString(T const &value)
converts any type to a string
const bool ShowCenter_true