2009-07-28 21:32:10 +00:00
|
|
|
// Copyright (C) 2003 Dolphin Project.
|
2008-12-08 05:25:12 +00:00
|
|
|
|
|
|
|
// 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
|
|
|
|
// the Free Software Foundation, version 2.0.
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
|
|
|
|
// Official SVN repository and contact information can be found at
|
|
|
|
// http://code.google.com/p/dolphin-emu/
|
|
|
|
|
2009-07-09 03:58:53 +00:00
|
|
|
#include "wiimote_real.h" // for MAX_WIIMOTES
|
2009-02-01 13:01:50 +00:00
|
|
|
#include "wiimote_hid.h"
|
2009-01-28 16:09:08 +00:00
|
|
|
#include "main.h"
|
2010-06-05 19:03:37 +00:00
|
|
|
#include "WXInputBase.h"
|
2009-07-05 04:29:00 +00:00
|
|
|
#include "ConfigPadDlg.h"
|
|
|
|
#include "ConfigBasicDlg.h"
|
2008-12-08 05:25:12 +00:00
|
|
|
#include "Config.h"
|
2009-02-08 15:39:28 +00:00
|
|
|
#include "EmuDefinitions.h" // for joyinfo
|
2009-01-25 23:07:15 +00:00
|
|
|
|
2010-08-11 02:28:40 +00:00
|
|
|
BEGIN_EVENT_TABLE(WiimotePadConfigDialog, wxDialog)
|
2009-12-09 14:52:30 +00:00
|
|
|
|
2009-07-05 04:29:00 +00:00
|
|
|
EVT_CLOSE(WiimotePadConfigDialog::OnClose)
|
2010-02-25 06:12:35 +00:00
|
|
|
EVT_BUTTON(wxID_CLOSE, WiimotePadConfigDialog::CloseClick)
|
|
|
|
// EVT_BUTTON(wxID_APPLY, WiimotePadConfigDialog::CloseClick)
|
2009-12-27 19:31:02 +00:00
|
|
|
EVT_NOTEBOOK_PAGE_CHANGED(ID_NOTEBOOK, WiimotePadConfigDialog::NotebookPageChanged)
|
2009-07-05 04:29:00 +00:00
|
|
|
|
2009-12-09 14:52:30 +00:00
|
|
|
EVT_TIMER(IDTM_BUTTON, WiimotePadConfigDialog::OnButtonTimer)
|
2009-12-27 19:31:02 +00:00
|
|
|
EVT_TIMER(IDTM_UPDATE_PAD, WiimotePadConfigDialog::UpdatePadInfo)
|
2009-12-09 14:52:30 +00:00
|
|
|
|
2010-02-23 02:20:35 +00:00
|
|
|
EVT_CHOICE(IDC_JOYNAME, WiimotePadConfigDialog::GeneralSettingsChanged)
|
2009-12-06 01:15:13 +00:00
|
|
|
EVT_CHECKBOX(IDC_RUMBLE, WiimotePadConfigDialog::GeneralSettingsChanged)
|
2010-02-23 02:20:35 +00:00
|
|
|
EVT_CHOICE(IDC_RUMBLE_STRENGTH, WiimotePadConfigDialog::GeneralSettingsChanged)
|
|
|
|
EVT_CHOICE(IDC_DEAD_ZONE_LEFT, WiimotePadConfigDialog::GeneralSettingsChanged)
|
|
|
|
EVT_CHOICE(IDC_DEAD_ZONE_RIGHT, WiimotePadConfigDialog::GeneralSettingsChanged)
|
|
|
|
EVT_CHOICE(IDC_STICK_DIAGONAL, WiimotePadConfigDialog::GeneralSettingsChanged)
|
2009-12-09 14:52:30 +00:00
|
|
|
EVT_CHECKBOX(IDC_STICK_C2S, WiimotePadConfigDialog::GeneralSettingsChanged)
|
2010-02-23 02:20:35 +00:00
|
|
|
EVT_CHOICE(IDC_TILT_TYPE_WM, WiimotePadConfigDialog::GeneralSettingsChanged)
|
|
|
|
EVT_CHOICE(IDC_TILT_TYPE_NC, WiimotePadConfigDialog::GeneralSettingsChanged)
|
|
|
|
EVT_CHOICE(IDC_TILT_ROLL, WiimotePadConfigDialog::GeneralSettingsChanged)
|
2009-12-14 02:23:14 +00:00
|
|
|
EVT_CHECKBOX(IDC_TILT_ROLL_SWING, WiimotePadConfigDialog::GeneralSettingsChanged)
|
2010-02-23 02:20:35 +00:00
|
|
|
EVT_CHOICE(IDC_TILT_PITCH, WiimotePadConfigDialog::GeneralSettingsChanged)
|
2009-12-14 02:23:14 +00:00
|
|
|
EVT_CHECKBOX(IDC_TILT_PITCH_SWING, WiimotePadConfigDialog::GeneralSettingsChanged)
|
|
|
|
EVT_CHECKBOX(IDC_TILT_ROLL_INVERT, WiimotePadConfigDialog::GeneralSettingsChanged)
|
|
|
|
EVT_CHECKBOX(IDC_TILT_PITCH_INVERT, WiimotePadConfigDialog::GeneralSettingsChanged)
|
2010-08-11 02:28:40 +00:00
|
|
|
EVT_CHOICE(IDC_TRIGGER_TYPE, WiimotePadConfigDialog::GeneralSettingsChanged)
|
2010-02-23 02:20:35 +00:00
|
|
|
EVT_CHOICE(IDC_NUNCHUCK_STICK, WiimotePadConfigDialog::GeneralSettingsChanged)
|
|
|
|
EVT_CHOICE(IDC_CC_LEFT_STICK, WiimotePadConfigDialog::GeneralSettingsChanged)
|
|
|
|
EVT_CHOICE(IDC_CC_RIGHT_STICK, WiimotePadConfigDialog::GeneralSettingsChanged)
|
|
|
|
EVT_CHOICE(IDC_CC_TRIGGERS, WiimotePadConfigDialog::GeneralSettingsChanged)
|
|
|
|
EVT_CHOICE(IDC_GH3_ANALOG, WiimotePadConfigDialog::GeneralSettingsChanged)
|
2009-12-09 14:52:30 +00:00
|
|
|
|
|
|
|
// Analog
|
2010-08-11 02:28:40 +00:00
|
|
|
EVT_BUTTON(IDB_ANALOG_LEFT_X, WiimotePadConfigDialog::OnAxisClick)
|
|
|
|
EVT_BUTTON(IDB_ANALOG_LEFT_Y, WiimotePadConfigDialog::OnAxisClick)
|
|
|
|
EVT_BUTTON(IDB_ANALOG_RIGHT_X, WiimotePadConfigDialog::OnAxisClick)
|
|
|
|
EVT_BUTTON(IDB_ANALOG_RIGHT_Y, WiimotePadConfigDialog::OnAxisClick)
|
|
|
|
EVT_BUTTON(IDB_TRIGGER_L, WiimotePadConfigDialog::OnAxisClick)
|
|
|
|
EVT_BUTTON(IDB_TRIGGER_R, WiimotePadConfigDialog::OnAxisClick)
|
2009-12-09 14:52:30 +00:00
|
|
|
|
2009-02-15 18:23:42 +00:00
|
|
|
// Wiimote
|
2010-08-11 02:28:40 +00:00
|
|
|
EVT_BUTTON(IDB_WM_A, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_WM_B, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_WM_1, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_WM_2, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_WM_P, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_WM_M, WiimotePadConfigDialog::OnButtonClick)
|
2009-12-08 19:58:19 +00:00
|
|
|
EVT_BUTTON(IDB_WM_H, WiimotePadConfigDialog::OnButtonClick)
|
2010-08-11 02:28:40 +00:00
|
|
|
EVT_BUTTON(IDB_WM_L, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_WM_R, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_WM_U, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_WM_D, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_WM_ROLL_L, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_WM_ROLL_R, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_WM_PITCH_U, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_WM_PITCH_D, WiimotePadConfigDialog::OnButtonClick)
|
2009-07-05 04:29:00 +00:00
|
|
|
EVT_BUTTON(IDB_WM_SHAKE, WiimotePadConfigDialog::OnButtonClick)
|
2009-02-16 09:25:22 +00:00
|
|
|
|
2009-02-15 18:23:42 +00:00
|
|
|
// Nunchuck
|
2010-08-11 02:28:40 +00:00
|
|
|
EVT_BUTTON(IDB_NC_Z, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_NC_C, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_NC_L, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_NC_R, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_NC_U, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_NC_D, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_NC_ROLL_L, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_NC_ROLL_R, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_NC_PITCH_U, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_NC_PITCH_D, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_NC_SHAKE, WiimotePadConfigDialog::OnButtonClick)
|
2009-02-15 18:23:42 +00:00
|
|
|
|
2009-02-24 02:40:17 +00:00
|
|
|
// Classic Controller
|
2010-08-11 02:28:40 +00:00
|
|
|
EVT_BUTTON(IDB_CC_A, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_B, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_X, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_Y, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_P, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_M, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_H, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_TL, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_ZL, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_ZR, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_TR, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_DL, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_DU, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_DR, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_DD, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_DL, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_DU, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_DR, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_DD, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_LL, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_LU, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_LR, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_LD, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_RL, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_RU, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_RR, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_CC_RD, WiimotePadConfigDialog::OnButtonClick)
|
2009-07-09 03:58:53 +00:00
|
|
|
|
2009-12-09 14:52:30 +00:00
|
|
|
// Guitar Hero 3
|
2009-07-09 03:58:53 +00:00
|
|
|
EVT_BUTTON(IDB_GH3_GREEN, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_GH3_RED, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_GH3_YELLOW, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_GH3_BLUE, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_GH3_ORANGE, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_GH3_PLUS, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_GH3_MINUS, WiimotePadConfigDialog::OnButtonClick)
|
2009-12-09 14:52:30 +00:00
|
|
|
EVT_BUTTON(IDB_GH3_WHAMMY, WiimotePadConfigDialog::OnButtonClick)
|
2009-07-09 03:58:53 +00:00
|
|
|
EVT_BUTTON(IDB_GH3_ANALOG_LEFT, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_GH3_ANALOG_RIGHT, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_GH3_ANALOG_UP, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_GH3_ANALOG_DOWN, WiimotePadConfigDialog::OnButtonClick)
|
|
|
|
EVT_BUTTON(IDB_GH3_STRUM_UP, WiimotePadConfigDialog::OnButtonClick)
|
2009-12-09 14:52:30 +00:00
|
|
|
EVT_BUTTON(IDB_GH3_STRUM_DOWN, WiimotePadConfigDialog::OnButtonClick)
|
2009-07-09 03:58:53 +00:00
|
|
|
|
2008-12-08 05:25:12 +00:00
|
|
|
END_EVENT_TABLE()
|
2009-02-06 06:15:59 +00:00
|
|
|
|
2010-08-11 02:28:40 +00:00
|
|
|
WiimotePadConfigDialog::WiimotePadConfigDialog(wxWindow *parent, wxWindowID id,
|
|
|
|
const wxString &title, const wxPoint &position, const wxSize& size, long style)
|
2009-07-06 00:27:32 +00:00
|
|
|
: wxDialog(parent, id, title, position, size, style)
|
2008-12-08 05:25:12 +00:00
|
|
|
{
|
2010-01-22 23:19:16 +00:00
|
|
|
m_ControlsCreated = false;;
|
|
|
|
CreatePadGUIControls();
|
|
|
|
|
2009-07-05 04:29:00 +00:00
|
|
|
#if wxUSE_TIMER
|
|
|
|
m_ButtonMappingTimer = new wxTimer(this, IDTM_BUTTON);
|
2009-12-09 14:52:30 +00:00
|
|
|
m_UpdatePadTimer = new wxTimer(this, IDTM_UPDATE_PAD);
|
2009-07-05 04:29:00 +00:00
|
|
|
|
|
|
|
// Reset values
|
2009-12-17 16:14:48 +00:00
|
|
|
g_Pressed = 0;
|
|
|
|
ClickedButton = NULL;
|
2009-07-05 04:29:00 +00:00
|
|
|
GetButtonWaitingID = 0;
|
|
|
|
GetButtonWaitingTimer = 0;
|
|
|
|
|
2009-12-27 19:31:02 +00:00
|
|
|
if (WiiMoteEmu::NumGoodPads)
|
|
|
|
{
|
|
|
|
// Start the permanent timer
|
|
|
|
const int TimesPerSecond = 10;
|
|
|
|
m_UpdatePadTimer->Start(1000 / TimesPerSecond);
|
|
|
|
}
|
2009-07-05 04:29:00 +00:00
|
|
|
#endif
|
2009-01-26 14:13:27 +00:00
|
|
|
|
2010-01-29 03:11:29 +00:00
|
|
|
m_Page = g_Config.CurrentPage;
|
|
|
|
m_Notebook->ChangeSelection(m_Page);
|
2009-02-14 01:15:35 +00:00
|
|
|
// Set control values
|
2009-01-26 07:01:43 +00:00
|
|
|
UpdateGUI();
|
2008-12-08 05:25:12 +00:00
|
|
|
}
|
|
|
|
|
2009-11-29 17:58:52 +00:00
|
|
|
WiimotePadConfigDialog::~WiimotePadConfigDialog()
|
|
|
|
{
|
|
|
|
if (m_ButtonMappingTimer)
|
2009-12-09 14:52:30 +00:00
|
|
|
{
|
2009-11-29 17:58:52 +00:00
|
|
|
delete m_ButtonMappingTimer;
|
2009-12-09 14:52:30 +00:00
|
|
|
m_ButtonMappingTimer = NULL;
|
|
|
|
}
|
|
|
|
if (m_UpdatePadTimer)
|
|
|
|
{
|
|
|
|
delete m_UpdatePadTimer;
|
|
|
|
m_UpdatePadTimer = NULL;
|
|
|
|
}
|
2009-11-29 17:58:52 +00:00
|
|
|
}
|
|
|
|
|
2010-01-22 23:19:16 +00:00
|
|
|
// Notebook page changed
|
|
|
|
void WiimotePadConfigDialog::NotebookPageChanged(wxNotebookEvent& event)
|
|
|
|
{
|
|
|
|
// Update the global variable
|
|
|
|
m_Page = event.GetSelection();
|
|
|
|
|
|
|
|
// Update GUI
|
|
|
|
if (m_ControlsCreated)
|
|
|
|
UpdateGUI();
|
|
|
|
}
|
|
|
|
|
|
|
|
void WiimotePadConfigDialog::OnClose(wxCloseEvent& event)
|
|
|
|
{
|
|
|
|
if (m_UpdatePadTimer)
|
|
|
|
m_UpdatePadTimer->Stop();
|
|
|
|
if (m_ButtonMappingTimer)
|
|
|
|
m_ButtonMappingTimer->Stop();
|
|
|
|
|
|
|
|
g_Config.CurrentPage = m_Page;
|
|
|
|
|
|
|
|
EndModal(wxID_CLOSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
void WiimotePadConfigDialog::CloseClick(wxCommandEvent& event)
|
|
|
|
{
|
|
|
|
switch(event.GetId())
|
|
|
|
{
|
2010-02-25 06:12:35 +00:00
|
|
|
case wxID_CLOSE:
|
2010-01-22 23:19:16 +00:00
|
|
|
Close();
|
|
|
|
break;
|
2010-02-25 06:12:35 +00:00
|
|
|
case wxID_APPLY:
|
2010-01-22 23:19:16 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-12-27 19:31:02 +00:00
|
|
|
// Save keyboard key mapping
|
|
|
|
void WiimotePadConfigDialog::SaveButtonMapping(int Id, int Key)
|
|
|
|
{
|
|
|
|
if (IDB_ANALOG_LEFT_X <= Id && Id <= IDB_TRIGGER_R)
|
|
|
|
{
|
|
|
|
WiiMoteEmu::WiiMapping[m_Page].AxisMapping.Code[Id - IDB_ANALOG_LEFT_X] = Key;
|
|
|
|
}
|
|
|
|
else if (IDB_WM_A <= Id && Id <= IDB_GH3_STRUM_DOWN)
|
|
|
|
{
|
|
|
|
WiiMoteEmu::WiiMapping[m_Page].Button[Id - IDB_WM_A] = Key;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-07-05 04:29:00 +00:00
|
|
|
void WiimotePadConfigDialog::OnKeyDown(wxKeyEvent& event)
|
2009-01-28 16:09:08 +00:00
|
|
|
{
|
2010-01-29 03:11:29 +00:00
|
|
|
//event.Skip();
|
2009-01-28 16:09:08 +00:00
|
|
|
|
2009-02-15 18:23:42 +00:00
|
|
|
if(ClickedButton != NULL)
|
|
|
|
{
|
2009-11-29 17:58:52 +00:00
|
|
|
// Save the key
|
|
|
|
g_Pressed = event.GetKeyCode();
|
|
|
|
// Handle the keyboard key mapping
|
|
|
|
|
2009-02-15 18:23:42 +00:00
|
|
|
// Allow the escape key to set a blank key
|
|
|
|
if (g_Pressed == WXK_ESCAPE)
|
|
|
|
{
|
2009-12-27 19:31:02 +00:00
|
|
|
SaveButtonMapping(ClickedButton->GetId(), -1);
|
|
|
|
SetButtonText(ClickedButton->GetId(), wxString());
|
2009-02-15 18:23:42 +00:00
|
|
|
}
|
2009-11-29 17:58:52 +00:00
|
|
|
else
|
|
|
|
{
|
2009-02-15 18:23:42 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
BYTE keyState[256];
|
|
|
|
GetKeyboardState(keyState);
|
|
|
|
for (int i = 1; i < 256; ++i)
|
|
|
|
{
|
|
|
|
if ((keyState[i] & 0x80) != 0)
|
|
|
|
{
|
|
|
|
// Use the left and right specific keys instead of the common ones
|
|
|
|
if (i == VK_SHIFT || i == VK_CONTROL || i == VK_MENU) continue;
|
|
|
|
// Update the button label
|
2009-12-27 19:31:02 +00:00
|
|
|
SetButtonText(ClickedButton->GetId(),
|
|
|
|
wxString::FromAscii(InputCommon::VKToString(i).c_str()));
|
2009-02-15 18:23:42 +00:00
|
|
|
// Save the setting
|
2009-12-27 19:31:02 +00:00
|
|
|
SaveButtonMapping(ClickedButton->GetId(), i);
|
2009-11-28 19:45:24 +00:00
|
|
|
break;
|
2009-02-15 18:23:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
#elif defined(HAVE_X11) && HAVE_X11
|
2010-05-26 20:46:51 +00:00
|
|
|
char keyStr[128] = {0};
|
2009-12-17 16:14:48 +00:00
|
|
|
int XKey = InputCommon::wxCharCodeWXToX(g_Pressed);
|
|
|
|
InputCommon::XKeyToString(XKey, keyStr);
|
2009-12-29 12:13:47 +00:00
|
|
|
SetButtonText(ClickedButton->GetId(),
|
|
|
|
wxString::FromAscii(keyStr));
|
|
|
|
SaveButtonMapping(ClickedButton->GetId(), XKey);
|
2010-06-05 19:03:37 +00:00
|
|
|
#elif defined(USE_WX) && USE_WX
|
|
|
|
SetButtonText(ClickedButton->GetId(),
|
|
|
|
InputCommon::WXKeyToString(g_Pressed));
|
|
|
|
SaveButtonMapping(ClickedButton->GetId(), g_Pressed);
|
2009-02-15 18:23:42 +00:00
|
|
|
#endif
|
2009-11-29 17:58:52 +00:00
|
|
|
}
|
2010-03-17 01:54:40 +00:00
|
|
|
EndGetButtons();
|
2009-02-15 18:23:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Input button clicked
|
2009-07-05 04:29:00 +00:00
|
|
|
void WiimotePadConfigDialog::OnButtonClick(wxCommandEvent& event)
|
2009-02-15 18:23:42 +00:00
|
|
|
{
|
2009-12-17 16:14:48 +00:00
|
|
|
event.Skip();
|
2009-11-29 17:58:52 +00:00
|
|
|
|
2009-02-15 18:23:42 +00:00
|
|
|
// Don't allow space to start a new Press Key option, that will interfer with setting a key to space
|
|
|
|
if (g_Pressed == WXK_SPACE) { g_Pressed = 0; return; }
|
|
|
|
|
2009-12-17 16:14:48 +00:00
|
|
|
if (m_ButtonMappingTimer->IsRunning()) return;
|
|
|
|
|
2010-03-17 01:54:40 +00:00
|
|
|
wxTheApp->Connect(wxID_ANY, wxEVT_KEY_DOWN, // Keyboard
|
|
|
|
wxKeyEventHandler(WiimotePadConfigDialog::OnKeyDown),
|
|
|
|
(wxObject*)0, this);
|
|
|
|
|
2009-02-15 18:23:42 +00:00
|
|
|
// Create the button object
|
|
|
|
ClickedButton = (wxButton *)event.GetEventObject();
|
2009-11-29 17:58:52 +00:00
|
|
|
// Save old label so we can revert back
|
2009-02-15 18:23:42 +00:00
|
|
|
OldLabel = ClickedButton->GetLabel();
|
2009-12-28 04:35:03 +00:00
|
|
|
ClickedButton->SetWindowStyle(wxWANTS_CHARS);
|
2009-11-29 17:58:52 +00:00
|
|
|
ClickedButton->SetLabel(wxT("<Press Key>"));
|
|
|
|
DoGetButtons(ClickedButton->GetId());
|
2009-01-28 16:09:08 +00:00
|
|
|
}
|
2009-02-03 07:43:52 +00:00
|
|
|
|
2010-01-22 23:19:16 +00:00
|
|
|
void WiimotePadConfigDialog::OnAxisClick(wxCommandEvent& event)
|
2008-12-08 05:25:12 +00:00
|
|
|
{
|
2010-01-22 23:19:16 +00:00
|
|
|
event.Skip();
|
2009-12-27 19:31:02 +00:00
|
|
|
|
2010-01-22 23:19:16 +00:00
|
|
|
if (m_ButtonMappingTimer->IsRunning()) return;
|
2009-02-03 07:43:52 +00:00
|
|
|
|
2010-01-22 23:19:16 +00:00
|
|
|
ClickedButton = NULL;
|
|
|
|
wxButton* pButton = (wxButton *)event.GetEventObject();
|
|
|
|
OldLabel = pButton->GetLabel();
|
|
|
|
pButton->SetWindowStyle(wxWANTS_CHARS);
|
|
|
|
pButton->SetLabel(wxT("<Move Axis>"));
|
|
|
|
DoGetButtons(pButton->GetId());
|
2009-02-07 04:19:52 +00:00
|
|
|
}
|
2009-02-10 17:25:08 +00:00
|
|
|
|
2009-02-04 13:35:28 +00:00
|
|
|
// Bitmap box and dot
|
2009-07-05 04:29:00 +00:00
|
|
|
wxBitmap WiimotePadConfigDialog::CreateBitmap()
|
2009-02-04 13:35:28 +00:00
|
|
|
{
|
|
|
|
BoxW = 70, BoxH = 70;
|
|
|
|
wxBitmap bitmap(BoxW, BoxH);
|
|
|
|
wxMemoryDC dc;
|
|
|
|
dc.SelectObject(bitmap);
|
|
|
|
|
|
|
|
// Set outline and fill colors
|
|
|
|
wxPen LightBluePen(_T("#7f9db9")); // Windows XP color
|
|
|
|
dc.SetPen(LightBluePen);
|
|
|
|
dc.SetBrush(*wxWHITE_BRUSH);
|
|
|
|
|
|
|
|
dc.Clear();
|
|
|
|
dc.DrawRectangle(0, 0, BoxW, BoxH);
|
|
|
|
dc.SelectObject(wxNullBitmap);
|
|
|
|
return bitmap;
|
2009-01-28 16:09:08 +00:00
|
|
|
}
|
2009-12-09 14:52:30 +00:00
|
|
|
|
2009-07-05 04:29:00 +00:00
|
|
|
wxBitmap WiimotePadConfigDialog::CreateBitmapDot()
|
2009-01-28 16:09:08 +00:00
|
|
|
{
|
2009-02-04 13:35:28 +00:00
|
|
|
int w = 2, h = 2;
|
|
|
|
wxBitmap bitmap(w, h);
|
|
|
|
wxMemoryDC dc;
|
|
|
|
dc.SelectObject(bitmap);
|
|
|
|
|
|
|
|
// Set outline and fill colors
|
|
|
|
dc.SetPen(*wxRED_PEN);
|
|
|
|
dc.SetBrush(*wxRED_BRUSH);
|
|
|
|
|
|
|
|
dc.Clear();
|
|
|
|
dc.DrawRectangle(0, 0, w, h);
|
|
|
|
dc.SelectObject(wxNullBitmap);
|
|
|
|
return bitmap;
|
2009-01-28 16:09:08 +00:00
|
|
|
}
|
2009-12-09 14:52:30 +00:00
|
|
|
|
2009-07-05 04:29:00 +00:00
|
|
|
wxBitmap WiimotePadConfigDialog::CreateBitmapDeadZone(int Radius)
|
2009-02-14 01:15:35 +00:00
|
|
|
{
|
2010-08-11 02:28:40 +00:00
|
|
|
int _Radius = Radius ? Radius : 1;
|
|
|
|
|
|
|
|
wxBitmap bitmap(_Radius * 2, _Radius * 2);
|
2009-02-14 01:15:35 +00:00
|
|
|
wxMemoryDC dc;
|
|
|
|
dc.SelectObject(bitmap);
|
|
|
|
|
|
|
|
// Set outline and fill colors
|
|
|
|
dc.SetPen(*wxLIGHT_GREY_PEN);
|
|
|
|
dc.SetBrush(*wxLIGHT_GREY_BRUSH);
|
|
|
|
|
|
|
|
//dc.SetBackground(*wxGREEN_BRUSH);
|
|
|
|
dc.Clear();
|
|
|
|
dc.DrawCircle(Radius, Radius, Radius);
|
2009-12-09 14:52:30 +00:00
|
|
|
dc.SelectObject(wxNullBitmap);
|
2009-02-14 01:15:35 +00:00
|
|
|
return bitmap;
|
|
|
|
}
|
2009-12-09 14:52:30 +00:00
|
|
|
|
2009-07-05 04:29:00 +00:00
|
|
|
wxBitmap WiimotePadConfigDialog::CreateBitmapClear()
|
2009-02-14 01:15:35 +00:00
|
|
|
{
|
|
|
|
wxBitmap bitmap(BoxW, BoxH);
|
|
|
|
wxMemoryDC dc;
|
|
|
|
dc.SelectObject(bitmap);
|
|
|
|
|
|
|
|
dc.Clear();
|
2009-12-09 14:52:30 +00:00
|
|
|
dc.SelectObject(wxNullBitmap);
|
2009-02-14 01:15:35 +00:00
|
|
|
return bitmap;
|
|
|
|
}
|
2008-12-08 05:25:12 +00:00
|
|
|
|
2009-11-14 17:08:32 +00:00
|
|
|
void WiimotePadConfigDialog::CreatePadGUIControls()
|
2009-07-05 04:29:00 +00:00
|
|
|
{
|
2009-11-14 17:08:32 +00:00
|
|
|
// Search for devices and add them to the device list
|
|
|
|
wxArrayString StrJoyname; // The string array
|
|
|
|
if (WiiMoteEmu::NumGoodPads > 0)
|
2009-02-04 13:35:28 +00:00
|
|
|
{
|
2009-11-14 17:08:32 +00:00
|
|
|
for (int x = 0; x < (int)WiiMoteEmu::joyinfo.size(); x++)
|
|
|
|
StrJoyname.Add(wxString::FromAscii(WiiMoteEmu::joyinfo[x].Name.c_str()));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-12-27 19:31:02 +00:00
|
|
|
StrJoyname.Add(wxT("<No Gamepad Detected>"));
|
2009-11-14 17:08:32 +00:00
|
|
|
}
|
2009-11-12 18:57:35 +00:00
|
|
|
|
2009-12-09 14:52:30 +00:00
|
|
|
wxArrayString TextDeadZone;
|
|
|
|
for (int i = 0; i <= 50; i++)
|
|
|
|
TextDeadZone.Add(wxString::Format(wxT("%i%%"), i));
|
|
|
|
|
|
|
|
wxArrayString StrDiagonal;
|
2010-01-22 23:19:16 +00:00
|
|
|
for (int i = 0; i <= 10; i++)
|
|
|
|
StrDiagonal.Add(wxString::Format(wxT("%i%%"), 100 - i * 5));
|
2009-12-09 14:52:30 +00:00
|
|
|
|
|
|
|
wxArrayString StrRumble;
|
|
|
|
for (int i = 0; i <= 10; i++)
|
|
|
|
StrRumble.Add(wxString::Format(wxT("%i%%"), i*10));
|
|
|
|
|
2009-02-04 13:35:28 +00:00
|
|
|
// The tilt list
|
|
|
|
wxArrayString StrTilt;
|
2009-12-27 19:31:02 +00:00
|
|
|
StrTilt.Add(wxT("Keyboard"));
|
|
|
|
StrTilt.Add(wxT("Analog 1"));
|
|
|
|
StrTilt.Add(wxT("Analog 2"));
|
|
|
|
StrTilt.Add(wxT("Triggers"));
|
2009-12-09 14:52:30 +00:00
|
|
|
|
2009-02-10 17:25:08 +00:00
|
|
|
// The range is in degrees and are set at even 5 degrees values
|
2009-02-12 08:46:48 +00:00
|
|
|
wxArrayString StrTiltRangeRoll, StrTiltRangePitch;
|
2009-12-14 02:23:14 +00:00
|
|
|
for (int i = 1; i <= 36; i++)
|
2009-02-28 01:26:56 +00:00
|
|
|
StrTiltRangeRoll.Add(wxString::Format(wxT("%i"), i*5));
|
2009-12-14 02:23:14 +00:00
|
|
|
for (int i = 1; i <= 36; i++)
|
2009-02-28 01:26:56 +00:00
|
|
|
StrTiltRangePitch.Add(wxString::Format(wxT("%i"), i*5));
|
2009-01-26 14:13:27 +00:00
|
|
|
|
2009-02-04 13:35:28 +00:00
|
|
|
// The Trigger type list
|
2009-02-06 06:15:59 +00:00
|
|
|
wxArrayString StrTriggerType;
|
2009-12-27 19:31:02 +00:00
|
|
|
StrTriggerType.Add(wxT("SDL")); // -0x8000 to 0x7fff
|
|
|
|
StrTriggerType.Add(wxT("XInput")); // 0x00 to 0xff
|
2009-02-15 02:01:43 +00:00
|
|
|
|
|
|
|
// The Nunchuck stick list
|
|
|
|
wxArrayString StrNunchuck;
|
2009-12-27 19:31:02 +00:00
|
|
|
StrNunchuck.Add(wxT("Keyboard"));
|
|
|
|
StrNunchuck.Add(wxT("Analog 1"));
|
|
|
|
StrNunchuck.Add(wxT("Analog 2"));
|
2009-02-15 18:23:42 +00:00
|
|
|
|
2009-02-24 02:40:17 +00:00
|
|
|
// The Classic Controller triggers list
|
|
|
|
wxArrayString StrCcTriggers;
|
2009-12-27 19:31:02 +00:00
|
|
|
StrCcTriggers.Add(wxT("Keyboard"));
|
|
|
|
StrCcTriggers.Add(wxT("Triggers"));
|
2009-11-14 17:08:32 +00:00
|
|
|
|
2009-12-09 14:52:30 +00:00
|
|
|
// GH3 stick list
|
|
|
|
wxArrayString StrAnalogArray;
|
2009-12-27 19:31:02 +00:00
|
|
|
StrAnalogArray.Add(wxT("Analog 1"));
|
|
|
|
StrAnalogArray.Add(wxT("Analog 2"));
|
2009-12-09 14:52:30 +00:00
|
|
|
|
|
|
|
static const wxChar* anText[] =
|
|
|
|
{
|
|
|
|
wxT("Left X-Axis"),
|
|
|
|
wxT("Left Y-Axis"),
|
|
|
|
wxT("Right X-Axis"),
|
|
|
|
wxT("Right Y-Axis"),
|
|
|
|
wxT("Left Trigger"),
|
|
|
|
wxT("Right Trigger"),
|
|
|
|
};
|
|
|
|
|
|
|
|
static const wxChar* wmText[] =
|
|
|
|
{
|
|
|
|
wxT("A"),
|
|
|
|
wxT("B"),
|
|
|
|
wxT("1"),
|
|
|
|
wxT("2"),
|
|
|
|
wxT("+"),
|
|
|
|
wxT("- "), // Intentional space
|
|
|
|
wxT("Home"),
|
|
|
|
wxT("Left"),
|
|
|
|
wxT("Right"),
|
|
|
|
wxT("Up"),
|
|
|
|
wxT("Down"),
|
|
|
|
wxT("Roll Left"),
|
|
|
|
wxT("Roll Right"),
|
|
|
|
wxT("Pitch Up"),
|
|
|
|
wxT("Pitch Down"),
|
|
|
|
wxT("Shake"),
|
|
|
|
};
|
|
|
|
|
|
|
|
static const wxChar* ncText[] =
|
|
|
|
{
|
|
|
|
wxT("Z"),
|
|
|
|
wxT("C"),
|
|
|
|
wxT("Left"),
|
|
|
|
wxT("Right"),
|
|
|
|
wxT("Up"),
|
|
|
|
wxT("Down"),
|
2009-12-17 14:15:56 +00:00
|
|
|
wxT("Roll Left"),
|
|
|
|
wxT("Roll Right"),
|
|
|
|
wxT("Pitch Up"),
|
|
|
|
wxT("Pitch Down"),
|
2009-12-09 14:52:30 +00:00
|
|
|
wxT("Shake"),
|
|
|
|
};
|
|
|
|
|
|
|
|
static const wxChar* classicText[] =
|
|
|
|
{
|
|
|
|
wxT("A"),
|
|
|
|
wxT("B"),
|
|
|
|
wxT("X"),
|
|
|
|
wxT("Y"),
|
|
|
|
wxT("+"),
|
|
|
|
wxT("- "),
|
|
|
|
wxT("Home"),
|
|
|
|
wxT("Left trigger"),
|
|
|
|
wxT("Right trigger"),
|
|
|
|
wxT("Left Z"),
|
|
|
|
wxT("Right Z"),
|
|
|
|
wxT("Digital Left"),
|
|
|
|
wxT("Digital Right"),
|
|
|
|
wxT("Digital Up"),
|
|
|
|
wxT("Digital Down"),
|
|
|
|
wxT("L Left"),
|
|
|
|
wxT("L Right"),
|
|
|
|
wxT("L Up"),
|
|
|
|
wxT("L Down"),
|
|
|
|
wxT("R Left"),
|
|
|
|
wxT("R Right"),
|
|
|
|
wxT("R Up"),
|
|
|
|
wxT("R Down"),
|
|
|
|
};
|
|
|
|
|
|
|
|
static const wxChar* gh3Text[] =
|
|
|
|
{
|
|
|
|
wxT("Green"),
|
|
|
|
wxT("Red"),
|
|
|
|
wxT("Yellow"),
|
|
|
|
wxT("Blue"),
|
|
|
|
wxT("Orange"),
|
|
|
|
wxT("+"),
|
|
|
|
wxT("- "),
|
|
|
|
wxT("Whammy"),
|
|
|
|
wxT("Left"), //analog stick
|
|
|
|
wxT("Right"),
|
|
|
|
wxT("Up"),
|
|
|
|
wxT("Down"),
|
|
|
|
wxT("Strum Up"),
|
|
|
|
wxT("Strum Down"),
|
|
|
|
};
|
|
|
|
|
|
|
|
// Configuration controls sizes
|
2010-01-24 18:23:47 +00:00
|
|
|
static const int BtW = 70, BtH = 20;
|
2009-12-09 14:52:30 +00:00
|
|
|
// A small type font
|
|
|
|
wxFont m_SmallFont(7, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
|
2009-11-14 17:08:32 +00:00
|
|
|
|
2009-07-05 04:29:00 +00:00
|
|
|
m_Notebook = new wxNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize);
|
|
|
|
|
2009-05-16 04:53:48 +00:00
|
|
|
for (int i = 0; i < MAX_WIIMOTES; i++)
|
2009-11-14 17:08:32 +00:00
|
|
|
{
|
2010-08-11 02:28:40 +00:00
|
|
|
wxPanel *m_Controller =
|
|
|
|
new wxPanel(m_Notebook, ID_CONTROLLERPAGE1 + i, wxDefaultPosition, wxDefaultSize);
|
|
|
|
m_Notebook->AddPage(m_Controller, wxString::Format(wxT("Wiimote %d"), i+1));
|
2009-02-20 03:13:22 +00:00
|
|
|
|
2009-02-12 08:46:48 +00:00
|
|
|
// Controller
|
2010-08-11 02:28:40 +00:00
|
|
|
m_Joyname[i] = new wxChoice(m_Controller, IDC_JOYNAME, wxDefaultPosition,
|
|
|
|
wxSize(200, -1), StrJoyname, 0, wxDefaultValidator, StrJoyname[0]);
|
2009-12-09 14:52:30 +00:00
|
|
|
m_Joyname[i]->SetToolTip(wxT("Save your settings and configure another joypad"));
|
2009-02-12 08:46:48 +00:00
|
|
|
|
2009-12-09 14:52:30 +00:00
|
|
|
// Dead zone
|
2010-08-11 02:28:40 +00:00
|
|
|
wxStaticText *m_ComboDeadZoneLabel = new wxStaticText(m_Controller, wxID_ANY, wxT("Dead Zone"));
|
|
|
|
m_ComboDeadZoneLeft[i] = new wxChoice(m_Controller, IDC_DEAD_ZONE_LEFT,
|
|
|
|
wxDefaultPosition, wxSize(50, -1), TextDeadZone, 0, wxDefaultValidator, TextDeadZone[0]);
|
|
|
|
m_ComboDeadZoneRight[i] = new wxChoice(m_Controller, IDC_DEAD_ZONE_RIGHT,
|
|
|
|
wxDefaultPosition, wxSize(50, -1), TextDeadZone, 0, wxDefaultValidator, TextDeadZone[0]);
|
2009-12-06 01:15:13 +00:00
|
|
|
|
2009-12-09 14:52:30 +00:00
|
|
|
// Circle to square
|
2010-08-11 02:28:40 +00:00
|
|
|
m_CheckC2S[i] = new wxCheckBox(m_Controller, IDC_STICK_C2S, wxT("Circle To Square"));
|
2009-12-09 14:52:30 +00:00
|
|
|
m_CheckC2S[i]->SetToolTip(wxT("This will convert a circular stick radius to a square stick radius.\n")
|
|
|
|
wxT("This can be useful for the pitch and roll emulation."));
|
2009-12-06 01:15:13 +00:00
|
|
|
|
2009-12-09 14:52:30 +00:00
|
|
|
// The drop down menu for the circle to square adjustment
|
2010-08-11 02:28:40 +00:00
|
|
|
wxStaticText *m_DiagonalLabel = new wxStaticText(m_Controller, wxID_ANY, wxT("Diagonal"));
|
|
|
|
m_DiagonalLabel->SetToolTip(wxT("To produce a perfect square circle in the ")
|
|
|
|
wxT("'Out' window you have to manually set\n")
|
|
|
|
wxT("your diagonal values here from what is shown in the 'In' window."));
|
|
|
|
m_ComboDiagonal[i] = new wxChoice(m_Controller, IDC_STICK_DIAGONAL,
|
|
|
|
wxDefaultPosition, wxSize(50, -1), StrDiagonal, 0, wxDefaultValidator, StrDiagonal[0]);
|
2009-12-09 14:52:30 +00:00
|
|
|
|
|
|
|
// Rumble
|
2010-08-11 02:28:40 +00:00
|
|
|
m_CheckRumble[i] = new wxCheckBox(m_Controller, IDC_RUMBLE, wxT("Rumble"));
|
|
|
|
wxStaticText *m_RumbleStrengthLabel = new wxStaticText(m_Controller, wxID_ANY, wxT("Strength"));
|
|
|
|
m_RumbleStrength[i] = new wxChoice(m_Controller, IDC_RUMBLE_STRENGTH,
|
|
|
|
wxDefaultPosition, wxSize(50, -1), StrRumble, 0, wxDefaultValidator, StrRumble[0]);
|
2009-02-04 13:35:28 +00:00
|
|
|
|
2009-02-12 08:46:48 +00:00
|
|
|
// Sizers
|
2010-08-11 02:28:40 +00:00
|
|
|
wxBoxSizer *m_sDeadZoneHoriz = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
m_sDeadZoneHoriz->Add(m_ComboDeadZoneLeft[i], 0, (wxUP), 0);
|
|
|
|
m_sDeadZoneHoriz->Add(m_ComboDeadZoneRight[i], 0, (wxUP), 0);
|
|
|
|
|
|
|
|
wxBoxSizer *m_sDeadZone = new wxBoxSizer(wxVERTICAL);
|
|
|
|
m_sDeadZone->Add(m_ComboDeadZoneLabel, 0, wxALIGN_CENTER | (wxUP), 0);
|
|
|
|
m_sDeadZone->Add(m_sDeadZoneHoriz, 0, wxALIGN_CENTER | (wxUP), 2);
|
|
|
|
|
|
|
|
wxBoxSizer *m_sDiagonal = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
m_sDiagonal->Add(m_DiagonalLabel, 0, (wxUP), 4);
|
|
|
|
m_sDiagonal->Add(m_ComboDiagonal[i], 0, (wxLEFT), 2);
|
|
|
|
|
|
|
|
wxBoxSizer *m_sCircle2Square = new wxBoxSizer(wxVERTICAL);
|
|
|
|
m_sCircle2Square->Add(m_CheckC2S[i], 0, wxALIGN_CENTER | (wxUP), 0);
|
|
|
|
m_sCircle2Square->Add(m_sDiagonal, 0, wxALIGN_CENTER | (wxUP), 2);
|
|
|
|
|
|
|
|
wxBoxSizer *m_sC2SDeadZone = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
m_sC2SDeadZone->Add(m_sDeadZone, 0, (wxUP), 0);
|
|
|
|
m_sC2SDeadZone->Add(m_sCircle2Square, 0, (wxLEFT), 8);
|
|
|
|
|
|
|
|
wxBoxSizer *m_sJoyname = new wxBoxSizer(wxVERTICAL);
|
|
|
|
m_sJoyname->Add(m_Joyname[i], 0, wxALIGN_CENTER | (wxUP | wxDOWN), 4);
|
|
|
|
m_sJoyname->Add(m_sC2SDeadZone, 0, (wxUP | wxDOWN), 4);
|
|
|
|
|
|
|
|
wxBoxSizer *m_sRumble = new wxBoxSizer(wxVERTICAL);
|
|
|
|
m_sRumble->Add(m_CheckRumble[i], 0, wxALIGN_CENTER | (wxUP | wxDOWN), 8);
|
|
|
|
m_sRumble->Add(m_RumbleStrengthLabel, 0, wxALIGN_CENTER | (wxUP), 4);
|
|
|
|
m_sRumble->Add(m_RumbleStrength[i], 0, (wxUP | wxDOWN), 2);
|
|
|
|
|
|
|
|
wxStaticBoxSizer *m_gJoyPad =
|
|
|
|
new wxStaticBoxSizer (wxHORIZONTAL, m_Controller, wxT("Gamepad"));
|
|
|
|
m_gJoyPad->AddStretchSpacer();
|
|
|
|
m_gJoyPad->Add(m_sJoyname, 0, wxEXPAND | (wxLEFT | wxRIGHT | wxDOWN), 5);
|
|
|
|
m_gJoyPad->Add(m_sRumble, 0, wxEXPAND | (wxLEFT | wxRIGHT | wxDOWN), 5);
|
|
|
|
m_gJoyPad->AddStretchSpacer();
|
2009-02-04 13:35:28 +00:00
|
|
|
|
2009-02-06 06:15:59 +00:00
|
|
|
// Tilt Wiimote
|
2010-08-11 02:28:40 +00:00
|
|
|
wxStaticText *m_tTiltTypeWM = new wxStaticText(m_Controller, wxID_ANY, wxT("Wiimote"));
|
|
|
|
wxStaticText *m_tTiltTypeNC = new wxStaticText(m_Controller, wxID_ANY, wxT("Nunchuck"));
|
2009-12-17 14:15:56 +00:00
|
|
|
|
2010-08-11 02:28:40 +00:00
|
|
|
m_TiltTypeWM[i] = new wxChoice(m_Controller, IDC_TILT_TYPE_WM,
|
|
|
|
wxDefaultPosition, wxSize(70, -1), StrTilt, 0, wxDefaultValidator, StrTilt[0]);
|
2009-12-17 14:15:56 +00:00
|
|
|
m_TiltTypeWM[i]->SetToolTip(wxT("Control Wiimote tilting by keyboard or stick or trigger"));
|
|
|
|
|
2010-08-11 02:28:40 +00:00
|
|
|
m_TiltTypeNC[i] = new wxChoice(m_Controller, IDC_TILT_TYPE_NC,
|
|
|
|
wxDefaultPosition, wxSize(70, -1), StrTilt, 0, wxDefaultValidator, StrTilt[0]);
|
2009-12-17 14:15:56 +00:00
|
|
|
m_TiltTypeNC[i]->SetToolTip(wxT("Control Nunchuck tilting by keyboard or stick or trigger"));
|
2009-07-09 03:58:53 +00:00
|
|
|
|
2010-08-11 02:28:40 +00:00
|
|
|
wxStaticText *m_TiltTextRoll = new wxStaticText(m_Controller, wxID_ANY, wxT("Roll Left/Right"));
|
|
|
|
wxStaticText *m_TiltTextPitch = new wxStaticText(m_Controller, wxID_ANY, wxT("Pitch Up/Down"));
|
2009-02-06 06:15:59 +00:00
|
|
|
|
2010-08-11 02:28:40 +00:00
|
|
|
m_TiltComboRangeRoll[i] = new wxChoice(m_Controller, IDC_TILT_ROLL,
|
|
|
|
wxDefaultPosition, wxSize(50, -1), StrTiltRangeRoll, 0,
|
|
|
|
wxDefaultValidator, StrTiltRangeRoll[0]);
|
2009-12-14 02:23:14 +00:00
|
|
|
m_TiltComboRangeRoll[i]->SetToolTip(wxT("The maximum Left/Righ Roll in degrees"));
|
2010-08-11 02:28:40 +00:00
|
|
|
m_TiltComboRangePitch[i] = new wxChoice(m_Controller, IDC_TILT_PITCH,
|
|
|
|
wxDefaultPosition, wxSize(50, -1), StrTiltRangePitch, 0,
|
|
|
|
wxDefaultValidator, StrTiltRangePitch[0]);
|
2009-12-14 02:23:14 +00:00
|
|
|
m_TiltComboRangePitch[i]->SetToolTip(wxT("The maximum Up/Down Pitch in degrees"));
|
2010-08-11 02:28:40 +00:00
|
|
|
m_TiltRollSwing[i] = new wxCheckBox(m_Controller, IDC_TILT_ROLL_SWING, wxT("Swing"));
|
2009-12-17 14:15:56 +00:00
|
|
|
m_TiltRollSwing[i]->SetToolTip(wxT("Emulate Swing Left/Right instead of Roll Left/Right"));
|
2010-08-11 02:28:40 +00:00
|
|
|
m_TiltPitchSwing[i] = new wxCheckBox(m_Controller, IDC_TILT_PITCH_SWING, wxT("Swing"));
|
2009-12-17 14:15:56 +00:00
|
|
|
m_TiltPitchSwing[i]->SetToolTip(wxT("Emulate Swing Up/Down instead of Pitch Up/Down"));
|
2010-08-11 02:28:40 +00:00
|
|
|
m_TiltRollInvert[i] = new wxCheckBox(m_Controller, IDC_TILT_ROLL_INVERT, wxT("Invert"));
|
|
|
|
m_TiltRollInvert[i]->
|
|
|
|
SetToolTip(wxT("Invert Left/Right direction (only effective for stick and trigger)"));
|
|
|
|
m_TiltPitchInvert[i] = new wxCheckBox(m_Controller, IDC_TILT_PITCH_INVERT, wxT("Invert"));
|
|
|
|
m_TiltPitchInvert[i]->
|
|
|
|
SetToolTip(wxT("Invert Up/Down direction (only effective for stick and trigger)"));
|
2009-02-12 08:46:48 +00:00
|
|
|
|
2009-12-09 14:52:30 +00:00
|
|
|
// Sizers
|
2010-08-11 02:28:40 +00:00
|
|
|
wxBoxSizer *m_sTiltType = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
m_sTiltType->Add(m_tTiltTypeWM, 0, wxEXPAND | (wxUP | wxDOWN | wxRIGHT), 4);
|
|
|
|
m_sTiltType->Add(m_TiltTypeWM[i], 0, wxEXPAND | (wxDOWN | wxRIGHT), 4);
|
|
|
|
m_sTiltType->Add(m_tTiltTypeNC, 0, wxEXPAND | (wxUP | wxDOWN | wxLEFT), 4);
|
|
|
|
m_sTiltType->Add(m_TiltTypeNC[i], 0, wxEXPAND | (wxDOWN | wxLEFT), 4);
|
|
|
|
|
|
|
|
wxGridBagSizer *m_sGridTilt = new wxGridBagSizer(0, 0);
|
|
|
|
m_sGridTilt->Add(m_TiltTextRoll, wxGBPosition(0, 0), wxGBSpan(1, 1),
|
|
|
|
(wxUP | wxRIGHT), 4);
|
|
|
|
m_sGridTilt->Add(m_TiltComboRangeRoll[i], wxGBPosition(0, 1), wxGBSpan(1, 1),
|
|
|
|
(wxLEFT | wxRIGHT), 4);
|
|
|
|
m_sGridTilt->Add(m_TiltRollSwing[i], wxGBPosition(0, 2), wxGBSpan(1, 1),
|
|
|
|
(wxUP | wxLEFT | wxRIGHT), 4);
|
|
|
|
m_sGridTilt->Add(m_TiltRollInvert[i], wxGBPosition(0, 3), wxGBSpan(1, 1),
|
|
|
|
(wxUP | wxLEFT), 4);
|
|
|
|
m_sGridTilt->Add(m_TiltTextPitch, wxGBPosition(1, 0), wxGBSpan(1, 1),
|
|
|
|
(wxUP | wxRIGHT), 4);
|
|
|
|
m_sGridTilt->Add(m_TiltComboRangePitch[i], wxGBPosition(1, 1), wxGBSpan(1, 1),
|
|
|
|
(wxLEFT | wxRIGHT), 4);
|
|
|
|
m_sGridTilt->Add(m_TiltPitchSwing[i], wxGBPosition(1, 2), wxGBSpan(1, 1),
|
|
|
|
(wxUP | wxLEFT | wxRIGHT), 4);
|
|
|
|
m_sGridTilt->Add(m_TiltPitchInvert[i], wxGBPosition(1, 3), wxGBSpan(1, 1),
|
|
|
|
(wxUP | wxLEFT), 4);
|
|
|
|
|
|
|
|
wxStaticBoxSizer *m_gTilt = new wxStaticBoxSizer (wxVERTICAL, m_Controller, wxT("Tilt and Swing"));
|
|
|
|
m_gTilt->AddStretchSpacer();
|
|
|
|
m_gTilt->Add(m_sTiltType, 0, wxEXPAND | (wxLEFT | wxDOWN), 5);
|
|
|
|
m_gTilt->Add(m_sGridTilt, 0, wxEXPAND | (wxLEFT), 5);
|
|
|
|
m_gTilt->AddStretchSpacer();
|
2009-02-06 06:15:59 +00:00
|
|
|
|
2009-12-09 14:52:30 +00:00
|
|
|
// Row 1 Sizers: Connected pads, tilt
|
2010-08-11 02:28:40 +00:00
|
|
|
wxBoxSizer *m_sHorizController = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
m_sHorizController->Add(m_gJoyPad, 0, wxEXPAND | (wxLEFT), 5);
|
|
|
|
m_sHorizController->Add(m_gTilt, 0, wxEXPAND | (wxLEFT), 5);
|
2009-02-06 06:15:59 +00:00
|
|
|
|
2009-12-09 14:52:30 +00:00
|
|
|
// Stick Status Panels
|
2010-08-11 02:28:40 +00:00
|
|
|
m_tStatusLeftIn[i] = new wxStaticText(m_Controller, wxID_ANY, wxT("Not connected"));
|
|
|
|
m_tStatusLeftOut[i] = new wxStaticText(m_Controller, wxID_ANY, wxT("Not connected"));
|
|
|
|
m_tStatusRightIn[i] = new wxStaticText(m_Controller, wxID_ANY, wxT("Not connected"));
|
|
|
|
m_tStatusRightOut[i] = new wxStaticText(m_Controller, wxID_ANY, wxT("Not connected"));
|
|
|
|
|
|
|
|
wxPanel *m_pLeftInStatus = new wxPanel(m_Controller, wxID_ANY,
|
|
|
|
wxDefaultPosition, wxDefaultSize);
|
|
|
|
m_bmpSquareLeftIn[i] = new wxStaticBitmap(m_pLeftInStatus, wxID_ANY,
|
|
|
|
CreateBitmap(), wxDefaultPosition, wxDefaultSize);
|
|
|
|
m_bmpDeadZoneLeftIn[i] = new wxStaticBitmap(m_pLeftInStatus, wxID_ANY,
|
|
|
|
CreateBitmapDeadZone(0), wxDefaultPosition, wxDefaultSize);
|
|
|
|
m_bmpDotLeftIn[i] = new wxStaticBitmap(m_pLeftInStatus, wxID_ANY,
|
|
|
|
CreateBitmapDot(), wxPoint(BoxW / 2, BoxH / 2), wxDefaultSize);
|
|
|
|
|
|
|
|
wxPanel *m_pLeftOutStatus = new wxPanel(m_Controller, wxID_ANY, wxDefaultPosition, wxDefaultSize);
|
|
|
|
m_bmpSquareLeftOut[i] = new wxStaticBitmap(m_pLeftOutStatus, wxID_ANY,
|
|
|
|
CreateBitmap(), wxDefaultPosition, wxDefaultSize);
|
|
|
|
m_bmpDotLeftOut[i] = new wxStaticBitmap(m_pLeftOutStatus, wxID_ANY,
|
|
|
|
CreateBitmapDot(), wxPoint(BoxW / 2, BoxH / 2), wxDefaultSize);
|
|
|
|
|
|
|
|
wxPanel *m_pRightInStatus = new wxPanel(m_Controller, wxID_ANY, wxDefaultPosition, wxDefaultSize);
|
|
|
|
m_bmpSquareRightIn[i] = new wxStaticBitmap(m_pRightInStatus, wxID_ANY,
|
|
|
|
CreateBitmap(), wxDefaultPosition, wxDefaultSize);
|
|
|
|
m_bmpDeadZoneRightIn[i] = new wxStaticBitmap(m_pRightInStatus, wxID_ANY,
|
|
|
|
CreateBitmapDeadZone(0), wxDefaultPosition, wxDefaultSize);
|
|
|
|
m_bmpDotRightIn[i] = new wxStaticBitmap(m_pRightInStatus, wxID_ANY,
|
|
|
|
CreateBitmapDot(), wxPoint(BoxW / 2, BoxH / 2), wxDefaultSize);
|
|
|
|
|
|
|
|
wxPanel *m_pRightOutStatus = new wxPanel(m_Controller, wxID_ANY, wxDefaultPosition, wxDefaultSize);
|
|
|
|
m_bmpSquareRightOut[i] = new wxStaticBitmap(m_pRightOutStatus, wxID_ANY,
|
|
|
|
CreateBitmap(), wxDefaultPosition, wxDefaultSize);
|
|
|
|
m_bmpDotRightOut[i] = new wxStaticBitmap(m_pRightOutStatus, wxID_ANY,
|
|
|
|
CreateBitmapDot(), wxPoint(BoxW / 2, BoxH / 2), wxDefaultSize);
|
2009-02-09 13:10:29 +00:00
|
|
|
|
2009-12-09 14:52:30 +00:00
|
|
|
// Sizers
|
2010-08-11 02:28:40 +00:00
|
|
|
wxGridBagSizer *m_sGridStickLeft = new wxGridBagSizer(0, 0);
|
|
|
|
m_sGridStickLeft->Add(m_pLeftInStatus, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALL, 0);
|
|
|
|
m_sGridStickLeft->Add(m_pLeftOutStatus, wxGBPosition(0, 1), wxGBSpan(1, 1), wxLEFT, 10);
|
|
|
|
m_sGridStickLeft->Add(m_tStatusLeftIn[i], wxGBPosition(1, 0), wxGBSpan(1, 1), wxALL, 0);
|
|
|
|
m_sGridStickLeft->Add(m_tStatusLeftOut[i], wxGBPosition(1, 1), wxGBSpan(1, 1), wxLEFT, 10);
|
|
|
|
|
|
|
|
wxGridBagSizer *m_sGridStickRight = new wxGridBagSizer(0, 0);
|
|
|
|
m_sGridStickRight->Add(m_pRightInStatus, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALL, 0);
|
|
|
|
m_sGridStickRight->Add(m_pRightOutStatus, wxGBPosition(0, 1), wxGBSpan(1, 1), wxLEFT, 10);
|
|
|
|
m_sGridStickRight->Add(m_tStatusRightIn[i], wxGBPosition(1, 0), wxGBSpan(1, 1), wxALL, 0);
|
|
|
|
m_sGridStickRight->Add(m_tStatusRightOut[i], wxGBPosition(1, 1), wxGBSpan(1, 1), wxLEFT, 10);
|
|
|
|
|
|
|
|
wxStaticBoxSizer *m_gStickLeft = new wxStaticBoxSizer (wxHORIZONTAL, m_Controller,
|
|
|
|
wxT("Analog 1 Status (In) (Out)"));
|
|
|
|
m_gStickLeft->Add(m_sGridStickLeft, 0, (wxLEFT | wxRIGHT), 5);
|
|
|
|
|
|
|
|
wxStaticBoxSizer *m_gStickRight = new wxStaticBoxSizer (wxHORIZONTAL, m_Controller,
|
|
|
|
wxT("Analog 2 Status (In) (Out)"));
|
|
|
|
m_gStickRight->Add(m_sGridStickRight, 0, (wxLEFT | wxRIGHT), 5);
|
2009-12-09 14:52:30 +00:00
|
|
|
|
2009-12-27 19:31:02 +00:00
|
|
|
// Trigger Status Panels
|
2010-08-11 02:28:40 +00:00
|
|
|
wxStaticText *m_TriggerL = new wxStaticText(m_Controller, wxID_ANY, wxT("Left:"));
|
|
|
|
wxStaticText *m_TriggerR = new wxStaticText(m_Controller, wxID_ANY, wxT("Right:"));
|
|
|
|
m_TriggerStatusL[i] = new wxStaticText(m_Controller, wxID_ANY, wxT("000"),
|
|
|
|
wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT);
|
|
|
|
m_TriggerStatusR[i] = new wxStaticText(m_Controller, wxID_ANY, wxT("000"),
|
|
|
|
wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT);
|
|
|
|
wxStaticText *m_tTriggerSource = new wxStaticText(m_Controller, wxID_ANY, wxT("Trigger Source"));
|
|
|
|
m_TriggerType[i] = new wxChoice(m_Controller, IDC_TRIGGER_TYPE,
|
|
|
|
wxDefaultPosition, wxSize(70, -1), StrTriggerType, 0,
|
|
|
|
wxDefaultValidator, StrTriggerType[0]);
|
2009-02-04 13:35:28 +00:00
|
|
|
|
2009-12-09 14:52:30 +00:00
|
|
|
// Sizers
|
2010-08-11 02:28:40 +00:00
|
|
|
wxGridBagSizer *m_sGridTrigger = new wxGridBagSizer(0, 0);
|
|
|
|
m_sGridTrigger->Add(m_TriggerL, wxGBPosition(0, 0), wxGBSpan(1, 1), (wxTOP), 4);
|
|
|
|
m_sGridTrigger->Add(m_TriggerStatusL[i], wxGBPosition(0, 1), wxGBSpan(1, 1),
|
|
|
|
(wxLEFT | wxTOP), 4);
|
|
|
|
m_sGridTrigger->Add(m_TriggerR, wxGBPosition(1, 0), wxGBSpan(1, 1), (wxTOP), 4);
|
|
|
|
m_sGridTrigger->Add(m_TriggerStatusR[i], wxGBPosition(1, 1), wxGBSpan(1, 1),
|
|
|
|
(wxLEFT | wxTOP), 4);
|
|
|
|
|
|
|
|
wxStaticBoxSizer *m_gTriggers =
|
|
|
|
new wxStaticBoxSizer (wxVERTICAL, m_Controller, wxT("Triggers Status"));
|
|
|
|
m_gTriggers->AddStretchSpacer();
|
|
|
|
m_gTriggers->Add(m_sGridTrigger, 0, wxEXPAND | (wxLEFT | wxRIGHT), 5);
|
|
|
|
m_gTriggers->Add(m_tTriggerSource, 0, wxEXPAND | (wxUP | wxLEFT | wxRIGHT), 5);
|
|
|
|
m_gTriggers->Add(m_TriggerType[i], 0, wxEXPAND | (wxUP | wxLEFT | wxRIGHT), 5);
|
|
|
|
m_gTriggers->AddStretchSpacer();
|
2009-12-09 14:52:30 +00:00
|
|
|
|
|
|
|
// Row 2 Sizers: Analog status
|
2010-08-11 02:28:40 +00:00
|
|
|
wxBoxSizer *m_sHorizStatus = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
m_sHorizStatus->Add(m_gStickLeft, 0, wxEXPAND | (wxLEFT), 5);
|
|
|
|
m_sHorizStatus->Add(m_gStickRight, 0, wxEXPAND | (wxLEFT), 5);
|
|
|
|
m_sHorizStatus->Add(m_gTriggers, 0, wxEXPAND | (wxLEFT), 5);
|
2009-12-09 14:52:30 +00:00
|
|
|
|
|
|
|
// Analog Axes and Triggers Mapping
|
2010-08-11 02:28:40 +00:00
|
|
|
wxBoxSizer *m_sAnalogLeft = new wxBoxSizer(wxVERTICAL);
|
|
|
|
wxBoxSizer *m_sAnalogMiddle = new wxBoxSizer(wxVERTICAL);
|
|
|
|
wxBoxSizer *m_sAnalogRight = new wxBoxSizer(wxVERTICAL);
|
2009-12-09 14:52:30 +00:00
|
|
|
|
2009-12-27 19:31:02 +00:00
|
|
|
for (int x = 0; x < 6; x++)
|
2009-12-09 14:52:30 +00:00
|
|
|
{
|
2010-08-11 02:28:40 +00:00
|
|
|
wxStaticText *m_statictext_Analog =
|
|
|
|
new wxStaticText(m_Controller, wxID_ANY, anText[x]);
|
|
|
|
m_Button_Analog[x][i] = new wxButton(m_Controller, x + IDB_ANALOG_LEFT_X,
|
|
|
|
wxEmptyString, wxDefaultPosition, wxSize(BtW, BtH));
|
2009-12-09 14:52:30 +00:00
|
|
|
m_Button_Analog[x][i]->SetFont(m_SmallFont);
|
2010-08-11 02:28:40 +00:00
|
|
|
wxBoxSizer *m_Sizer_Analog = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
m_Sizer_Analog->Add(m_statictext_Analog, 0, (wxUP), 4);
|
|
|
|
m_Sizer_Analog->Add(m_Button_Analog[x][i], 0, (wxLEFT), 2);
|
2009-12-09 14:52:30 +00:00
|
|
|
if (x < 2) // Make some balance
|
2010-08-11 02:28:40 +00:00
|
|
|
m_sAnalogLeft->Add(m_Sizer_Analog, 0,
|
|
|
|
wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
|
2009-12-09 14:52:30 +00:00
|
|
|
else if (x < 4)
|
2010-08-11 02:28:40 +00:00
|
|
|
m_sAnalogMiddle->Add(m_Sizer_Analog, 0,
|
|
|
|
wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
|
2009-12-09 14:52:30 +00:00
|
|
|
else
|
2010-08-11 02:28:40 +00:00
|
|
|
m_sAnalogRight->Add(m_Sizer_Analog, 0,
|
|
|
|
wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
|
2009-12-09 14:52:30 +00:00
|
|
|
}
|
2009-02-04 13:35:28 +00:00
|
|
|
|
2010-08-11 02:28:40 +00:00
|
|
|
wxStaticBoxSizer *m_gAnalog = new wxStaticBoxSizer (wxHORIZONTAL, m_Controller,
|
|
|
|
wxT("Analog Axes and Triggers"));
|
|
|
|
m_gAnalog->Add(m_sAnalogLeft, 0, wxALIGN_RIGHT | (wxALL), 0);
|
|
|
|
m_gAnalog->Add(m_sAnalogMiddle, 0, wxALIGN_RIGHT | (wxLEFT), 5);
|
|
|
|
m_gAnalog->Add(m_sAnalogRight, 0, wxALIGN_RIGHT | (wxLEFT), 5);
|
|
|
|
m_gAnalog->AddSpacer(1);
|
2009-02-04 13:35:28 +00:00
|
|
|
|
2009-12-09 14:52:30 +00:00
|
|
|
// Row 3 Sizes: Analog Mapping
|
2010-08-11 02:28:40 +00:00
|
|
|
wxBoxSizer *m_sHorizAnalogMapping = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
m_sHorizAnalogMapping->Add(m_gAnalog, 0, (wxLEFT), 5);
|
2009-07-10 05:30:19 +00:00
|
|
|
|
2009-12-09 14:52:30 +00:00
|
|
|
// Wiimote Mapping
|
2010-08-11 02:28:40 +00:00
|
|
|
wxBoxSizer *m_sWmVertLeft = new wxBoxSizer(wxVERTICAL);
|
|
|
|
wxBoxSizer *m_sWmVertRight = new wxBoxSizer(wxVERTICAL);
|
2009-12-09 14:52:30 +00:00
|
|
|
|
2009-12-27 19:31:02 +00:00
|
|
|
for (int x = 0; x <= IDB_WM_SHAKE - IDB_WM_A; x++)
|
2009-07-10 05:30:19 +00:00
|
|
|
{
|
2010-08-11 02:28:40 +00:00
|
|
|
wxStaticText *m_statictext_Wiimote = new wxStaticText(m_Controller, wxID_ANY, wmText[x]);
|
|
|
|
m_Button_Wiimote[x][i] = new wxButton(m_Controller, x + IDB_WM_A,
|
|
|
|
wxEmptyString, wxDefaultPosition, wxSize(BtW, BtH));
|
|
|
|
m_Button_Wiimote[x][i]->SetFont(m_SmallFont);
|
|
|
|
wxBoxSizer *m_Sizer_Wiimote = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
m_Sizer_Wiimote->Add(m_statictext_Wiimote, 0, (wxUP), 4);
|
|
|
|
m_Sizer_Wiimote->Add(m_Button_Wiimote[x][i], 0, (wxLEFT), 2);
|
|
|
|
if (x < 7 || x == IDB_WM_SHAKE - IDB_WM_A) // Make some balance
|
|
|
|
m_sWmVertLeft->Add(m_Sizer_Wiimote, 0,
|
|
|
|
wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
|
|
|
|
else
|
|
|
|
m_sWmVertRight->Add(m_Sizer_Wiimote, 0,
|
|
|
|
wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
|
2009-07-10 05:30:19 +00:00
|
|
|
}
|
2009-02-15 18:44:29 +00:00
|
|
|
|
2010-08-11 02:28:40 +00:00
|
|
|
wxStaticBoxSizer *m_gWiimote =
|
|
|
|
new wxStaticBoxSizer (wxHORIZONTAL, m_Controller, wxT("Wiimote"));
|
|
|
|
m_gWiimote->Add(m_sWmVertLeft, 0, (wxLEFT | wxRIGHT | wxDOWN), 1);
|
|
|
|
m_gWiimote->Add(m_sWmVertRight, 0, (wxLEFT | wxRIGHT | wxDOWN), 1);
|
|
|
|
|
|
|
|
// Row 4 Sizers: Wiimote and Extension Mapping
|
|
|
|
wxBoxSizer *m_sHorizControllerMapping = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
m_sHorizControllerMapping->Add(m_gWiimote, 0, (wxLEFT), 5);
|
2009-02-05 00:02:54 +00:00
|
|
|
|
2009-12-09 14:52:30 +00:00
|
|
|
// Extension Mapping
|
2010-05-07 22:39:06 +00:00
|
|
|
if(WiiMoteEmu::WiiMapping[i].iExtensionConnected == WiiMoteEmu::EXT_NUNCHUK)
|
2009-07-09 04:19:49 +00:00
|
|
|
{
|
|
|
|
// Stick controls
|
2010-08-11 02:28:40 +00:00
|
|
|
wxStaticText *m_NunchuckTextStick =
|
|
|
|
new wxStaticText(m_Controller, wxID_ANY, wxT("Stick"));
|
|
|
|
m_NunchuckComboStick[i] = new wxChoice(m_Controller, IDC_NUNCHUCK_STICK,
|
|
|
|
wxDefaultPosition, wxSize(70, -1), StrNunchuck, 0, wxDefaultValidator, StrNunchuck[0]);
|
2009-07-10 05:30:19 +00:00
|
|
|
|
2010-08-11 02:28:40 +00:00
|
|
|
// Sizers
|
|
|
|
wxBoxSizer *m_sNunchuckStick = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
m_sNunchuckStick->Add(m_NunchuckTextStick, 0, (wxUP), 4);
|
|
|
|
m_sNunchuckStick->Add(m_NunchuckComboStick[i], 0, (wxLEFT), 2);
|
|
|
|
|
|
|
|
wxBoxSizer *m_sNCVertLeft = new wxBoxSizer(wxVERTICAL);
|
|
|
|
wxBoxSizer *m_sNCVertRight = new wxBoxSizer(wxVERTICAL);
|
|
|
|
m_sNCVertRight->Add(m_sNunchuckStick, 0, wxALIGN_RIGHT | (wxALL), 2);
|
|
|
|
m_sNCVertRight->AddSpacer(2);
|
|
|
|
|
2009-12-27 19:31:02 +00:00
|
|
|
for (int x = 0; x <= IDB_NC_SHAKE - IDB_NC_Z; x++)
|
2009-07-10 05:30:19 +00:00
|
|
|
{
|
2010-08-11 02:28:40 +00:00
|
|
|
wxStaticText *m_statictext_Nunchuk =
|
|
|
|
new wxStaticText(m_Controller, wxID_ANY, ncText[x]);
|
|
|
|
m_Button_NunChuck[x][i] = new wxButton(m_Controller, x + IDB_NC_Z,
|
|
|
|
wxEmptyString, wxDefaultPosition, wxSize(BtW, BtH));
|
2009-07-10 05:30:19 +00:00
|
|
|
m_Button_NunChuck[x][i]->SetFont(m_SmallFont);
|
2010-08-11 02:28:40 +00:00
|
|
|
wxBoxSizer *m_Sizer_NunChuck = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
m_Sizer_NunChuck->Add(m_statictext_Nunchuk, 0, (wxUP), 4);
|
|
|
|
m_Sizer_NunChuck->Add(m_Button_NunChuck[x][i], 0, (wxLEFT), 2);
|
2009-12-17 14:15:56 +00:00
|
|
|
|
2010-08-11 02:28:40 +00:00
|
|
|
if (x < IDB_NC_ROLL_L - IDB_NC_Z) // Make some balance
|
|
|
|
m_sNCVertLeft->Add(m_Sizer_NunChuck, 0,
|
|
|
|
wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
|
2009-12-17 14:15:56 +00:00
|
|
|
else
|
2010-08-11 02:28:40 +00:00
|
|
|
m_sNCVertRight->Add(m_Sizer_NunChuck, 0,
|
|
|
|
wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
|
|
|
|
}
|
2009-12-17 14:15:56 +00:00
|
|
|
|
2010-08-11 02:28:40 +00:00
|
|
|
wxStaticBoxSizer *m_gNunchuck =
|
|
|
|
new wxStaticBoxSizer (wxHORIZONTAL, m_Controller, wxT("Nunchuck"));
|
|
|
|
m_gNunchuck->Add(m_sNCVertLeft, 0, wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
|
|
|
|
m_gNunchuck->Add(m_sNCVertRight, 0, wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
|
2009-12-17 14:15:56 +00:00
|
|
|
|
2010-08-11 02:28:40 +00:00
|
|
|
m_sHorizControllerMapping->Add(m_gNunchuck, 0, (wxLEFT), 5);
|
2009-07-09 04:19:49 +00:00
|
|
|
}
|
2009-12-27 19:31:02 +00:00
|
|
|
else if(WiiMoteEmu::WiiMapping[i].iExtensionConnected == WiiMoteEmu::EXT_CLASSIC_CONTROLLER)
|
2009-07-10 05:30:19 +00:00
|
|
|
{
|
2009-07-09 04:19:49 +00:00
|
|
|
// Stick controls
|
2010-08-11 02:28:40 +00:00
|
|
|
wxStaticText *m_CcTextLeftStick =
|
|
|
|
new wxStaticText(m_Controller, wxID_ANY, wxT("Left stick"));
|
|
|
|
m_CcComboLeftStick[i] = new wxChoice(m_Controller, IDC_CC_LEFT_STICK,
|
|
|
|
wxDefaultPosition, wxSize(70, -1), StrNunchuck, 0, wxDefaultValidator, StrNunchuck[0]);
|
|
|
|
wxStaticText *m_CcTextRightStick =
|
|
|
|
new wxStaticText(m_Controller, wxID_ANY, wxT("Right stick"));
|
|
|
|
m_CcComboRightStick[i] = new wxChoice(m_Controller, IDC_CC_RIGHT_STICK,
|
|
|
|
wxDefaultPosition, wxSize(70, -1), StrNunchuck, 0, wxDefaultValidator, StrNunchuck[0]);
|
|
|
|
wxStaticText *m_CcTextTriggers =
|
|
|
|
new wxStaticText(m_Controller, wxID_ANY, wxT("Triggers"));
|
|
|
|
m_CcComboTriggers[i] = new wxChoice(m_Controller, IDC_CC_TRIGGERS,
|
|
|
|
wxDefaultPosition, wxSize(70, -1), StrCcTriggers, 0, wxDefaultValidator, StrCcTriggers[0]);
|
2009-07-09 04:19:49 +00:00
|
|
|
|
2009-12-27 19:31:02 +00:00
|
|
|
for (int x = 0; x <= IDB_CC_RD - IDB_CC_A; x++)
|
2009-07-10 05:30:19 +00:00
|
|
|
{
|
2010-08-11 02:28:40 +00:00
|
|
|
wxStaticText *m_statictext_Classic =
|
|
|
|
new wxStaticText(m_Controller, wxID_ANY, classicText[x]);
|
|
|
|
m_Button_Classic[x][i] = new wxButton(m_Controller, x + IDB_CC_A,
|
|
|
|
wxEmptyString, wxDefaultPosition, wxSize(BtW, BtH));
|
2009-07-10 05:30:19 +00:00
|
|
|
m_Button_Classic[x][i]->SetFont(m_SmallFont);
|
|
|
|
m_Sizer_Classic[x][i] = new wxBoxSizer(wxHORIZONTAL);
|
2010-08-11 02:28:40 +00:00
|
|
|
m_Sizer_Classic[x][i]->Add(m_statictext_Classic, 0, wxALIGN_RIGHT | (wxUP), 4);
|
2009-07-10 05:30:19 +00:00
|
|
|
m_Sizer_Classic[x][i]->Add(m_Button_Classic[x][i], 0, wxALIGN_RIGHT | (wxLEFT), 2);
|
|
|
|
}
|
2009-07-09 04:19:49 +00:00
|
|
|
|
|
|
|
// Sizers
|
2010-08-11 02:28:40 +00:00
|
|
|
wxBoxSizer *m_sCcLeftStick = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
m_sCcLeftStick->Add(m_CcTextLeftStick, 0, (wxUP), 4);
|
|
|
|
m_sCcLeftStick->Add(m_CcComboLeftStick[i], 0, (wxLEFT), 2);
|
2009-07-09 04:19:49 +00:00
|
|
|
|
2010-08-11 02:28:40 +00:00
|
|
|
wxBoxSizer *m_sCcRightStick = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
m_sCcRightStick->Add(m_CcTextRightStick, 0, (wxUP), 4);
|
|
|
|
m_sCcRightStick->Add(m_CcComboRightStick[i], 0, (wxLEFT), 2);
|
2009-12-09 14:52:30 +00:00
|
|
|
|
2010-08-11 02:28:40 +00:00
|
|
|
wxBoxSizer *m_sCcTriggers = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
m_sCcTriggers->Add(m_CcTextTriggers, 0, (wxUP), 4);
|
|
|
|
m_sCcTriggers->Add(m_CcComboTriggers[i], 0, (wxLEFT), 2);
|
2009-12-09 14:52:30 +00:00
|
|
|
|
2010-08-11 02:28:40 +00:00
|
|
|
wxBoxSizer *m_sCcVertLeft = new wxBoxSizer(wxVERTICAL);
|
|
|
|
m_sCcVertLeft->Add(m_sCcLeftStick, 0, wxALIGN_RIGHT | (wxALL), 2);
|
|
|
|
m_sCcVertLeft->AddSpacer(2);
|
2009-12-09 14:52:30 +00:00
|
|
|
for (int x = IDB_CC_LL; x <= IDB_CC_LD; x++)
|
2010-08-11 02:28:40 +00:00
|
|
|
m_sCcVertLeft->Add(m_Sizer_Classic[x - IDB_CC_A][i], 0,
|
|
|
|
wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
|
2009-12-09 14:52:30 +00:00
|
|
|
for (int x = IDB_CC_DL; x <= IDB_CC_DD; x++)
|
2010-08-11 02:28:40 +00:00
|
|
|
m_sCcVertLeft->Add(m_Sizer_Classic[x - IDB_CC_A][i], 0,
|
|
|
|
wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
|
2009-12-09 14:52:30 +00:00
|
|
|
|
2010-08-11 02:28:40 +00:00
|
|
|
wxBoxSizer *m_sCcVertMiddle = new wxBoxSizer(wxVERTICAL);
|
|
|
|
m_sCcVertMiddle->Add(m_sCcRightStick, 0, wxALIGN_RIGHT | (wxALL), 2);
|
|
|
|
m_sCcVertMiddle->AddSpacer(2);
|
2009-12-09 14:52:30 +00:00
|
|
|
for (int x = IDB_CC_RL; x <= IDB_CC_RD; x++)
|
2010-08-11 02:28:40 +00:00
|
|
|
m_sCcVertMiddle->Add(m_Sizer_Classic[x - IDB_CC_A][i], 0,
|
|
|
|
wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
|
2009-12-09 14:52:30 +00:00
|
|
|
for (int x = IDB_CC_A; x <= IDB_CC_Y; x++)
|
2010-08-11 02:28:40 +00:00
|
|
|
m_sCcVertMiddle->Add(m_Sizer_Classic[x - IDB_CC_A][i], 0,
|
|
|
|
wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
|
2009-12-09 14:52:30 +00:00
|
|
|
|
2010-08-11 02:28:40 +00:00
|
|
|
wxBoxSizer *m_sCcVertRight = new wxBoxSizer(wxVERTICAL);
|
|
|
|
m_sCcVertRight->Add(m_sCcTriggers, 0, wxALIGN_RIGHT | (wxALL), 2);
|
|
|
|
m_sCcVertRight->AddSpacer(2);
|
2009-12-09 14:52:30 +00:00
|
|
|
for (int x = IDB_CC_TL; x <= IDB_CC_ZR; x++)
|
2010-08-11 02:28:40 +00:00
|
|
|
m_sCcVertRight->Add(m_Sizer_Classic[x - IDB_CC_A][i], 0,
|
|
|
|
wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
|
2009-12-09 14:52:30 +00:00
|
|
|
for (int x = IDB_CC_P; x <= IDB_CC_H; x++)
|
2010-08-11 02:28:40 +00:00
|
|
|
m_sCcVertRight->Add(m_Sizer_Classic[x - IDB_CC_A][i], 0,
|
|
|
|
wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
|
|
|
|
|
|
|
|
wxStaticBoxSizer *m_gClassicController = new wxStaticBoxSizer (wxHORIZONTAL,
|
|
|
|
m_Controller, wxT("Classic Controller"));
|
|
|
|
m_gClassicController->Add(m_sCcVertLeft, 0,
|
|
|
|
wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
|
|
|
|
m_gClassicController->Add(m_sCcVertMiddle, 0,
|
|
|
|
wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
|
|
|
|
m_gClassicController->Add(m_sCcVertRight, 0,
|
|
|
|
wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
|
|
|
|
|
|
|
|
m_sHorizControllerMapping->Add(m_gClassicController, 0, (wxLEFT), 5);
|
2009-07-09 04:19:49 +00:00
|
|
|
}
|
2009-12-27 19:31:02 +00:00
|
|
|
else if(WiiMoteEmu::WiiMapping[i].iExtensionConnected == WiiMoteEmu::EXT_GUITARHERO)
|
2009-12-09 14:52:30 +00:00
|
|
|
{
|
2009-07-09 04:19:49 +00:00
|
|
|
// Stick controls
|
2010-08-11 02:28:40 +00:00
|
|
|
wxStaticText *m_tGH3Analog =
|
|
|
|
new wxStaticText(m_Controller, wxID_ANY, wxT("Stick"));
|
|
|
|
m_GH3ComboAnalog[i] = new wxChoice(m_Controller, IDC_GH3_ANALOG,
|
|
|
|
wxDefaultPosition, wxSize(70, -1), StrAnalogArray, 0,
|
|
|
|
wxDefaultValidator, StrAnalogArray[0]);
|
|
|
|
|
|
|
|
// Sizers
|
|
|
|
wxBoxSizer *m_sGH3Analog = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
m_sGH3Analog->Add(m_tGH3Analog, 0, (wxUP), 4);
|
|
|
|
m_sGH3Analog->Add(m_GH3ComboAnalog[i], 0, (wxLEFT), 2);
|
|
|
|
|
|
|
|
wxBoxSizer *m_sGH3VertLeft = new wxBoxSizer(wxVERTICAL);
|
|
|
|
m_sGH3VertLeft->Add(m_sGH3Analog, 0, wxALIGN_RIGHT | (wxALL), 2);
|
|
|
|
m_sGH3VertLeft->AddSpacer(2);
|
|
|
|
wxBoxSizer *m_sGH3VertRight = new wxBoxSizer(wxVERTICAL);
|
2009-02-15 02:01:43 +00:00
|
|
|
|
2009-12-27 19:31:02 +00:00
|
|
|
for (int x = 0; x <= IDB_GH3_STRUM_DOWN - IDB_GH3_GREEN; x++)
|
2009-07-09 04:19:49 +00:00
|
|
|
{
|
2010-08-11 02:28:40 +00:00
|
|
|
wxStaticText *m_statictext_GH3 =
|
|
|
|
new wxStaticText(m_Controller, wxID_ANY, gh3Text[x]);
|
|
|
|
m_Button_GH3[x][i] = new wxButton(m_Controller, x,
|
|
|
|
wxEmptyString, wxDefaultPosition, wxSize(BtW, BtH));
|
2010-03-17 18:58:19 +00:00
|
|
|
m_Button_GH3[x][i]->SetFont(m_SmallFont);
|
2010-08-11 02:28:40 +00:00
|
|
|
wxBoxSizer *m_Sizer_GH3 = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
m_Sizer_GH3->Add(m_statictext_GH3, 0, (wxUP), 4);
|
|
|
|
m_Sizer_GH3->Add(m_Button_GH3[x][i], 0, (wxLEFT), 2);
|
|
|
|
|
|
|
|
if (x < IDB_GH3_ANALOG_LEFT - IDB_GH3_GREEN)
|
|
|
|
m_sGH3VertRight->Add(m_Sizer_GH3, 0,
|
|
|
|
wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
|
|
|
|
else
|
|
|
|
m_sGH3VertLeft->Add(m_Sizer_GH3, 0,
|
|
|
|
wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
|
2009-07-09 04:19:49 +00:00
|
|
|
}
|
2009-02-15 02:01:43 +00:00
|
|
|
|
2010-08-11 02:28:40 +00:00
|
|
|
wxStaticBoxSizer *m_gGuitarHero3Controller = new wxStaticBoxSizer (wxHORIZONTAL,
|
|
|
|
m_Controller, wxT("Guitar Hero 3 Controller"));
|
|
|
|
m_gGuitarHero3Controller->Add(m_sGH3VertLeft, 0,
|
|
|
|
wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
|
|
|
|
m_gGuitarHero3Controller->Add(m_sGH3VertRight, 0,
|
|
|
|
wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
|
2009-07-09 03:58:53 +00:00
|
|
|
|
2010-08-11 02:28:40 +00:00
|
|
|
m_sHorizControllerMapping->Add(m_gGuitarHero3Controller, 0, (wxLEFT), 5);
|
2009-07-09 04:19:49 +00:00
|
|
|
}
|
2009-02-05 00:02:54 +00:00
|
|
|
|
2009-02-04 13:35:28 +00:00
|
|
|
// Set up sizers and layout
|
2009-12-09 14:52:30 +00:00
|
|
|
// The sizer m_sMain will be expanded inside m_Controller
|
2010-08-11 02:28:40 +00:00
|
|
|
wxBoxSizer *m_sMain = new wxBoxSizer(wxVERTICAL);
|
|
|
|
m_sMain->Add(m_sHorizController, 0, wxEXPAND | (wxLEFT | wxRIGHT | wxDOWN), 5);
|
|
|
|
m_sMain->Add(m_sHorizStatus, 0, wxEXPAND | (wxLEFT | wxRIGHT | wxDOWN), 5);
|
|
|
|
m_sMain->Add(m_sHorizAnalogMapping, 0, wxEXPAND | (wxLEFT | wxRIGHT | wxDOWN), 5);
|
|
|
|
m_sMain->Add(m_sHorizControllerMapping, 0, wxEXPAND | (wxLEFT | wxRIGHT | wxDOWN), 5);
|
2009-02-04 13:35:28 +00:00
|
|
|
|
2009-02-06 06:15:59 +00:00
|
|
|
// Set the main sizer
|
2010-08-11 02:28:40 +00:00
|
|
|
m_Controller->SetSizer(m_sMain);
|
2009-01-26 14:13:27 +00:00
|
|
|
}
|
|
|
|
|
2010-08-11 02:28:40 +00:00
|
|
|
// wxButton *m_Apply = new wxButton(this, wxID_APPLY, wxT("Apply"));
|
|
|
|
wxButton *m_Close = new wxButton(this, wxID_CLOSE, wxT("Close"));
|
2009-02-04 13:35:28 +00:00
|
|
|
|
|
|
|
wxBoxSizer* sButtons = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
sButtons->AddStretchSpacer();
|
2009-12-14 03:30:21 +00:00
|
|
|
// sButtons->Add(m_Apply, 0, (wxALL), 0);
|
2010-08-11 02:28:40 +00:00
|
|
|
sButtons->Add(m_Close, 0, (wxLEFT), 5);
|
2009-02-04 13:35:28 +00:00
|
|
|
|
2010-08-11 02:28:40 +00:00
|
|
|
wxBoxSizer *m_MainSizer = new wxBoxSizer(wxVERTICAL);
|
2009-02-04 13:35:28 +00:00
|
|
|
m_MainSizer->Add(m_Notebook, 1, wxEXPAND | wxALL, 5);
|
|
|
|
m_MainSizer->Add(sButtons, 0, wxEXPAND | (wxLEFT | wxRIGHT | wxDOWN), 5);
|
2008-12-08 05:25:12 +00:00
|
|
|
|
2009-12-27 19:31:02 +00:00
|
|
|
SetSizer(m_MainSizer);
|
|
|
|
Layout();
|
2008-12-08 05:25:12 +00:00
|
|
|
Fit();
|
2009-02-06 07:03:09 +00:00
|
|
|
// Center the window if there is room for it
|
|
|
|
#ifdef _WIN32
|
2009-12-11 13:57:25 +00:00
|
|
|
if (GetSystemMetrics(SM_CYFULLSCREEN) > 600)
|
2009-02-06 07:03:09 +00:00
|
|
|
Center();
|
|
|
|
#endif
|
2009-01-28 16:09:08 +00:00
|
|
|
|
2010-01-22 23:19:16 +00:00
|
|
|
m_ControlsCreated = true;
|
2009-12-27 19:31:02 +00:00
|
|
|
}
|
|
|
|
|
2009-07-05 04:29:00 +00:00
|
|
|
void WiimotePadConfigDialog::GeneralSettingsChanged(wxCommandEvent& event)
|
2008-12-08 05:25:12 +00:00
|
|
|
{
|
2009-02-10 17:25:08 +00:00
|
|
|
long TmpValue;
|
2009-12-27 19:31:02 +00:00
|
|
|
int id = event.GetId();
|
2009-02-10 17:25:08 +00:00
|
|
|
|
2009-12-27 19:31:02 +00:00
|
|
|
switch (id)
|
2008-12-08 05:25:12 +00:00
|
|
|
{
|
2009-12-09 14:52:30 +00:00
|
|
|
case IDC_JOYNAME:
|
2009-12-27 19:31:02 +00:00
|
|
|
WiiMoteEmu::WiiMapping[m_Page].ID = m_Joyname[m_Page]->GetSelection();
|
2010-01-21 06:29:31 +00:00
|
|
|
WiiMoteEmu::WiiMapping[m_Page].joy = WiiMoteEmu::joyinfo.at(WiiMoteEmu::WiiMapping[m_Page].ID).joy;
|
2009-12-27 19:31:02 +00:00
|
|
|
break;
|
|
|
|
case IDC_DEAD_ZONE_LEFT:
|
|
|
|
WiiMoteEmu::WiiMapping[m_Page].DeadZoneL = m_ComboDeadZoneLeft[m_Page]->GetSelection();
|
|
|
|
break;
|
|
|
|
case IDC_DEAD_ZONE_RIGHT:
|
|
|
|
WiiMoteEmu::WiiMapping[m_Page].DeadZoneR = m_ComboDeadZoneRight[m_Page]->GetSelection();
|
|
|
|
break;
|
|
|
|
case IDC_STICK_DIAGONAL:
|
2010-01-22 23:19:16 +00:00
|
|
|
WiiMoteEmu::WiiMapping[m_Page].Diagonal = 100 - m_ComboDiagonal[m_Page]->GetSelection() * 5;
|
2009-12-27 19:31:02 +00:00
|
|
|
break;
|
|
|
|
case IDC_STICK_C2S:
|
|
|
|
WiiMoteEmu::WiiMapping[m_Page].bCircle2Square = m_CheckC2S[m_Page]->IsChecked();
|
|
|
|
break;
|
|
|
|
case IDC_RUMBLE:
|
|
|
|
WiiMoteEmu::WiiMapping[m_Page].Rumble = m_CheckRumble[m_Page]->IsChecked();
|
|
|
|
break;
|
|
|
|
case IDC_RUMBLE_STRENGTH:
|
2010-01-23 13:34:18 +00:00
|
|
|
WiiMoteEmu::WiiMapping[m_Page].RumbleStrength = m_RumbleStrength[m_Page]->GetSelection() * 10;
|
2009-02-09 13:10:29 +00:00
|
|
|
break;
|
2009-12-17 14:15:56 +00:00
|
|
|
case IDC_TILT_TYPE_WM:
|
2009-12-27 19:31:02 +00:00
|
|
|
WiiMoteEmu::WiiMapping[m_Page].Tilt.InputWM = m_TiltTypeWM[m_Page]->GetSelection();
|
2009-12-17 14:15:56 +00:00
|
|
|
break;
|
|
|
|
case IDC_TILT_TYPE_NC:
|
2009-12-27 19:31:02 +00:00
|
|
|
WiiMoteEmu::WiiMapping[m_Page].Tilt.InputNC = m_TiltTypeNC[m_Page]->GetSelection();
|
2009-02-10 17:25:08 +00:00
|
|
|
break;
|
2009-12-14 02:23:14 +00:00
|
|
|
case IDC_TILT_ROLL:
|
|
|
|
case IDC_TILT_ROLL_SWING:
|
2010-02-22 01:08:42 +00:00
|
|
|
m_TiltComboRangeRoll[m_Page]->GetStringSelection().ToLong(&TmpValue);
|
2009-12-27 19:31:02 +00:00
|
|
|
WiiMoteEmu::WiiMapping[m_Page].Tilt.RollDegree = TmpValue;
|
|
|
|
WiiMoteEmu::WiiMapping[m_Page].Tilt.RollSwing = m_TiltRollSwing[m_Page]->IsChecked();
|
|
|
|
WiiMoteEmu::WiiMapping[m_Page].Tilt.RollRange = (m_TiltRollSwing[m_Page]->IsChecked()) ? 0 : TmpValue;
|
2009-02-12 08:46:48 +00:00
|
|
|
break;
|
2009-12-14 02:23:14 +00:00
|
|
|
case IDC_TILT_PITCH:
|
|
|
|
case IDC_TILT_PITCH_SWING:
|
2010-02-22 01:08:42 +00:00
|
|
|
m_TiltComboRangePitch[m_Page]->GetStringSelection().ToLong(&TmpValue);
|
2009-12-27 19:31:02 +00:00
|
|
|
WiiMoteEmu::WiiMapping[m_Page].Tilt.PitchDegree = TmpValue;
|
|
|
|
WiiMoteEmu::WiiMapping[m_Page].Tilt.PitchSwing = m_TiltPitchSwing[m_Page]->IsChecked();
|
|
|
|
WiiMoteEmu::WiiMapping[m_Page].Tilt.PitchRange = (m_TiltPitchSwing[m_Page]->IsChecked()) ? 0 : TmpValue;
|
2009-12-14 02:23:14 +00:00
|
|
|
break;
|
|
|
|
case IDC_TILT_ROLL_INVERT:
|
2009-12-27 19:31:02 +00:00
|
|
|
WiiMoteEmu::WiiMapping[m_Page].Tilt.RollInvert = m_TiltRollInvert[m_Page]->IsChecked();
|
2009-12-14 02:23:14 +00:00
|
|
|
break;
|
|
|
|
case IDC_TILT_PITCH_INVERT:
|
2009-12-27 19:31:02 +00:00
|
|
|
WiiMoteEmu::WiiMapping[m_Page].Tilt.PitchInvert = m_TiltPitchInvert[m_Page]->IsChecked();
|
|
|
|
break;
|
|
|
|
case IDC_TRIGGER_TYPE:
|
|
|
|
WiiMoteEmu::WiiMapping[m_Page].TriggerType = m_TriggerType[m_Page]->GetSelection();
|
2009-02-14 01:15:35 +00:00
|
|
|
break;
|
2009-12-09 14:52:30 +00:00
|
|
|
case IDC_NUNCHUCK_STICK:
|
2009-12-27 19:31:02 +00:00
|
|
|
WiiMoteEmu::WiiMapping[m_Page].Stick.NC = m_NunchuckComboStick[m_Page]->GetSelection();
|
2009-02-15 02:01:43 +00:00
|
|
|
break;
|
2009-12-09 14:52:30 +00:00
|
|
|
case IDC_CC_LEFT_STICK:
|
2009-12-27 19:31:02 +00:00
|
|
|
WiiMoteEmu::WiiMapping[m_Page].Stick.CCL = m_CcComboLeftStick[m_Page]->GetSelection();
|
2009-02-24 02:40:17 +00:00
|
|
|
break;
|
2009-12-09 14:52:30 +00:00
|
|
|
case IDC_CC_RIGHT_STICK:
|
2009-12-27 19:31:02 +00:00
|
|
|
WiiMoteEmu::WiiMapping[m_Page].Stick.CCR = m_CcComboRightStick[m_Page]->GetSelection();
|
2009-02-24 02:40:17 +00:00
|
|
|
break;
|
2009-12-09 14:52:30 +00:00
|
|
|
case IDC_CC_TRIGGERS:
|
2009-12-27 19:31:02 +00:00
|
|
|
WiiMoteEmu::WiiMapping[m_Page].Stick.CCT = m_CcComboTriggers[m_Page]->GetSelection();
|
2009-02-24 02:40:17 +00:00
|
|
|
break;
|
2009-12-09 14:52:30 +00:00
|
|
|
case IDC_GH3_ANALOG:
|
2009-12-27 19:31:02 +00:00
|
|
|
WiiMoteEmu::WiiMapping[m_Page].Stick.GH = m_GH3ComboAnalog[m_Page]->GetSelection();
|
2009-02-14 01:15:35 +00:00
|
|
|
break;
|
2008-12-08 05:25:12 +00:00
|
|
|
}
|
2009-01-25 23:07:15 +00:00
|
|
|
UpdateGUI();
|
|
|
|
}
|
|
|
|
|
2009-12-27 19:31:02 +00:00
|
|
|
void WiimotePadConfigDialog::UpdateGUI()
|
2009-02-20 03:13:22 +00:00
|
|
|
{
|
2010-01-22 23:19:16 +00:00
|
|
|
if(!m_ControlsCreated)
|
2009-12-27 19:31:02 +00:00
|
|
|
return;
|
|
|
|
|
2009-12-31 22:12:32 +00:00
|
|
|
// Disable all pad items if no pads are detected
|
|
|
|
bool PadEnabled = WiiMoteEmu::NumGoodPads != 0;
|
|
|
|
|
|
|
|
m_Joyname[m_Page]->Enable(PadEnabled);
|
|
|
|
m_ComboDeadZoneLeft[m_Page]->Enable(PadEnabled);
|
|
|
|
m_ComboDeadZoneRight[m_Page]->Enable(PadEnabled);
|
|
|
|
m_CheckC2S[m_Page]->Enable(PadEnabled);
|
|
|
|
m_ComboDiagonal[m_Page]->Enable(PadEnabled);
|
|
|
|
m_CheckRumble[m_Page]->Enable(PadEnabled);
|
|
|
|
m_RumbleStrength[m_Page]->Enable(PadEnabled);
|
|
|
|
m_TriggerType[m_Page]->Enable(PadEnabled);
|
|
|
|
for(int i = 0; i <= IDB_TRIGGER_R - IDB_ANALOG_LEFT_X; i++)
|
|
|
|
m_Button_Analog[i][m_Page]->Enable(PadEnabled);
|
|
|
|
|
2009-12-27 19:31:02 +00:00
|
|
|
wxString tmp;
|
|
|
|
|
|
|
|
m_Joyname[m_Page]->SetSelection(WiiMoteEmu::WiiMapping[m_Page].ID);
|
|
|
|
m_ComboDeadZoneLeft[m_Page]->SetSelection(WiiMoteEmu::WiiMapping[m_Page].DeadZoneL);
|
|
|
|
m_ComboDeadZoneRight[m_Page]->SetSelection(WiiMoteEmu::WiiMapping[m_Page].DeadZoneR);
|
2010-01-22 23:19:16 +00:00
|
|
|
m_ComboDiagonal[m_Page]->SetSelection((100 - WiiMoteEmu::WiiMapping[m_Page].Diagonal) / 5);
|
2009-12-27 19:31:02 +00:00
|
|
|
m_CheckC2S[m_Page]->SetValue(WiiMoteEmu::WiiMapping[m_Page].bCircle2Square);
|
|
|
|
m_CheckRumble[m_Page]->SetValue(WiiMoteEmu::WiiMapping[m_Page].Rumble);
|
2010-01-23 13:34:18 +00:00
|
|
|
m_RumbleStrength[m_Page]->SetSelection(WiiMoteEmu::WiiMapping[m_Page].RumbleStrength / 10);
|
2009-12-27 19:31:02 +00:00
|
|
|
m_TriggerType[m_Page]->SetSelection(WiiMoteEmu::WiiMapping[m_Page].TriggerType);
|
|
|
|
m_TiltTypeWM[m_Page]->SetSelection(WiiMoteEmu::WiiMapping[m_Page].Tilt.InputWM);
|
|
|
|
m_TiltTypeNC[m_Page]->SetSelection(WiiMoteEmu::WiiMapping[m_Page].Tilt.InputNC);
|
2010-08-11 02:28:40 +00:00
|
|
|
m_TiltComboRangeRoll[m_Page]->
|
|
|
|
SetSelection(WiiMoteEmu::WiiMapping[m_Page].Tilt.RollDegree / 5 - 1); // 5 to 180, step 5
|
2009-12-27 19:31:02 +00:00
|
|
|
m_TiltComboRangeRoll[m_Page]->Enable(!WiiMoteEmu::WiiMapping[m_Page].Tilt.RollSwing);
|
2010-08-11 02:28:40 +00:00
|
|
|
m_TiltComboRangePitch[m_Page]->
|
|
|
|
SetSelection(WiiMoteEmu::WiiMapping[m_Page].Tilt.PitchDegree / 5 - 1); // 5 to 180, step 5
|
2009-12-27 19:31:02 +00:00
|
|
|
m_TiltComboRangePitch[m_Page]->Enable(!WiiMoteEmu::WiiMapping[m_Page].Tilt.PitchSwing);
|
|
|
|
m_TiltRollSwing[m_Page]->SetValue(WiiMoteEmu::WiiMapping[m_Page].Tilt.RollSwing);
|
|
|
|
m_TiltPitchSwing[m_Page]->SetValue(WiiMoteEmu::WiiMapping[m_Page].Tilt.PitchSwing);
|
|
|
|
m_TiltRollInvert[m_Page]->SetValue(WiiMoteEmu::WiiMapping[m_Page].Tilt.RollInvert);
|
|
|
|
m_TiltPitchInvert[m_Page]->SetValue(WiiMoteEmu::WiiMapping[m_Page].Tilt.PitchInvert);
|
|
|
|
|
|
|
|
for (int i = 0; i <= IDB_TRIGGER_R - IDB_ANALOG_LEFT_X; i++)
|
|
|
|
{
|
|
|
|
tmp << WiiMoteEmu::WiiMapping[m_Page].AxisMapping.Code[i];
|
|
|
|
m_Button_Analog[i][m_Page]->SetLabel(tmp);
|
|
|
|
tmp.clear();
|
|
|
|
}
|
2009-02-15 02:01:43 +00:00
|
|
|
|
2009-12-27 19:31:02 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
for (int x = 0; x <= IDB_WM_SHAKE - IDB_WM_A; x++)
|
2009-02-10 20:20:52 +00:00
|
|
|
{
|
2009-12-31 22:12:32 +00:00
|
|
|
m_Button_Wiimote[x][m_Page]->SetLabel(wxString::FromAscii(
|
|
|
|
InputCommon::VKToString(WiiMoteEmu::WiiMapping[m_Page].Button[x + WiiMoteEmu::EWM_A]).c_str()));
|
2009-12-27 19:31:02 +00:00
|
|
|
}
|
2010-05-07 22:39:06 +00:00
|
|
|
if(WiiMoteEmu::WiiMapping[m_Page].iExtensionConnected == WiiMoteEmu::EXT_NUNCHUK)
|
2009-12-27 19:31:02 +00:00
|
|
|
{
|
2009-12-31 22:12:32 +00:00
|
|
|
m_NunchuckComboStick[m_Page]->SetSelection(WiiMoteEmu::WiiMapping[m_Page].Stick.NC);
|
2009-12-27 19:31:02 +00:00
|
|
|
for (int x = 0; x <= IDB_NC_SHAKE - IDB_NC_Z; x++)
|
|
|
|
m_Button_NunChuck[x][m_Page]->SetLabel(wxString::FromAscii(
|
|
|
|
InputCommon::VKToString(WiiMoteEmu::WiiMapping[m_Page].Button[x + WiiMoteEmu::ENC_Z]).c_str()));
|
|
|
|
}
|
|
|
|
else if(WiiMoteEmu::WiiMapping[m_Page].iExtensionConnected == WiiMoteEmu::EXT_CLASSIC_CONTROLLER)
|
|
|
|
{
|
2009-12-31 22:12:32 +00:00
|
|
|
m_CcComboLeftStick[m_Page]->SetSelection(WiiMoteEmu::WiiMapping[m_Page].Stick.CCL);
|
|
|
|
m_CcComboRightStick[m_Page]->SetSelection(WiiMoteEmu::WiiMapping[m_Page].Stick.CCR);
|
|
|
|
m_CcComboTriggers[m_Page]->SetSelection(WiiMoteEmu::WiiMapping[m_Page].Stick.CCT);
|
2009-12-27 19:31:02 +00:00
|
|
|
for (int x = 0; x <= IDB_CC_RD - IDB_CC_A; x++)
|
|
|
|
m_Button_Classic[x][m_Page]->SetLabel(wxString::FromAscii(
|
|
|
|
InputCommon::VKToString(WiiMoteEmu::WiiMapping[m_Page].Button[x + WiiMoteEmu::ECC_A]).c_str()));
|
|
|
|
}
|
|
|
|
else if(WiiMoteEmu::WiiMapping[m_Page].iExtensionConnected == WiiMoteEmu::EXT_GUITARHERO)
|
|
|
|
{
|
2009-12-31 22:12:32 +00:00
|
|
|
m_GH3ComboAnalog[m_Page]->SetSelection(WiiMoteEmu::WiiMapping[m_Page].Stick.GH);
|
2009-12-27 19:31:02 +00:00
|
|
|
for (int x = 0; x <= IDB_GH3_STRUM_DOWN - IDB_GH3_GREEN; x++)
|
|
|
|
m_Button_GH3[x][m_Page]->SetLabel(wxString::FromAscii(
|
|
|
|
InputCommon::VKToString(WiiMoteEmu::WiiMapping[m_Page].Button[x + WiiMoteEmu::EGH_Green]).c_str()));
|
|
|
|
}
|
|
|
|
#elif defined(HAVE_X11) && HAVE_X11
|
|
|
|
char keyStr[10] = {0};
|
|
|
|
for (int x = 0; x <= IDB_WM_SHAKE - IDB_WM_A; x++)
|
|
|
|
{
|
|
|
|
InputCommon::XKeyToString(WiiMoteEmu::WiiMapping[m_Page].Button[x + WiiMoteEmu::EWM_A], keyStr);
|
|
|
|
m_Button_Wiimote[x][m_Page]->SetLabel(wxString::FromAscii(keyStr));
|
|
|
|
}
|
2010-05-07 22:39:06 +00:00
|
|
|
if(WiiMoteEmu::WiiMapping[m_Page].iExtensionConnected == WiiMoteEmu::EXT_NUNCHUK)
|
2009-12-27 19:31:02 +00:00
|
|
|
{
|
2009-12-31 22:12:32 +00:00
|
|
|
m_NunchuckComboStick[m_Page]->SetSelection(WiiMoteEmu::WiiMapping[m_Page].Stick.NC);
|
2009-12-27 19:31:02 +00:00
|
|
|
for (int x = 0; x <= IDB_NC_SHAKE - IDB_NC_Z; x++)
|
|
|
|
{
|
|
|
|
InputCommon::XKeyToString(WiiMoteEmu::WiiMapping[m_Page].Button[x + WiiMoteEmu::ENC_Z], keyStr);
|
|
|
|
m_Button_NunChuck[x][m_Page]->SetLabel(wxString::FromAscii(keyStr));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(WiiMoteEmu::WiiMapping[m_Page].iExtensionConnected == WiiMoteEmu::EXT_CLASSIC_CONTROLLER)
|
|
|
|
{
|
2009-12-31 22:12:32 +00:00
|
|
|
m_CcComboLeftStick[m_Page]->SetSelection(WiiMoteEmu::WiiMapping[m_Page].Stick.CCL);
|
|
|
|
m_CcComboRightStick[m_Page]->SetSelection(WiiMoteEmu::WiiMapping[m_Page].Stick.CCR);
|
|
|
|
m_CcComboTriggers[m_Page]->SetSelection(WiiMoteEmu::WiiMapping[m_Page].Stick.CCT);
|
2009-12-27 19:31:02 +00:00
|
|
|
for (int x = 0; x <= IDB_CC_RD - IDB_CC_A; x++)
|
|
|
|
{
|
|
|
|
InputCommon::XKeyToString(WiiMoteEmu::WiiMapping[m_Page].Button[x + WiiMoteEmu::ECC_A], keyStr);
|
|
|
|
m_Button_Classic[x][m_Page]->SetLabel(wxString::FromAscii(keyStr));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(WiiMoteEmu::WiiMapping[m_Page].iExtensionConnected == WiiMoteEmu::EXT_GUITARHERO)
|
|
|
|
{
|
2009-12-31 22:12:32 +00:00
|
|
|
m_GH3ComboAnalog[m_Page]->SetSelection(WiiMoteEmu::WiiMapping[m_Page].Stick.GH);
|
2009-12-27 19:31:02 +00:00
|
|
|
for (int x = 0; x <= IDB_GH3_STRUM_DOWN - IDB_GH3_GREEN; x++)
|
|
|
|
{
|
|
|
|
InputCommon::XKeyToString(WiiMoteEmu::WiiMapping[m_Page].Button[x + WiiMoteEmu::EGH_Green], keyStr);
|
2009-12-29 12:13:47 +00:00
|
|
|
m_Button_GH3[x][m_Page]->SetLabel(wxString::FromAscii(keyStr));
|
2009-12-27 19:31:02 +00:00
|
|
|
}
|
|
|
|
}
|
2010-06-05 19:03:37 +00:00
|
|
|
#elif defined(USE_WX) && USE_WX
|
|
|
|
for (int x = 0; x <= IDB_WM_SHAKE - IDB_WM_A; x++)
|
|
|
|
{
|
|
|
|
m_Button_Wiimote[x][m_Page]-> \
|
|
|
|
SetLabel(InputCommon::WXKeyToString(
|
|
|
|
WiiMoteEmu::WiiMapping[m_Page]. \
|
|
|
|
Button[x + WiiMoteEmu::EWM_A]));
|
|
|
|
}
|
|
|
|
if (WiiMoteEmu::WiiMapping[m_Page].iExtensionConnected ==
|
|
|
|
WiiMoteEmu::EXT_NUNCHUK)
|
|
|
|
{
|
|
|
|
m_NunchuckComboStick[m_Page]-> \
|
|
|
|
SetSelection(WiiMoteEmu::WiiMapping[m_Page].Stick.NC);
|
|
|
|
|
|
|
|
for (int x = 0; x <= IDB_NC_SHAKE - IDB_NC_Z; x++)
|
|
|
|
{
|
|
|
|
m_Button_NunChuck[x][m_Page]-> \
|
|
|
|
SetLabel(InputCommon::WXKeyToString(
|
|
|
|
WiiMoteEmu::WiiMapping[m_Page]. \
|
|
|
|
Button[x + WiiMoteEmu::ENC_Z]));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (WiiMoteEmu::WiiMapping[m_Page].iExtensionConnected ==
|
|
|
|
WiiMoteEmu::EXT_CLASSIC_CONTROLLER)
|
|
|
|
{
|
|
|
|
m_CcComboLeftStick[m_Page]-> \
|
|
|
|
SetSelection(WiiMoteEmu::WiiMapping[m_Page].Stick.CCL);
|
|
|
|
m_CcComboRightStick[m_Page]-> \
|
|
|
|
SetSelection(WiiMoteEmu::WiiMapping[m_Page].Stick.CCR);
|
|
|
|
m_CcComboTriggers[m_Page]-> \
|
|
|
|
SetSelection(WiiMoteEmu::WiiMapping[m_Page].Stick.CCT);
|
|
|
|
|
|
|
|
for (int x = 0; x <= IDB_CC_RD - IDB_CC_A; x++)
|
|
|
|
{
|
|
|
|
m_Button_Classic[x][m_Page]-> \
|
|
|
|
SetLabel(InputCommon::WXKeyToString(
|
|
|
|
WiiMoteEmu::WiiMapping[m_Page]. \
|
|
|
|
Button[x + WiiMoteEmu::ECC_A]));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else if(WiiMoteEmu::WiiMapping[m_Page].iExtensionConnected ==
|
|
|
|
WiiMoteEmu::EXT_GUITARHERO)
|
|
|
|
{
|
|
|
|
m_GH3ComboAnalog[m_Page]-> \
|
|
|
|
SetSelection(WiiMoteEmu::WiiMapping[m_Page].Stick.GH);
|
|
|
|
|
|
|
|
for (int x = 0; x <= IDB_GH3_STRUM_DOWN - IDB_GH3_GREEN; x++)
|
|
|
|
{
|
|
|
|
m_Button_GH3[x][m_Page]-> \
|
|
|
|
SetLabel(InputCommon::WXKeyToString(
|
|
|
|
WiiMoteEmu::WiiMapping[m_Page]. \
|
|
|
|
Button[x + WiiMoteEmu::EGH_Green]));
|
|
|
|
}
|
|
|
|
}
|
2009-12-27 19:31:02 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
DoChangeDeadZone();
|
|
|
|
|
2009-01-07 08:44:57 +00:00
|
|
|
}
|