New Wiimote Plugin: Moved Linux cursor position code into ControllerInterface/Xlib. (absolute cursor position can be mapped to something other than IR camera) (code fixed by Glennrics) Put the UDP Wiimote dialog's Update Buttons,Update IR,Update Nunchuk... checkboxes in an "Update" group box. Fixed some Linux config dialog problems. (thanks Glennrics again) Some other minor cleanup in ControllerInterface. (changed some std::string/stringstream to char[] where possible) Removed a warning in DX11 plugin.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5880 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Jordan Woyak
2010-07-16 03:43:11 +00:00
parent f438532879
commit deffc95794
15 changed files with 146 additions and 130 deletions

View File

@ -116,34 +116,34 @@ UDPConfigDiag::UDPConfigDiag(wxWindow * const parent, UDPWrapper * _wrp) :
wxDialog(parent, -1, wxT("UDP Wiimote"), wxDefaultPosition, wxDefaultSize),
wrp(_wrp)
{
wxBoxSizer * outer_sizer = new wxBoxSizer(wxVERTICAL);
wxBoxSizer * sizer1 = new wxBoxSizer(wxVERTICAL);
wxBoxSizer * sizer2 = new wxBoxSizer(wxVERTICAL);
outer_sizer ->Add(sizer1, 0, wxUP | wxLEFT| wxRIGHT | wxEXPAND, 10);
outer_sizer ->Add(sizer2, 1, wxALL | wxEXPAND, 10);
wxBoxSizer *const outer_sizer = new wxBoxSizer(wxVERTICAL);
wxBoxSizer *const sizer1 = new wxBoxSizer(wxVERTICAL);
wxStaticBoxSizer *const sizer2 = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Update"));
outer_sizer->Add(sizer1, 0, wxTOP | wxLEFT | wxRIGHT | wxEXPAND, 5);
outer_sizer->Add(sizer2, 1, wxLEFT | wxRIGHT | wxEXPAND, 10);
enable = new wxCheckBox(this,wxID_ANY,wxT("Enable"));
butt = new wxCheckBox(this,wxID_ANY,wxT("Update Buttons"));
accel = new wxCheckBox(this,wxID_ANY,wxT("Update Acceleration"));
point = new wxCheckBox(this,wxID_ANY,wxT("Update IR Pointer"));
nun = new wxCheckBox(this,wxID_ANY,wxT("Update Nunchuk"));
nunaccel = new wxCheckBox(this,wxID_ANY,wxT("Update Nunchuk Acceleration"));
butt = new wxCheckBox(this,wxID_ANY,wxT("Buttons"));
accel = new wxCheckBox(this,wxID_ANY,wxT("Acceleration"));
point = new wxCheckBox(this,wxID_ANY,wxT("IR Pointer"));
nun = new wxCheckBox(this,wxID_ANY,wxT("Nunchuk"));
nunaccel = new wxCheckBox(this,wxID_ANY,wxT("Nunchuk Acceleration"));
wxButton * ok_butt = new wxButton(this,wxID_ANY,wxT("OK"));
wxButton *const ok_butt = new wxButton(this,wxID_ANY,wxT("OK"));
wxBoxSizer * port_sizer = new wxBoxSizer(wxHORIZONTAL);
port_sizer->Add(new wxStaticText(this , wxID_ANY, wxT("UDP Port:")),0,wxALIGN_CENTER);
port_tbox = new wxTextCtrl(this,wxID_ANY,wxString::FromUTF8(wrp->port.c_str()));
port_sizer->Add(port_tbox,1, wxLEFT | wxEXPAND , 5);
wxBoxSizer *const port_sizer = new wxBoxSizer(wxHORIZONTAL);
port_sizer->Add(new wxStaticText(this, wxID_ANY, wxT("UDP Port:")), 0, wxALIGN_CENTER);
port_tbox = new wxTextCtrl(this, wxID_ANY, wxString::FromUTF8(wrp->port.c_str()));
port_sizer->Add(port_tbox, 1, wxLEFT | wxEXPAND , 5);
_connect_macro_(enable,UDPConfigDiag::ChangeState ,wxEVT_COMMAND_CHECKBOX_CLICKED, this);
_connect_macro_(butt,UDPConfigDiag::ChangeUpdateFlags ,wxEVT_COMMAND_CHECKBOX_CLICKED, this);
_connect_macro_(accel,UDPConfigDiag::ChangeUpdateFlags ,wxEVT_COMMAND_CHECKBOX_CLICKED, this);
_connect_macro_(point,UDPConfigDiag::ChangeUpdateFlags ,wxEVT_COMMAND_CHECKBOX_CLICKED, this);
_connect_macro_(nun,UDPConfigDiag::ChangeUpdateFlags ,wxEVT_COMMAND_CHECKBOX_CLICKED, this);
_connect_macro_(nunaccel,UDPConfigDiag::ChangeUpdateFlags ,wxEVT_COMMAND_CHECKBOX_CLICKED, this);
_connect_macro_(ok_butt,UDPConfigDiag::OKPressed, wxEVT_COMMAND_BUTTON_CLICKED, this);
_connect_macro_(enable, UDPConfigDiag::ChangeState ,wxEVT_COMMAND_CHECKBOX_CLICKED, this);
_connect_macro_(butt, UDPConfigDiag::ChangeUpdateFlags ,wxEVT_COMMAND_CHECKBOX_CLICKED, this);
_connect_macro_(accel, UDPConfigDiag::ChangeUpdateFlags ,wxEVT_COMMAND_CHECKBOX_CLICKED, this);
_connect_macro_(point, UDPConfigDiag::ChangeUpdateFlags ,wxEVT_COMMAND_CHECKBOX_CLICKED, this);
_connect_macro_(nun, UDPConfigDiag::ChangeUpdateFlags ,wxEVT_COMMAND_CHECKBOX_CLICKED, this);
_connect_macro_(nunaccel, UDPConfigDiag::ChangeUpdateFlags ,wxEVT_COMMAND_CHECKBOX_CLICKED, this);
_connect_macro_(ok_butt, UDPConfigDiag::OKPressed, wxEVT_COMMAND_BUTTON_CLICKED, this);
_connect_macro_(port_tbox, UDPConfigDiag::ChangeState, wxEVT_COMMAND_TEXT_UPDATED, this);
enable->SetValue(wrp->udpEn);
@ -153,16 +153,16 @@ UDPConfigDiag::UDPConfigDiag(wxWindow * const parent, UDPWrapper * _wrp) :
nun->SetValue(wrp->updNun);
nunaccel->SetValue(wrp->updNunAccel);
sizer1->Add(enable,1,wxALL | wxEXPAND,5);
sizer1->Add(port_sizer, 1,wxDOWN | wxLEFT| wxRIGHT | wxEXPAND,5);
sizer1->Add(enable, 1, wxALL | wxEXPAND, 5);
sizer1->Add(port_sizer, 1, wxBOTTOM | wxLEFT| wxRIGHT | wxEXPAND, 5);
sizer2->Add(butt,1,wxALL | wxEXPAND,5);
sizer2->Add(accel,1,wxALL | wxEXPAND,5);
sizer2->Add(point,1,wxALL | wxEXPAND,5);
sizer2->Add(nun,1,wxALL | wxEXPAND,5);
sizer2->Add(nunaccel,1,wxALL | wxEXPAND,5);
sizer2->Add(butt, 1, wxALL | wxEXPAND, 5);
sizer2->Add(accel, 1, wxALL | wxEXPAND, 5);
sizer2->Add(point, 1, wxALL | wxEXPAND, 5);
sizer2->Add(nun, 1, wxALL | wxEXPAND, 5);
sizer2->Add(nunaccel, 1, wxALL | wxEXPAND, 5);
outer_sizer->Add(ok_butt,0, wxDOWN | wxLEFT| wxRIGHT | wxALIGN_RIGHT,10);
outer_sizer->Add(ok_butt, 0, wxALL | wxALIGN_RIGHT, 5);
SetSizerAndFit(outer_sizer);
Layout();