mirror of
https://github.com/Retropex/dolphin.git
synced 2025-05-29 21:42:31 +02:00
some small adjustments to the ogl and padsimple wxw code. Really need to find a way to get keyboard input after clicking a wxButton...
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@640 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
6bffd4d4bb
commit
0400d044ec
@ -1,254 +1,254 @@
|
|||||||
// Copyright (C) 2003-2008 Dolphin Project.
|
// Copyright (C) 2003-2008 Dolphin Project.
|
||||||
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, version 2.0.
|
// the Free Software Foundation, version 2.0.
|
||||||
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License 2.0 for more details.
|
// GNU General Public License 2.0 for more details.
|
||||||
|
|
||||||
// A copy of the GPL 2.0 should have been included with the program.
|
// A copy of the GPL 2.0 should have been included with the program.
|
||||||
// If not, see http://www.gnu.org/licenses/
|
// If not, see http://www.gnu.org/licenses/
|
||||||
|
|
||||||
// Official SVN repository and contact information can be found at
|
// Official SVN repository and contact information can be found at
|
||||||
// http://code.google.com/p/dolphin-emu/
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
|
|
||||||
#include "ConfigDlg.h"
|
#include "ConfigDlg.h"
|
||||||
#include "../PadSimple.h"
|
#include "../PadSimple.h"
|
||||||
//#include "../DirectInputBase.h"
|
//#include "../DirectInputBase.h"
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(ConfigDialog,wxDialog)
|
BEGIN_EVENT_TABLE(ConfigDialog,wxDialog)
|
||||||
EVT_CLOSE(ConfigDialog::OnClose)
|
EVT_CLOSE(ConfigDialog::OnClose)
|
||||||
EVT_BUTTON(ID_CLOSE,ConfigDialog::OnCloseClick)
|
EVT_BUTTON(ID_CLOSE,ConfigDialog::OnCloseClick)
|
||||||
EVT_CHECKBOX(ID_ATTACHED,ConfigDialog::AttachedCheck)
|
EVT_CHECKBOX(ID_ATTACHED,ConfigDialog::AttachedCheck)
|
||||||
EVT_CHECKBOX(ID_DISABLE,ConfigDialog::DisableCheck)
|
EVT_CHECKBOX(ID_DISABLE,ConfigDialog::DisableCheck)
|
||||||
EVT_CHECKBOX(ID_RUMBLE,ConfigDialog::RumbleCheck)
|
EVT_CHECKBOX(ID_RUMBLE,ConfigDialog::RumbleCheck)
|
||||||
EVT_BUTTON(CTL_A,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_A,ConfigDialog::OnButtonClick)
|
||||||
EVT_BUTTON(CTL_B,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_B,ConfigDialog::OnButtonClick)
|
||||||
EVT_BUTTON(CTL_X,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_X,ConfigDialog::OnButtonClick)
|
||||||
EVT_BUTTON(CTL_Y,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_Y,ConfigDialog::OnButtonClick)
|
||||||
EVT_BUTTON(CTL_Z,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_Z,ConfigDialog::OnButtonClick)
|
||||||
EVT_BUTTON(CTL_START,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_START,ConfigDialog::OnButtonClick)
|
||||||
EVT_BUTTON(CTL_TRIGGER_L,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_TRIGGER_L,ConfigDialog::OnButtonClick)
|
||||||
EVT_BUTTON(CTL_L,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_L,ConfigDialog::OnButtonClick)
|
||||||
EVT_BUTTON(CTL_TRIGGER_R,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_TRIGGER_R,ConfigDialog::OnButtonClick)
|
||||||
EVT_BUTTON(CTL_R,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_R,ConfigDialog::OnButtonClick)
|
||||||
EVT_BUTTON(CTL_MAINUP,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_MAINUP,ConfigDialog::OnButtonClick)
|
||||||
EVT_BUTTON(CTL_MAINDOWN,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_MAINDOWN,ConfigDialog::OnButtonClick)
|
||||||
EVT_BUTTON(CTL_MAINLEFT,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_MAINLEFT,ConfigDialog::OnButtonClick)
|
||||||
EVT_BUTTON(CTL_MAINRIGHT,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_MAINRIGHT,ConfigDialog::OnButtonClick)
|
||||||
EVT_BUTTON(CTL_HALFMAIN,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_HALFMAIN,ConfigDialog::OnButtonClick)
|
||||||
EVT_BUTTON(CTL_SUBUP,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_SUBUP,ConfigDialog::OnButtonClick)
|
||||||
EVT_BUTTON(CTL_SUBDOWN,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_SUBDOWN,ConfigDialog::OnButtonClick)
|
||||||
EVT_BUTTON(CTL_SUBLEFT,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_SUBLEFT,ConfigDialog::OnButtonClick)
|
||||||
EVT_BUTTON(CTL_SUBRIGHT,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_SUBRIGHT,ConfigDialog::OnButtonClick)
|
||||||
EVT_BUTTON(CTL_HALFSUB,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_HALFSUB,ConfigDialog::OnButtonClick)
|
||||||
EVT_BUTTON(CTL_DPADUP,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_DPADUP,ConfigDialog::OnButtonClick)
|
||||||
EVT_BUTTON(CTL_DPADDOWN,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_DPADDOWN,ConfigDialog::OnButtonClick)
|
||||||
EVT_BUTTON(CTL_DPADLEFT,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_DPADLEFT,ConfigDialog::OnButtonClick)
|
||||||
EVT_BUTTON(CTL_DPADRIGHT,ConfigDialog::OnButtonClick)
|
EVT_BUTTON(CTL_DPADRIGHT,ConfigDialog::OnButtonClick)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
ConfigDialog::ConfigDialog(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
|
ConfigDialog::ConfigDialog(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
|
||||||
: wxDialog(parent, id, title, position, size, style)
|
: wxDialog(parent, id, title, position, size, style)
|
||||||
{
|
{
|
||||||
clickedButton = NULL;
|
clickedButton = NULL;
|
||||||
CreateGUIControls();
|
CreateGUIControls();
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigDialog::~ConfigDialog()
|
ConfigDialog::~ConfigDialog()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigDialog::CreateGUIControls()
|
void ConfigDialog::CreateGUIControls()
|
||||||
{
|
{
|
||||||
// Notebook
|
// Notebook
|
||||||
m_Notebook = new wxNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize);
|
m_Notebook = new wxNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize);
|
||||||
|
|
||||||
// Controller pages
|
// Controller pages
|
||||||
m_Controller[0] = new wxPanel(m_Notebook, ID_CONTROLLERPAGE1, wxDefaultPosition, wxDefaultSize);
|
m_Controller[0] = new wxPanel(m_Notebook, ID_CONTROLLERPAGE1, wxDefaultPosition, wxDefaultSize);
|
||||||
m_Notebook->AddPage(m_Controller[0], wxT("Controller 1"));
|
m_Notebook->AddPage(m_Controller[0], wxT("Controller 1"));
|
||||||
m_Controller[1] = new wxPanel(m_Notebook, ID_CONTROLLERPAGE2, wxDefaultPosition, wxDefaultSize);
|
m_Controller[1] = new wxPanel(m_Notebook, ID_CONTROLLERPAGE2, wxDefaultPosition, wxDefaultSize);
|
||||||
m_Notebook->AddPage(m_Controller[1], wxT("Controller 2"));
|
m_Notebook->AddPage(m_Controller[1], wxT("Controller 2"));
|
||||||
m_Controller[2] = new wxPanel(m_Notebook, ID_CONTROLLERPAGE3, wxDefaultPosition, wxDefaultSize);
|
m_Controller[2] = new wxPanel(m_Notebook, ID_CONTROLLERPAGE3, wxDefaultPosition, wxDefaultSize);
|
||||||
m_Notebook->AddPage(m_Controller[2], wxT("Controller 3"));
|
m_Notebook->AddPage(m_Controller[2], wxT("Controller 3"));
|
||||||
m_Controller[3] = new wxPanel(m_Notebook, ID_CONTROLLERPAGE4, wxDefaultPosition, wxDefaultSize);
|
m_Controller[3] = new wxPanel(m_Notebook, ID_CONTROLLERPAGE4, wxDefaultPosition, wxDefaultSize);
|
||||||
m_Notebook->AddPage(m_Controller[3], wxT("Controller 4"));
|
m_Notebook->AddPage(m_Controller[3], wxT("Controller 4"));
|
||||||
|
|
||||||
// Standard buttons
|
// Standard buttons
|
||||||
m_Close = new wxButton(this, ID_CLOSE, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_Close = new wxButton(this, ID_CLOSE, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
|
|
||||||
// Put notebook and standard buttons in sizers
|
// Put notebook and standard buttons in sizers
|
||||||
wxBoxSizer* sSButtons;
|
wxBoxSizer* sSButtons;
|
||||||
sSButtons = new wxBoxSizer(wxHORIZONTAL);
|
sSButtons = new wxBoxSizer(wxHORIZONTAL);
|
||||||
sSButtons->Add(0, 0, 1, wxEXPAND, 5);
|
sSButtons->Add(0, 0, 1, wxEXPAND, 5);
|
||||||
sSButtons->Add(m_Close, 0, wxALL, 5);
|
sSButtons->Add(m_Close, 0, wxALL, 5);
|
||||||
|
|
||||||
wxBoxSizer* sMain;
|
wxBoxSizer* sMain;
|
||||||
sMain = new wxBoxSizer(wxVERTICAL);
|
sMain = new wxBoxSizer(wxVERTICAL);
|
||||||
sMain->Add(m_Notebook, 1, wxEXPAND|wxALL, 5);
|
sMain->Add(m_Notebook, 1, wxEXPAND|wxALL, 5);
|
||||||
sMain->Add(sSButtons, 0, wxEXPAND, 5);
|
sMain->Add(sSButtons, 0, wxEXPAND, 5);
|
||||||
|
|
||||||
this->SetSizer(sMain);
|
this->SetSizer(sMain);
|
||||||
this->Layout();
|
this->Layout();
|
||||||
|
|
||||||
wxArrayString arrayStringFor_DeviceName;
|
wxArrayString arrayStringFor_DeviceName;
|
||||||
|
|
||||||
for(int i = 0; i < 4; i++)
|
for(int i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
sDevice[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("Controller:"));
|
sDevice[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("Controller:"));
|
||||||
sDeviceTop[i] = new wxBoxSizer(wxHORIZONTAL);
|
sDeviceTop[i] = new wxBoxSizer(wxHORIZONTAL);
|
||||||
sDeviceBottom[i] = new wxBoxSizer(wxHORIZONTAL);
|
sDeviceBottom[i] = new wxBoxSizer(wxHORIZONTAL);
|
||||||
m_DeviceName[i] = new wxChoice(m_Controller[i], ID_DEVICENAME, wxDefaultPosition, wxDefaultSize, arrayStringFor_DeviceName, 0, wxDefaultValidator);
|
m_DeviceName[i] = new wxChoice(m_Controller[i], ID_DEVICENAME, wxDefaultPosition, wxDefaultSize, arrayStringFor_DeviceName, 0, wxDefaultValidator);
|
||||||
m_Attached[i] = new wxCheckBox(m_Controller[i], ID_ATTACHED, wxT("Controller attached"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_Attached[i] = new wxCheckBox(m_Controller[i], ID_ATTACHED, wxT("Controller attached"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
m_Disable[i] = new wxCheckBox(m_Controller[i], ID_DISABLE, wxT("Disable when window looses focus"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_Disable[i] = new wxCheckBox(m_Controller[i], ID_DISABLE, wxT("Disable when window looses focus"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
m_Rumble[i] = new wxCheckBox(m_Controller[i], ID_RUMBLE, wxT("Enable rumble"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_Rumble[i] = new wxCheckBox(m_Controller[i], ID_RUMBLE, wxT("Enable rumble"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
m_Attached[i]->SetValue(pad[i].attached);
|
m_Attached[i]->SetValue(pad[i].attached);
|
||||||
m_Disable[i]->SetValue(pad[i].disable);
|
m_Disable[i]->SetValue(pad[i].disable);
|
||||||
m_Rumble[i]->SetValue(pad[i].rumble);
|
m_Rumble[i]->SetValue(pad[i].rumble);
|
||||||
m_Rumble[i]->Show(pad[i].type);
|
m_Rumble[i]->Show(pad[i].type);
|
||||||
|
|
||||||
sDeviceTop[i]->Add(m_DeviceName[i], 1, wxEXPAND|wxALL, 1);
|
sDeviceTop[i]->Add(m_DeviceName[i], 1, wxEXPAND|wxALL, 1);
|
||||||
sDeviceTop[i]->Add(m_Attached[i], 0, wxEXPAND|wxALL, 1);
|
sDeviceTop[i]->Add(m_Attached[i], 0, wxEXPAND|wxALL, 1);
|
||||||
sDeviceBottom[i]->AddStretchSpacer(1);
|
sDeviceBottom[i]->AddStretchSpacer(1);
|
||||||
sDeviceBottom[i]->Add(m_Disable[i], 0, wxEXPAND|wxALL, 1);
|
sDeviceBottom[i]->Add(m_Disable[i], 0, wxEXPAND|wxALL, 1);
|
||||||
sDeviceBottom[i]->Add(m_Rumble[i], 0, wxEXPAND|wxALL, 1);
|
sDeviceBottom[i]->Add(m_Rumble[i], 0, wxEXPAND|wxALL, 1);
|
||||||
sDeviceBottom[i]->AddStretchSpacer(1);
|
sDeviceBottom[i]->AddStretchSpacer(1);
|
||||||
sDevice[i]->Add(sDeviceTop[i], 0, wxEXPAND|wxALL, 1);
|
sDevice[i]->Add(sDeviceTop[i], 0, wxEXPAND|wxALL, 1);
|
||||||
sDevice[i]->Add(sDeviceBottom[i], 0, wxEXPAND|wxALL, 1);
|
sDevice[i]->Add(sDeviceBottom[i], 0, wxEXPAND|wxALL, 1);
|
||||||
|
|
||||||
sButtons[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("Buttons:"));
|
sButtons[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("Buttons:"));
|
||||||
m_ButtonA[i] = new wxButton(m_Controller[i], CTL_A, wxT("A: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
m_ButtonA[i] = new wxButton(m_Controller[i], CTL_A, wxT("A: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||||
m_ButtonB[i] = new wxButton(m_Controller[i], CTL_B, wxT("B: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
m_ButtonB[i] = new wxButton(m_Controller[i], CTL_B, wxT("B: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||||
m_ButtonX[i] = new wxButton(m_Controller[i], CTL_X, wxT("X: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
m_ButtonX[i] = new wxButton(m_Controller[i], CTL_X, wxT("X: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||||
m_ButtonY[i] = new wxButton(m_Controller[i], CTL_Y, wxT("Y: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
m_ButtonY[i] = new wxButton(m_Controller[i], CTL_Y, wxT("Y: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||||
m_ButtonZ[i] = new wxButton(m_Controller[i], CTL_Z, wxT("Z: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
m_ButtonZ[i] = new wxButton(m_Controller[i], CTL_Z, wxT("Z: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||||
m_ButtonStart[i] = new wxButton(m_Controller[i], CTL_START, wxT("Start: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
m_ButtonStart[i] = new wxButton(m_Controller[i], CTL_START, wxT("Start: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||||
|
|
||||||
sButtons[i]->Add(m_ButtonA[i], 0, wxEXPAND|wxALL);
|
sButtons[i]->Add(m_ButtonA[i], 0, wxEXPAND|wxALL);
|
||||||
sButtons[i]->Add(m_ButtonB[i], 0, wxEXPAND|wxALL);
|
sButtons[i]->Add(m_ButtonB[i], 0, wxEXPAND|wxALL);
|
||||||
sButtons[i]->Add(m_ButtonX[i], 0, wxEXPAND|wxALL);
|
sButtons[i]->Add(m_ButtonX[i], 0, wxEXPAND|wxALL);
|
||||||
sButtons[i]->Add(m_ButtonY[i], 0, wxEXPAND|wxALL);
|
sButtons[i]->Add(m_ButtonY[i], 0, wxEXPAND|wxALL);
|
||||||
sButtons[i]->Add(m_ButtonZ[i], 0, wxEXPAND|wxALL);
|
sButtons[i]->Add(m_ButtonZ[i], 0, wxEXPAND|wxALL);
|
||||||
sButtons[i]->Add(m_ButtonStart[i], 0, wxEXPAND|wxALL);
|
sButtons[i]->Add(m_ButtonStart[i], 0, wxEXPAND|wxALL);
|
||||||
|
|
||||||
sTriggerL[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("L Trigger:"));
|
sTriggerL[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("L Trigger:"));
|
||||||
m_TriggerL[i] = new wxButton(m_Controller[i], CTL_TRIGGER_L, wxT("Analog: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
m_TriggerL[i] = new wxButton(m_Controller[i], CTL_TRIGGER_L, wxT("Analog: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||||
m_ButtonL[i] = new wxButton(m_Controller[i], CTL_L, wxT("Click: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
m_ButtonL[i] = new wxButton(m_Controller[i], CTL_L, wxT("Click: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||||
sTriggerR[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("R Trigger:"));
|
sTriggerR[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("R Trigger:"));
|
||||||
m_TriggerR[i] = new wxButton(m_Controller[i], CTL_TRIGGER_R, wxT("Analog: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
m_TriggerR[i] = new wxButton(m_Controller[i], CTL_TRIGGER_R, wxT("Analog: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||||
m_ButtonR[i] = new wxButton(m_Controller[i], CTL_R, wxT("Click: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
m_ButtonR[i] = new wxButton(m_Controller[i], CTL_R, wxT("Click: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||||
|
|
||||||
sTriggerL[i]->Add(m_TriggerL[i], 0, wxEXPAND|wxALL);
|
sTriggerL[i]->Add(m_TriggerL[i], 0, wxEXPAND|wxALL);
|
||||||
sTriggerL[i]->Add(m_ButtonL[i], 0, wxEXPAND|wxALL);
|
sTriggerL[i]->Add(m_ButtonL[i], 0, wxEXPAND|wxALL);
|
||||||
sTriggerR[i]->Add(m_TriggerR[i], 0, wxEXPAND|wxALL);
|
sTriggerR[i]->Add(m_TriggerR[i], 0, wxEXPAND|wxALL);
|
||||||
sTriggerR[i]->Add(m_ButtonR[i], 0, wxEXPAND|wxALL);
|
sTriggerR[i]->Add(m_ButtonR[i], 0, wxEXPAND|wxALL);
|
||||||
|
|
||||||
sStick[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("Main Stick:"));
|
sStick[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("Main Stick:"));
|
||||||
m_StickUp[i] = new wxButton(m_Controller[i], CTL_MAINUP, wxT("Up: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
m_StickUp[i] = new wxButton(m_Controller[i], CTL_MAINUP, wxT("Up: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||||
m_StickDown[i] = new wxButton(m_Controller[i], CTL_MAINDOWN, wxT("Down: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
m_StickDown[i] = new wxButton(m_Controller[i], CTL_MAINDOWN, wxT("Down: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||||
m_StickLeft[i] = new wxButton(m_Controller[i], CTL_MAINLEFT, wxT("Left: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
m_StickLeft[i] = new wxButton(m_Controller[i], CTL_MAINLEFT, wxT("Left: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||||
m_StickRight[i] = new wxButton(m_Controller[i], CTL_MAINRIGHT, wxT("Right: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
m_StickRight[i] = new wxButton(m_Controller[i], CTL_MAINRIGHT, wxT("Right: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||||
|
|
||||||
sStick[i]->Add(m_StickUp[i], 0, wxEXPAND|wxALL);
|
sStick[i]->Add(m_StickUp[i], 0, wxEXPAND|wxALL);
|
||||||
sStick[i]->Add(m_StickDown[i], 0, wxEXPAND|wxALL);
|
sStick[i]->Add(m_StickDown[i], 0, wxEXPAND|wxALL);
|
||||||
sStick[i]->Add(m_StickLeft[i], 0, wxEXPAND|wxALL);
|
sStick[i]->Add(m_StickLeft[i], 0, wxEXPAND|wxALL);
|
||||||
sStick[i]->Add(m_StickRight[i], 0, wxEXPAND|wxALL);
|
sStick[i]->Add(m_StickRight[i], 0, wxEXPAND|wxALL);
|
||||||
|
|
||||||
sDPad[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("D-Pad:"));
|
sDPad[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("D-Pad:"));
|
||||||
m_DPadUp[i] = new wxButton(m_Controller[i], CTL_DPADUP, wxT("Up: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
m_DPadUp[i] = new wxButton(m_Controller[i], CTL_DPADUP, wxT("Up: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||||
m_DPadDown[i] = new wxButton(m_Controller[i], CTL_DPADDOWN, wxT("Down: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
m_DPadDown[i] = new wxButton(m_Controller[i], CTL_DPADDOWN, wxT("Down: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||||
m_DPadLeft[i] = new wxButton(m_Controller[i], CTL_DPADLEFT, wxT("Left: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
m_DPadLeft[i] = new wxButton(m_Controller[i], CTL_DPADLEFT, wxT("Left: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||||
m_DPadRight[i] = new wxButton(m_Controller[i], CTL_DPADRIGHT, wxT("Right: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
m_DPadRight[i] = new wxButton(m_Controller[i], CTL_DPADRIGHT, wxT("Right: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||||
|
|
||||||
sDPad[i]->Add(m_DPadUp[i], 0, wxEXPAND|wxALL);
|
sDPad[i]->Add(m_DPadUp[i], 0, wxEXPAND|wxALL);
|
||||||
sDPad[i]->Add(m_DPadDown[i], 0, wxEXPAND|wxALL);
|
sDPad[i]->Add(m_DPadDown[i], 0, wxEXPAND|wxALL);
|
||||||
sDPad[i]->Add(m_DPadLeft[i], 0, wxEXPAND|wxALL);
|
sDPad[i]->Add(m_DPadLeft[i], 0, wxEXPAND|wxALL);
|
||||||
sDPad[i]->Add(m_DPadRight[i], 0, wxEXPAND|wxALL);
|
sDPad[i]->Add(m_DPadRight[i], 0, wxEXPAND|wxALL);
|
||||||
|
|
||||||
sCStick[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("C-Stick:"));
|
sCStick[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("C-Stick:"));
|
||||||
m_CStickUp[i] = new wxButton(m_Controller[i], CTL_SUBUP, wxT("Up: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
m_CStickUp[i] = new wxButton(m_Controller[i], CTL_SUBUP, wxT("Up: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||||
m_CStickDown[i] = new wxButton(m_Controller[i], CTL_SUBDOWN, wxT("Down: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
m_CStickDown[i] = new wxButton(m_Controller[i], CTL_SUBDOWN, wxT("Down: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||||
m_CStickLeft[i] = new wxButton(m_Controller[i], CTL_SUBLEFT, wxT("Left: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
m_CStickLeft[i] = new wxButton(m_Controller[i], CTL_SUBLEFT, wxT("Left: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||||
m_CStickRight[i] = new wxButton(m_Controller[i], CTL_SUBRIGHT, wxT("Right: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
m_CStickRight[i] = new wxButton(m_Controller[i], CTL_SUBRIGHT, wxT("Right: "), wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||||
|
|
||||||
sCStick[i]->Add(m_CStickUp[i], 0, wxEXPAND|wxALL);
|
sCStick[i]->Add(m_CStickUp[i], 0, wxEXPAND|wxALL);
|
||||||
sCStick[i]->Add(m_CStickDown[i], 0, wxEXPAND|wxALL);
|
sCStick[i]->Add(m_CStickDown[i], 0, wxEXPAND|wxALL);
|
||||||
sCStick[i]->Add(m_CStickLeft[i], 0, wxEXPAND|wxALL);
|
sCStick[i]->Add(m_CStickLeft[i], 0, wxEXPAND|wxALL);
|
||||||
sCStick[i]->Add(m_CStickRight[i], 0, wxEXPAND|wxALL);
|
sCStick[i]->Add(m_CStickRight[i], 0, wxEXPAND|wxALL);
|
||||||
|
|
||||||
sPage[i] = new wxGridBagSizer(0, 0);
|
sPage[i] = new wxGridBagSizer(0, 0);
|
||||||
sPage[i]->SetFlexibleDirection(wxBOTH);
|
sPage[i]->SetFlexibleDirection(wxBOTH);
|
||||||
sPage[i]->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
|
sPage[i]->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
|
||||||
sPage[i]->Add(sDevice[i], wxGBPosition(0, 0), wxGBSpan(1, 5), wxEXPAND|wxALL, 1);
|
sPage[i]->Add(sDevice[i], wxGBPosition(0, 0), wxGBSpan(1, 5), wxEXPAND|wxALL, 1);
|
||||||
sPage[i]->Add(sButtons[i], wxGBPosition(1, 0), wxGBSpan(3, 1), wxALL, 1);
|
sPage[i]->Add(sButtons[i], wxGBPosition(1, 0), wxGBSpan(3, 1), wxALL, 1);
|
||||||
sPage[i]->Add(sTriggerL[i], wxGBPosition(1, 1), wxGBSpan(1, 1), wxALL, 1);
|
sPage[i]->Add(sTriggerL[i], wxGBPosition(1, 1), wxGBSpan(1, 1), wxALL, 1);
|
||||||
sPage[i]->Add(sTriggerR[i], wxGBPosition(2, 1), wxGBSpan(1, 1), wxALL, 1);
|
sPage[i]->Add(sTriggerR[i], wxGBPosition(2, 1), wxGBSpan(1, 1), wxALL, 1);
|
||||||
sPage[i]->Add(sStick[i], wxGBPosition(1, 2), wxGBSpan(2, 1), wxALL, 1);
|
sPage[i]->Add(sStick[i], wxGBPosition(1, 2), wxGBSpan(2, 1), wxALL, 1);
|
||||||
sPage[i]->Add(sDPad[i], wxGBPosition(1, 3), wxGBSpan(2, 1), wxALL, 1);
|
sPage[i]->Add(sDPad[i], wxGBPosition(1, 3), wxGBSpan(2, 1), wxALL, 1);
|
||||||
sPage[i]->Add(sCStick[i], wxGBPosition(1, 4), wxGBSpan(2, 1), wxALL, 1);
|
sPage[i]->Add(sCStick[i], wxGBPosition(1, 4), wxGBSpan(2, 1), wxALL, 1);
|
||||||
m_Controller[i]->SetSizer(sPage[i]);
|
m_Controller[i]->SetSizer(sPage[i]);
|
||||||
sPage[i]->Layout();
|
sPage[i]->Layout();
|
||||||
}
|
}
|
||||||
|
|
||||||
clickedButton->Connect(wxID_ANY, wxEVT_KEY_DOWN,
|
//TODO get keyboard input after clicking a wxButton
|
||||||
wxKeyEventHandler(ConfigDialog::OnKeyDown),
|
//clickedButton->Connect(wxID_ANY, wxEVT_KEY_DOWN, wxKeyEventHandler(ConfigDialog::OnKeyDown), (wxObject*)NULL, this);
|
||||||
(wxObject*)NULL, this);
|
|
||||||
SetIcon(wxNullIcon);
|
SetIcon(wxNullIcon);
|
||||||
Fit();
|
Fit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigDialog::OnClose(wxCloseEvent& event)
|
void ConfigDialog::OnClose(wxCloseEvent& event)
|
||||||
{
|
{
|
||||||
EndModal(0);
|
EndModal(0);
|
||||||
}
|
}
|
||||||
void ConfigDialog::OnKeyDown(wxKeyEvent& event)
|
void ConfigDialog::OnKeyDown(wxKeyEvent& event)
|
||||||
{
|
{
|
||||||
if(clickedButton != NULL)
|
if(clickedButton != NULL)
|
||||||
{
|
{
|
||||||
int page = m_Notebook->GetSelection();
|
int page = m_Notebook->GetSelection();
|
||||||
pad[page].keyForControl[clickedButton->GetId()] = event.GetKeyCode();
|
pad[page].keyForControl[clickedButton->GetId()] = event.GetKeyCode();
|
||||||
clickedButton->SetLabel(wxString::Format(wxT("%i"), event.GetKeyCode()));
|
clickedButton->SetLabel(wxString::Format(wxT("%i"), event.GetKeyCode()));
|
||||||
}
|
}
|
||||||
//this is here to see if the event gets processed at all...so far, it doesn't
|
//this is here to see if the event gets processed at all...so far, it doesn't
|
||||||
m_ButtonA[0]->SetLabel(wxString::Format(wxT("%i"), event.GetKeyCode()));
|
m_ButtonA[0]->SetLabel(wxString::Format(wxT("%i"), event.GetKeyCode()));
|
||||||
//clickedButton = NULL;
|
//clickedButton = NULL;
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
void ConfigDialog::OnCloseClick(wxCommandEvent& event)
|
void ConfigDialog::OnCloseClick(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigDialog::AttachedCheck(wxCommandEvent& event)
|
void ConfigDialog::AttachedCheck(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
int page = m_Notebook->GetSelection();
|
int page = m_Notebook->GetSelection();
|
||||||
pad[page].attached = m_Attached[page]->GetValue();
|
pad[page].attached = m_Attached[page]->GetValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigDialog::DisableCheck(wxCommandEvent& event)
|
void ConfigDialog::DisableCheck(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
int page = m_Notebook->GetSelection();
|
int page = m_Notebook->GetSelection();
|
||||||
pad[page].disable = m_Disable[page]->GetValue();
|
pad[page].disable = m_Disable[page]->GetValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigDialog::RumbleCheck(wxCommandEvent& event)
|
void ConfigDialog::RumbleCheck(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
int page = m_Notebook->GetSelection();
|
int page = m_Notebook->GetSelection();
|
||||||
pad[page].rumble = m_Rumble[page]->GetValue();
|
pad[page].rumble = m_Rumble[page]->GetValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigDialog::OnButtonClick(wxCommandEvent& event)
|
void ConfigDialog::OnButtonClick(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
clickedButton = (wxButton *)event.GetEventObject();
|
clickedButton = (wxButton *)event.GetEventObject();
|
||||||
//wxString oldLabel = clickedButton->GetLabel();
|
//wxString oldLabel = clickedButton->GetLabel();
|
||||||
clickedButton->SetLabel(wxString::FromAscii("Press Key"));
|
clickedButton->SetLabel(wxString::FromAscii("Press Key"));
|
||||||
|
|
||||||
//clickedButton->SetLabel(wxString::Format(wxT("%i"), keyPress));
|
//clickedButton->SetLabel(wxString::Format(wxT("%i"), keyPress));
|
||||||
|
|
||||||
//clickedButton->SetLabel(wxString::Format(wxT("%s %i"), oldLabel, keyPress));
|
//clickedButton->SetLabel(wxString::Format(wxT("%s %i"), oldLabel, keyPress));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,125 +1,125 @@
|
|||||||
// Copyright (C) 2003-2008 Dolphin Project.
|
// Copyright (C) 2003-2008 Dolphin Project.
|
||||||
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, version 2.0.
|
// the Free Software Foundation, version 2.0.
|
||||||
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License 2.0 for more details.
|
// GNU General Public License 2.0 for more details.
|
||||||
|
|
||||||
// A copy of the GPL 2.0 should have been included with the program.
|
// A copy of the GPL 2.0 should have been included with the program.
|
||||||
// If not, see http://www.gnu.org/licenses/
|
// If not, see http://www.gnu.org/licenses/
|
||||||
|
|
||||||
// Official SVN repository and contact information can be found at
|
// Official SVN repository and contact information can be found at
|
||||||
// http://code.google.com/p/dolphin-emu/
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
#ifndef __CONFIGDIALOG_h__
|
#ifndef __CONFIGDIALOG_h__
|
||||||
#define __CONFIGDIALOG_h__
|
#define __CONFIGDIALOG_h__
|
||||||
|
|
||||||
#include <wx/wx.h>
|
#include <wx/wx.h>
|
||||||
#include <wx/dialog.h>
|
#include <wx/dialog.h>
|
||||||
#include <wx/textctrl.h>
|
#include <wx/textctrl.h>
|
||||||
#include <wx/button.h>
|
#include <wx/button.h>
|
||||||
#include <wx/stattext.h>
|
#include <wx/stattext.h>
|
||||||
#include <wx/combobox.h>
|
#include <wx/combobox.h>
|
||||||
#include <wx/checkbox.h>
|
#include <wx/checkbox.h>
|
||||||
#include <wx/notebook.h>
|
#include <wx/notebook.h>
|
||||||
#include <wx/panel.h>
|
#include <wx/panel.h>
|
||||||
#include <wx/gbsizer.h>
|
#include <wx/gbsizer.h>
|
||||||
|
|
||||||
|
|
||||||
#undef CONFIGDIALOG_STYLE
|
#undef CONFIGDIALOG_STYLE
|
||||||
#define CONFIGDIALOG_STYLE wxCAPTION | wxSYSTEM_MENU | wxDIALOG_NO_PARENT | wxCLOSE_BOX
|
#define CONFIGDIALOG_STYLE wxCAPTION | wxSYSTEM_MENU | wxDIALOG_NO_PARENT | wxCLOSE_BOX
|
||||||
|
|
||||||
|
|
||||||
class ConfigDialog : public wxDialog
|
class ConfigDialog : public wxDialog
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE();
|
DECLARE_EVENT_TABLE();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ConfigDialog(wxWindow *parent, wxWindowID id = 1, const wxString &title = wxT("Pad Configuration"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = CONFIGDIALOG_STYLE);
|
ConfigDialog(wxWindow *parent, wxWindowID id = 1, const wxString &title = wxT("Pad Configuration"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = CONFIGDIALOG_STYLE);
|
||||||
virtual ~ConfigDialog();
|
virtual ~ConfigDialog();
|
||||||
|
|
||||||
//private:
|
private:
|
||||||
wxNotebook *m_Notebook;
|
wxNotebook *m_Notebook;
|
||||||
wxPanel *m_Controller[4];
|
wxPanel *m_Controller[4];
|
||||||
wxButton *m_Close;
|
wxButton *m_Close;
|
||||||
|
|
||||||
wxStaticBoxSizer *sDevice[4];
|
wxStaticBoxSizer *sDevice[4];
|
||||||
wxBoxSizer *sDeviceTop[4];
|
wxBoxSizer *sDeviceTop[4];
|
||||||
wxBoxSizer *sDeviceBottom[4];
|
wxBoxSizer *sDeviceBottom[4];
|
||||||
wxGridBagSizer* sPage[4];
|
wxGridBagSizer* sPage[4];
|
||||||
wxStaticBoxSizer *sButtons[4];
|
wxStaticBoxSizer *sButtons[4];
|
||||||
wxStaticBoxSizer *sTriggerL[4];
|
wxStaticBoxSizer *sTriggerL[4];
|
||||||
wxStaticBoxSizer *sTriggerR[4];
|
wxStaticBoxSizer *sTriggerR[4];
|
||||||
wxStaticBoxSizer *sStick[4];
|
wxStaticBoxSizer *sStick[4];
|
||||||
wxStaticBoxSizer *sCStick[4];
|
wxStaticBoxSizer *sCStick[4];
|
||||||
wxStaticBoxSizer *sDPad[4];
|
wxStaticBoxSizer *sDPad[4];
|
||||||
|
|
||||||
wxChoice *m_DeviceName[4];
|
wxChoice *m_DeviceName[4];
|
||||||
wxCheckBox *m_Attached[4];
|
wxCheckBox *m_Attached[4];
|
||||||
wxCheckBox *m_Disable[4];
|
wxCheckBox *m_Disable[4];
|
||||||
wxCheckBox *m_Rumble[4];
|
wxCheckBox *m_Rumble[4];
|
||||||
|
|
||||||
wxButton *m_ButtonA[4];
|
wxButton *m_ButtonA[4];
|
||||||
wxButton *m_ButtonB[4];
|
wxButton *m_ButtonB[4];
|
||||||
wxButton *m_ButtonX[4];
|
wxButton *m_ButtonX[4];
|
||||||
wxButton *m_ButtonY[4];
|
wxButton *m_ButtonY[4];
|
||||||
wxButton *m_ButtonZ[4];
|
wxButton *m_ButtonZ[4];
|
||||||
wxButton *m_ButtonStart[4];
|
wxButton *m_ButtonStart[4];
|
||||||
wxButton *m_TriggerL[4];
|
wxButton *m_TriggerL[4];
|
||||||
wxButton *m_ButtonL[4];
|
wxButton *m_ButtonL[4];
|
||||||
wxButton *m_TriggerR[4];
|
wxButton *m_TriggerR[4];
|
||||||
wxButton *m_ButtonR[4];
|
wxButton *m_ButtonR[4];
|
||||||
wxButton *m_StickUp[4];
|
wxButton *m_StickUp[4];
|
||||||
wxButton *m_StickDown[4];
|
wxButton *m_StickDown[4];
|
||||||
wxButton *m_StickLeft[4];
|
wxButton *m_StickLeft[4];
|
||||||
wxButton *m_StickRight[4];
|
wxButton *m_StickRight[4];
|
||||||
wxButton *m_CStickUp[4];
|
wxButton *m_CStickUp[4];
|
||||||
wxButton *m_CStickDown[4];
|
wxButton *m_CStickDown[4];
|
||||||
wxButton *m_CStickLeft[4];
|
wxButton *m_CStickLeft[4];
|
||||||
wxButton *m_CStickRight[4];
|
wxButton *m_CStickRight[4];
|
||||||
wxButton *m_DPadUp[4];
|
wxButton *m_DPadUp[4];
|
||||||
wxButton *m_DPadDown[4];
|
wxButton *m_DPadDown[4];
|
||||||
wxButton *m_DPadLeft[4];
|
wxButton *m_DPadLeft[4];
|
||||||
wxButton *m_DPadRight[4];
|
wxButton *m_DPadRight[4];
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
////GUI Enum Control ID Start
|
////GUI Enum Control ID Start
|
||||||
ID_CLOSE = 1000,
|
ID_CLOSE = 1000,
|
||||||
ID_NOTEBOOK,
|
ID_NOTEBOOK,
|
||||||
ID_CONTROLLERPAGE1,
|
ID_CONTROLLERPAGE1,
|
||||||
ID_CONTROLLERPAGE2,
|
ID_CONTROLLERPAGE2,
|
||||||
ID_CONTROLLERPAGE3,
|
ID_CONTROLLERPAGE3,
|
||||||
ID_CONTROLLERPAGE4,
|
ID_CONTROLLERPAGE4,
|
||||||
|
|
||||||
ID_DEVICENAME,
|
ID_DEVICENAME,
|
||||||
ID_ATTACHED,
|
ID_ATTACHED,
|
||||||
ID_DISABLE,
|
ID_DISABLE,
|
||||||
ID_RUMBLE,
|
ID_RUMBLE,
|
||||||
|
|
||||||
ID_DUMMY_VALUE_ //don't remove this value unless you have other enum values
|
ID_DUMMY_VALUE_ //don't remove this value unless you have other enum values
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void OnClose(wxCloseEvent& event);
|
void OnClose(wxCloseEvent& event);
|
||||||
void CreateGUIControls();
|
void CreateGUIControls();
|
||||||
void OnCloseClick(wxCommandEvent& event);
|
void OnCloseClick(wxCommandEvent& event);
|
||||||
void OnKeyDown(wxKeyEvent& event);
|
void OnKeyDown(wxKeyEvent& event);
|
||||||
void AttachedCheck(wxCommandEvent& event);
|
void AttachedCheck(wxCommandEvent& event);
|
||||||
void DisableCheck(wxCommandEvent& event);
|
void DisableCheck(wxCommandEvent& event);
|
||||||
void RumbleCheck(wxCommandEvent& event);
|
void RumbleCheck(wxCommandEvent& event);
|
||||||
void OnButtonClick(wxCommandEvent& event);
|
void OnButtonClick(wxCommandEvent& event);
|
||||||
|
|
||||||
int keyPress;
|
int keyPress;
|
||||||
wxButton *clickedButton;
|
wxButton *clickedButton;
|
||||||
/*DInput m_dinput;*/
|
/*DInput m_dinput;*/
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -150,8 +150,8 @@ void ConfigDialog::CreateGUIControls()
|
|||||||
sPage1 = new wxGridBagSizer(0, 0);
|
sPage1 = new wxGridBagSizer(0, 0);
|
||||||
sPage1->SetFlexibleDirection(wxBOTH);
|
sPage1->SetFlexibleDirection(wxBOTH);
|
||||||
sPage1->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
|
sPage1->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
|
||||||
sPage1->Add(m_Fullscreen, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALL, 5);
|
sPage1->Add(m_Fullscreen, wxGBPosition(0, 0), wxGBSpan(1, 2), wxALL, 5);
|
||||||
sPage1->Add(m_RenderToMainWindow, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALL, 5);
|
sPage1->Add(m_RenderToMainWindow, wxGBPosition(1, 0), wxGBSpan(1, 2), wxALL, 5);
|
||||||
sPage1->Add(FSText, wxGBPosition(2, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
sPage1->Add(FSText, wxGBPosition(2, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
sPage1->Add(m_FullscreenCB, wxGBPosition(2, 1), wxGBSpan(1, 1), wxALL, 5);
|
sPage1->Add(m_FullscreenCB, wxGBPosition(2, 1), wxGBSpan(1, 1), wxALL, 5);
|
||||||
sPage1->Add(WMText, wxGBPosition(3, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
sPage1->Add(WMText, wxGBPosition(3, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
@ -172,10 +172,10 @@ void ConfigDialog::CreateGUIControls()
|
|||||||
sPage3 = new wxGridBagSizer(0, 0);
|
sPage3 = new wxGridBagSizer(0, 0);
|
||||||
sPage3->SetFlexibleDirection(wxBOTH);
|
sPage3->SetFlexibleDirection(wxBOTH);
|
||||||
sPage3->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
|
sPage3->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
|
||||||
sPage3->Add(m_Wireframe, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALL, 5);
|
sPage3->Add(m_Wireframe, wxGBPosition(0, 0), wxGBSpan(1, 2), wxALL, 5);
|
||||||
sPage3->Add(m_ShaderErrors, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALL, 5);
|
sPage3->Add(m_ShaderErrors, wxGBPosition(1, 0), wxGBSpan(1, 2), wxALL, 5);
|
||||||
sPage3->Add(m_ShowFPS, wxGBPosition(2, 0), wxGBSpan(1, 1), wxALL, 5);
|
sPage3->Add(m_ShowFPS, wxGBPosition(2, 0), wxGBSpan(1, 2), wxALL, 5);
|
||||||
sPage3->Add(m_Statistics, wxGBPosition(3, 0), wxGBSpan(1, 1), wxALL, 5);
|
sPage3->Add(m_Statistics, wxGBPosition(3, 0), wxGBSpan(1, 2), wxALL, 5);
|
||||||
sPage3->Add(m_TexFmtOverlay, wxGBPosition(4, 0), wxGBSpan(1, 1), wxALL, 5);
|
sPage3->Add(m_TexFmtOverlay, wxGBPosition(4, 0), wxGBSpan(1, 1), wxALL, 5);
|
||||||
sPage3->Add(m_TexFmtCenter, wxGBPosition(4, 1), wxGBSpan(1, 1), wxALL, 5);
|
sPage3->Add(m_TexFmtCenter, wxGBPosition(4, 1), wxGBSpan(1, 1), wxALL, 5);
|
||||||
sPage3->Add(m_DumpTextures, wxGBPosition(5, 0), wxGBSpan(1, 1), wxALL, 5);
|
sPage3->Add(m_DumpTextures, wxGBPosition(5, 0), wxGBSpan(1, 1), wxALL, 5);
|
||||||
|
Loading…
Reference in New Issue
Block a user