about summary refs log tree commit diff stats
path: root/src/connection_dialog.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-05-05 15:46:58 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-05-05 15:46:58 -0400
commit149e7c0836927e14a926a952bd1a7f0d1b49e779 (patch)
tree2c7ac89387eb890d3d345217b79929e9a23f4ecf /src/connection_dialog.cpp
parent0dace7831673170bd31eefa6bbe6e705211d3061 (diff)
downloadlingo-ap-tracker-149e7c0836927e14a926a952bd1a7f0d1b49e779.tar.gz
lingo-ap-tracker-149e7c0836927e14a926a952bd1a7f0d1b49e779.tar.bz2
lingo-ap-tracker-149e7c0836927e14a926a952bd1a7f0d1b49e779.zip
Organised repo
Diffstat (limited to 'src/connection_dialog.cpp')
-rw-r--r--src/connection_dialog.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/connection_dialog.cpp b/src/connection_dialog.cpp new file mode 100644 index 0000000..9dd9984 --- /dev/null +++ b/src/connection_dialog.cpp
@@ -0,0 +1,40 @@
1#include "connection_dialog.h"
2
3#include "tracker_config.h"
4
5ConnectionDialog::ConnectionDialog()
6 : wxDialog(nullptr, wxID_ANY, "Connect to Archipelago") {
7 server_box_ = new wxTextCtrl(this, -1, GetTrackerConfig().ap_server, wxDefaultPosition,
8 {300, -1});
9 player_box_ = new wxTextCtrl(this, -1, GetTrackerConfig().ap_player, wxDefaultPosition,
10 {300, -1});
11 password_box_ = new wxTextCtrl(this, -1, GetTrackerConfig().ap_password,
12 wxDefaultPosition, {300, -1});
13
14 wxFlexGridSizer* form_sizer = new wxFlexGridSizer(2, 10, 10);
15
16 form_sizer->Add(
17 new wxStaticText(this, -1, "Server:"),
18 wxSizerFlags().Align(wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT));
19 form_sizer->Add(server_box_, wxSizerFlags().Expand());
20 form_sizer->Add(
21 new wxStaticText(this, -1, "Player:"),
22 wxSizerFlags().Align(wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT));
23 form_sizer->Add(player_box_, wxSizerFlags().Expand());
24 form_sizer->Add(
25 new wxStaticText(this, -1, "Password:"),
26 wxSizerFlags().Align(wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT));
27 form_sizer->Add(password_box_, wxSizerFlags().Expand());
28
29 wxBoxSizer* top_sizer = new wxBoxSizer(wxVERTICAL);
30 top_sizer->Add(new wxStaticText(
31 this, -1, "Enter the details to connect to Archipelago."),
32 wxSizerFlags().Align(wxALIGN_LEFT).DoubleBorder());
33 top_sizer->Add(form_sizer, wxSizerFlags().DoubleBorder().Expand());
34 top_sizer->Add(CreateButtonSizer(wxOK | wxCANCEL), wxSizerFlags().Center());
35
36 SetSizerAndFit(top_sizer);
37
38 Center();
39 server_box_->SetFocus();
40}