about summary refs log tree commit diff stats
path: root/connection_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'connection_dialog.cpp')
-rw-r--r--connection_dialog.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/connection_dialog.cpp b/connection_dialog.cpp new file mode 100644 index 0000000..0138189 --- /dev/null +++ b/connection_dialog.cpp
@@ -0,0 +1,34 @@
1#include "connection_dialog.h"
2
3ConnectionDialog::ConnectionDialog()
4 : wxDialog(nullptr, wxID_ANY, "Connect to Archipelago") {
5 server_box_ = new wxTextCtrl(this, -1, "", wxDefaultPosition, {300, -1});
6 player_box_ = new wxTextCtrl(this, -1, "", wxDefaultPosition, {300, -1});
7 password_box_ = new wxTextCtrl(this, -1, "", wxDefaultPosition, {300, -1});
8
9 wxFlexGridSizer* form_sizer = new wxFlexGridSizer(2, 10, 10);
10
11 form_sizer->Add(
12 new wxStaticText(this, -1, "Server:"),
13 wxSizerFlags().Align(wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT));
14 form_sizer->Add(server_box_, wxSizerFlags().Expand());
15 form_sizer->Add(
16 new wxStaticText(this, -1, "Player:"),
17 wxSizerFlags().Align(wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT));
18 form_sizer->Add(player_box_, wxSizerFlags().Expand());
19 form_sizer->Add(
20 new wxStaticText(this, -1, "Password:"),
21 wxSizerFlags().Align(wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT));
22 form_sizer->Add(password_box_, wxSizerFlags().Expand());
23
24 wxBoxSizer* top_sizer = new wxBoxSizer(wxVERTICAL);
25 top_sizer->Add(new wxStaticText(
26 this, -1, "Enter the details to connect to Archipelago."),
27 wxSizerFlags().Align(wxALIGN_LEFT).DoubleBorder());
28 top_sizer->Add(form_sizer, wxSizerFlags().DoubleBorder().Expand());
29 top_sizer->Add(CreateButtonSizer(wxOK | wxCANCEL), wxSizerFlags().Center());
30
31 SetSizerAndFit(top_sizer);
32
33 Center();
34}