mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 14:37:08 +00:00
Clean up UI code.
- Use Bind instead of connect. It's recommended for anyone using wx 2.9+ - Remove AppConnector. All this did was destroy objects used in the UI. However, wxWidgets handles this. So it's redundant. - Misc other unimportant changes.
This commit is contained in:
parent
db1ca2f89f
commit
b877879db6
37 changed files with 451 additions and 542 deletions
|
|
@ -2,27 +2,27 @@
|
|||
#include "TextInputDialog.h"
|
||||
|
||||
TextInputDialog::TextInputDialog(wxWindow* parent, const std::string& defvalue, const std::string& label)
|
||||
: wxDialog(parent, wxID_ANY, label, wxDefaultPosition)
|
||||
: wxDialog(parent, wxID_ANY, label)
|
||||
{
|
||||
m_tctrl_text = new wxTextCtrl(this, wxID_ANY, fmt::ToUTF8(defvalue));
|
||||
|
||||
wxBoxSizer& s_text(*new wxBoxSizer(wxVERTICAL));
|
||||
s_text.Add(m_tctrl_text, 1, wxEXPAND);
|
||||
wxBoxSizer* s_text = new wxBoxSizer(wxVERTICAL);
|
||||
s_text->Add(m_tctrl_text, 1, wxEXPAND);
|
||||
|
||||
wxBoxSizer& s_btns(*new wxBoxSizer(wxHORIZONTAL));
|
||||
s_btns.Add(new wxButton(this, wxID_OK));
|
||||
s_btns.AddSpacer(30);
|
||||
s_btns.Add(new wxButton(this, wxID_CANCEL));
|
||||
wxBoxSizer* s_btns = new wxBoxSizer(wxHORIZONTAL);
|
||||
s_btns->Add(new wxButton(this, wxID_OK));
|
||||
s_btns->AddSpacer(30);
|
||||
s_btns->Add(new wxButton(this, wxID_CANCEL));
|
||||
|
||||
wxBoxSizer& s_main(*new wxBoxSizer(wxVERTICAL));
|
||||
s_main.Add(&s_text, 1, wxEXPAND | wxUP | wxLEFT | wxRIGHT, 5);
|
||||
s_main.AddSpacer(30);
|
||||
s_main.Add(&s_btns, 0, wxCENTER | wxDOWN | wxLEFT | wxRIGHT, 5);
|
||||
wxBoxSizer* s_main = new wxBoxSizer(wxVERTICAL);
|
||||
s_main->Add(s_text, 1, wxEXPAND | wxUP | wxLEFT | wxRIGHT, 5);
|
||||
s_main->AddSpacer(30);
|
||||
s_main->Add(s_btns, 0, wxCENTER | wxDOWN | wxLEFT | wxRIGHT, 5);
|
||||
|
||||
SetSizerAndFit(&s_main);
|
||||
SetSizerAndFit(s_main);
|
||||
SetSize(250, -1);
|
||||
|
||||
Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TextInputDialog::OnOk));
|
||||
Bind(wxEVT_BUTTON, &TextInputDialog::OnOk, this);
|
||||
}
|
||||
|
||||
void TextInputDialog::OnOk(wxCommandEvent& event)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue