WX: HiDPI: NetPlay

Several refactors of GUI creation into separate functions where the
function was too large or intermixed different concerns making it hard
to modify.
This commit is contained in:
EmptyChaos
2016-08-02 06:23:02 +00:00
parent ef0d21299a
commit f39c301579
8 changed files with 405 additions and 282 deletions

View File

@ -12,6 +12,8 @@
ChangeGameDialog::ChangeGameDialog(wxWindow* parent, const CGameListCtrl* const game_list)
: wxDialog(parent, wxID_ANY, _("Select Game"))
{
const int space5 = FromDIP(5);
m_game_lbox =
new wxListBox(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, nullptr, wxLB_SORT);
m_game_lbox->Bind(wxEVT_LISTBOX_DCLICK, &ChangeGameDialog::OnPick, this);
@ -22,8 +24,11 @@ ChangeGameDialog::ChangeGameDialog(wxWindow* parent, const CGameListCtrl* const
ok_btn->Bind(wxEVT_BUTTON, &ChangeGameDialog::OnPick, this);
wxBoxSizer* const szr = new wxBoxSizer(wxVERTICAL);
szr->Add(m_game_lbox, 1, wxLEFT | wxRIGHT | wxTOP | wxEXPAND, 5);
szr->Add(ok_btn, 0, wxALL | wxALIGN_RIGHT, 5);
szr->AddSpacer(space5);
szr->Add(m_game_lbox, 1, wxEXPAND | wxLEFT | wxRIGHT, space5);
szr->AddSpacer(space5);
szr->Add(ok_btn, 0, wxALIGN_RIGHT | wxLEFT | wxRIGHT, space5);
szr->AddSpacer(space5);
SetSizerAndFit(szr);
SetFocus();