Simplify GH3 gui init, only show currently connected extension keyboard mapping

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3719 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
LPFaint99 2009-07-09 04:19:49 +00:00
parent 48f1c24cc9
commit af83bfffa1
3 changed files with 345 additions and 491 deletions

View File

@ -155,6 +155,8 @@ void WiimotePadConfigDialog::UpdateGUIButtonMapping(int controller)
m_bWmPitchL[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Wm.keyForControls[12]).c_str())); m_bWmPitchL[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Wm.keyForControls[12]).c_str()));
m_bWmPitchR[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Wm.keyForControls[13]).c_str())); m_bWmPitchR[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Wm.keyForControls[13]).c_str()));
if(g_Config.iExtensionConnected == EXT_NUNCHUCK)
{
// Nunchuck // Nunchuck
m_bNcZ[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Nc.keyForControls[0]).c_str())); m_bNcZ[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Nc.keyForControls[0]).c_str()));
m_bNcC[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Nc.keyForControls[1]).c_str())); m_bNcC[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Nc.keyForControls[1]).c_str()));
@ -163,7 +165,9 @@ void WiimotePadConfigDialog::UpdateGUIButtonMapping(int controller)
m_bNcU[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Nc.keyForControls[4]).c_str())); m_bNcU[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Nc.keyForControls[4]).c_str()));
m_bNcD[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Nc.keyForControls[5]).c_str())); m_bNcD[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Nc.keyForControls[5]).c_str()));
m_bNcShake[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Nc.keyForControls[6]).c_str())); m_bNcShake[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Nc.keyForControls[6]).c_str()));
}
else if(g_Config.iExtensionConnected == EXT_CLASSIC_CONTROLLER)
{
// Classic Controller // Classic Controller
m_bCcA[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Cc.keyForControls[0]).c_str())); m_bCcA[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Cc.keyForControls[0]).c_str()));
m_bCcB[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Cc.keyForControls[1]).c_str())); m_bCcB[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Cc.keyForControls[1]).c_str()));
@ -188,21 +192,13 @@ void WiimotePadConfigDialog::UpdateGUIButtonMapping(int controller)
m_bCcRu[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Cc.keyForControls[20]).c_str())); m_bCcRu[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Cc.keyForControls[20]).c_str()));
m_bCcRr[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Cc.keyForControls[21]).c_str())); m_bCcRr[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Cc.keyForControls[21]).c_str()));
m_bCcRd[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Cc.keyForControls[22]).c_str())); m_bCcRd[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Cc.keyForControls[22]).c_str()));
m_bGH3_Green[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].GH3c.keyForControls[0]).c_str())); }
m_bGH3_Red[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].GH3c.keyForControls[1]).c_str())); else if(g_Config.iExtensionConnected == EXT_GUITARHERO3_CONTROLLER)
m_bGH3_Yellow[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].GH3c.keyForControls[2]).c_str())); {
m_bGH3_Blue[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].GH3c.keyForControls[3]).c_str())); for (int x = 0; x < GH3_CONTROLS; x++)
m_bGH3_Orange[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].GH3c.keyForControls[4]).c_str())); m_Button_GH3[x][controller]->SetLabel(wxString::FromAscii(
m_bGH3_Plus[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].GH3c.keyForControls[5]).c_str())); InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].GH3c.keyForControls[x]).c_str()));
m_bGH3_Minus[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].GH3c.keyForControls[6]).c_str())); }
m_bGH3_Whammy[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].GH3c.keyForControls[7]).c_str()));
m_bGH3_ALeft[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].GH3c.keyForControls[8]).c_str()));
m_bGH3_AUp[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].GH3c.keyForControls[9]).c_str()));
m_bGH3_ARight[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].GH3c.keyForControls[10]).c_str()));
m_bGH3_ADown[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].GH3c.keyForControls[11]).c_str()));
m_bGH3_StrumUp[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].GH3c.keyForControls[12]).c_str()));
m_bGH3_StrumDown[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].GH3c.keyForControls[13]).c_str()));
#endif #endif
//INFO_LOG(CONSOLE, "m_bWmA[%i] = %i = %s\n", controller, WiiMoteEmu::PadMapping[controller].Wm.keyForControls[0], InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Wm.keyForControls[0]).c_str()); //INFO_LOG(CONSOLE, "m_bWmA[%i] = %i = %s\n", controller, WiiMoteEmu::PadMapping[controller].Wm.keyForControls[0], InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Wm.keyForControls[0]).c_str());
@ -316,6 +312,9 @@ void WiimotePadConfigDialog::SetButtonText(int id, char text[128], int _Page)
int controller; int controller;
if (_Page == -1) controller = Page; else controller = _Page; if (_Page == -1) controller = Page; else controller = _Page;
if (IDB_GH3_GREEN <= id && id <= IDB_GH3_STRUM_DOWN)
m_Button_GH3[id - IDB_GH3_GREEN][controller]->SetLabel(wxString::FromAscii(text));
switch(id) switch(id)
{ {
case IDB_ANALOG_LEFT_X: m_AnalogLeftX[controller]->SetValue(wxString::FromAscii(text)); break; case IDB_ANALOG_LEFT_X: m_AnalogLeftX[controller]->SetValue(wxString::FromAscii(text)); break;
@ -376,49 +375,6 @@ void WiimotePadConfigDialog::SetButtonText(int id, char text[128], int _Page)
case IDB_CC_RR: m_bCcRr[controller]->SetLabel(wxString::FromAscii(text)); break; case IDB_CC_RR: m_bCcRr[controller]->SetLabel(wxString::FromAscii(text)); break;
case IDB_CC_RD: m_bCcRd[controller]->SetLabel(wxString::FromAscii(text)); break; case IDB_CC_RD: m_bCcRd[controller]->SetLabel(wxString::FromAscii(text)); break;
// GH3 Controller
case IDB_GH3_GREEN:
m_bGH3_Green[controller]->SetLabel(wxString::FromAscii(text));
break;
case IDB_GH3_RED:
m_bGH3_Red[controller]->SetLabel(wxString::FromAscii(text));
break;
case IDB_GH3_YELLOW:
m_bGH3_Yellow[controller]->SetLabel(wxString::FromAscii(text));
break;
case IDB_GH3_BLUE:
m_bGH3_Blue[controller]->SetLabel(wxString::FromAscii(text));
break;
case IDB_GH3_ORANGE:
m_bGH3_Orange[controller]->SetLabel(wxString::FromAscii(text));
break;
case IDB_GH3_PLUS:
m_bGH3_Plus[controller]->SetLabel(wxString::FromAscii(text));
break;
case IDB_GH3_MINUS:
m_bGH3_Minus[controller]->SetLabel(wxString::FromAscii(text));
break;
case IDB_GH3_WHAMMY:
m_bGH3_Whammy[controller]->SetLabel(wxString::FromAscii(text));
break;
case IDB_GH3_ANALOG_LEFT:
m_bGH3_ALeft[controller]->SetLabel(wxString::FromAscii(text));
break;
case IDB_GH3_ANALOG_RIGHT:
m_bGH3_ARight[controller]->SetLabel(wxString::FromAscii(text));
break;
case IDB_GH3_ANALOG_UP:
m_bGH3_AUp[controller]->SetLabel(wxString::FromAscii(text));
break;
case IDB_GH3_ANALOG_DOWN:
m_bGH3_ADown[controller]->SetLabel(wxString::FromAscii(text));
break;
case IDB_GH3_STRUM_UP:
m_bGH3_StrumUp[controller]->SetLabel(wxString::FromAscii(text));
break;
case IDB_GH3_STRUM_DOWN:
m_bGH3_StrumDown[controller]->SetLabel(wxString::FromAscii(text));
break;
default: break; default: break;
} }
//INFO_LOG(CONSOLE, "SetButtonText: %s\n", text); //INFO_LOG(CONSOLE, "SetButtonText: %s\n", text);

View File

@ -753,6 +753,8 @@ void WiimotePadConfigDialog::CreatePadGUIControls()
m_gWiimote[i]->AddSpacer(1); m_gWiimote[i]->AddSpacer(1);
// Nunchuck // Nunchuck
if(g_Config.iExtensionConnected == EXT_NUNCHUCK)
{
// Stick controls // Stick controls
m_NunchuckTextStick[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("Stick")); m_NunchuckTextStick[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("Stick"));
m_NunchuckComboStick[i] = new wxComboBox(m_Controller[i], IDCB_NUNCHUCK_STICK, StrNunchuck[0], wxDefaultPosition, wxDefaultSize, StrNunchuck, wxCB_READONLY); m_NunchuckComboStick[i] = new wxComboBox(m_Controller[i], IDCB_NUNCHUCK_STICK, StrNunchuck[0], wxDefaultPosition, wxDefaultSize, StrNunchuck, wxCB_READONLY);
@ -813,7 +815,9 @@ void WiimotePadConfigDialog::CreatePadGUIControls()
//Set values //Set values
m_NunchuckComboStick[i]->SetSelection(g_Config.Nunchuck.Type); m_NunchuckComboStick[i]->SetSelection(g_Config.Nunchuck.Type);
}
else if(g_Config.iExtensionConnected == EXT_CLASSIC_CONTROLLER)
{
// Classic Controller // Classic Controller
// Stick controls // Stick controls
@ -981,163 +985,96 @@ void WiimotePadConfigDialog::CreatePadGUIControls()
m_CcComboLeftStick[i]->SetSelection(g_Config.ClassicController.LType); m_CcComboLeftStick[i]->SetSelection(g_Config.ClassicController.LType);
m_CcComboRightStick[i]->SetSelection(g_Config.ClassicController.RType); m_CcComboRightStick[i]->SetSelection(g_Config.ClassicController.RType);
m_CcComboTriggers[i]->SetSelection(g_Config.ClassicController.TType); m_CcComboTriggers[i]->SetSelection(g_Config.ClassicController.TType);
}
//GH3 else if(g_Config.iExtensionConnected == EXT_GUITARHERO3_CONTROLLER)
{
// Stick controls // Stick controls
m_tGH3_Analog[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("stick")); m_tGH3_Analog[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("Analog joystick"));
m_GH3ComboAnalog[i] = new wxComboBox(m_Controller[i], IDCB_GH3_ANALOG_STICK, StrNunchuck[0], wxDefaultPosition, wxDefaultSize, StrNunchuck, wxCB_READONLY); m_GH3ComboAnalog[i] = new wxComboBox(m_Controller[i], IDCB_GH3_ANALOG_STICK, StrNunchuck[0], wxDefaultPosition, wxDefaultSize, StrNunchuck, wxCB_READONLY);
static const wxChar* gh3Text[] =
{
wxT("Green"),
wxT("Red"),
wxT("Yellow"),
wxT("Blue"),
wxT("Orange"),
wxT("+"),
wxT("- "),
wxT("Whammy"),
wxT("Left"), //analog stick
wxT("Up"),
wxT("Right"),
wxT("Down"),
wxT("Strum Up"),
wxT("Strum Down"),
};
for ( int x = 0; x < GH3_CONTROLS; x++)
m_statictext_GH3[x][i] = new wxStaticText(m_Controller[i], wxID_ANY, gh3Text[x]);
m_tGH3_Green[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("Green")); for ( int x = IDB_GH3_GREEN; x <= IDB_GH3_STRUM_DOWN; x++)
m_tGH3_Red[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("Red")); {
m_tGH3_Yellow[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("Yellow")); m_Button_GH3[x - IDB_GH3_GREEN][i] = new wxButton(m_Controller[i], x, wxEmptyString, wxDefaultPosition, wxSize(BtW, BtH));
m_tGH3_Blue[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("Blue")); if (IDB_GH3_WHAMMY <= x && x <= IDB_GH3_ANALOG_DOWN)
m_tGH3_Orange[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("Orange")); m_Button_GH3[x - IDB_GH3_GREEN][i]->Disable();
m_tGH3_Plus[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("+")); }
m_tGH3_Minus[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("- "));
m_tGH3_Whammy[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("Whammy"));
m_tGH3_ALeft[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("Left")); //analog stick
m_tGH3_ARight[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("Up"));
m_tGH3_AUp[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("Right"));
m_tGH3_ADown[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("Down"));
m_tGH3_StrumUp[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("Strum Up"));
m_tGH3_StrumDown[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("Strum Down"));
m_bGH3_Green[i] = new wxButton(m_Controller[i], IDB_GH3_GREEN, wxEmptyString, wxDefaultPosition, wxSize(BtW, BtH));
m_bGH3_Red[i] = new wxButton(m_Controller[i], IDB_GH3_RED, wxEmptyString, wxDefaultPosition, wxSize(BtW, BtH));
m_bGH3_Yellow[i] = new wxButton(m_Controller[i], IDB_GH3_YELLOW, wxEmptyString, wxDefaultPosition, wxSize(BtW, BtH));
m_bGH3_Blue[i] = new wxButton(m_Controller[i], IDB_GH3_BLUE, wxEmptyString, wxDefaultPosition, wxSize(BtW, BtH));
m_bGH3_Orange[i] = new wxButton(m_Controller[i], IDB_GH3_ORANGE, wxEmptyString, wxDefaultPosition, wxSize(BtW, BtH));
m_bGH3_Plus[i] = new wxButton(m_Controller[i], IDB_GH3_PLUS, wxEmptyString, wxDefaultPosition, wxSize(BtW, BtH));
m_bGH3_Minus[i] = new wxButton(m_Controller[i], IDB_GH3_MINUS, wxEmptyString, wxDefaultPosition, wxSize(BtW, BtH));
m_bGH3_Whammy[i] = new wxButton(m_Controller[i], IDB_GH3_WHAMMY, wxEmptyString, wxDefaultPosition, wxSize(BtW, BtH));
m_bGH3_ALeft[i] = new wxButton(m_Controller[i], IDB_GH3_ANALOG_LEFT, wxEmptyString, wxDefaultPosition, wxSize(BtW, BtH)); // Left analog stick
m_bGH3_AUp[i] = new wxButton(m_Controller[i], IDB_GH3_ANALOG_UP, wxEmptyString, wxDefaultPosition, wxSize(BtW, BtH));
m_bGH3_ARight[i] = new wxButton(m_Controller[i], IDB_GH3_ANALOG_RIGHT, wxEmptyString, wxDefaultPosition, wxSize(BtW, BtH));
m_bGH3_ADown[i] = new wxButton(m_Controller[i], IDB_GH3_ANALOG_DOWN, wxEmptyString, wxDefaultPosition, wxSize(BtW, BtH));
m_bGH3_StrumUp[i] = new wxButton(m_Controller[i], IDB_GH3_STRUM_UP, wxEmptyString, wxDefaultPosition, wxSize(BtW, BtH));
m_bGH3_StrumDown[i] = new wxButton(m_Controller[i], IDB_GH3_STRUM_DOWN, wxEmptyString, wxDefaultPosition, wxSize(BtW, BtH));
m_GH3ComboAnalog[i]->Disable(); m_GH3ComboAnalog[i]->Disable();
m_bGH3_Whammy[i]->Disable();
m_bGH3_ALeft[i]->Disable();
m_bGH3_AUp[i]->Disable();
m_bGH3_ARight[i]->Disable();
m_bGH3_ADown[i]->Disable();
// Sizers // Sizers
m_sGH3_Analog[i] = new wxBoxSizer(wxHORIZONTAL); m_sGH3_Analog[i] = new wxBoxSizer(wxHORIZONTAL);
m_sGH3_Analog[i]->Add(m_tGH3_Analog[i], 0, (wxUP), 4); m_sGH3_Analog[i]->Add(m_tGH3_Analog[i], 0, (wxUP), 4);
m_sGH3_Analog[i]->Add(m_GH3ComboAnalog[i], 0, (wxLEFT), 2); m_sGH3_Analog[i]->Add(m_GH3ComboAnalog[i], 0, (wxLEFT), 2);
for ( int x = 0; x < GH3_CONTROLS; x++)
m_sGH3_Whammy[i] = new wxBoxSizer(wxHORIZONTAL); {
m_sGH3_Whammy[i]->Add(m_tGH3_Whammy[i], 0, (wxUP), 4); m_sizer_GH3[x][i] = new wxBoxSizer(wxHORIZONTAL);
m_sGH3_Whammy[i]->Add(m_bGH3_Whammy[i], 0, (wxLEFT), 2); m_sizer_GH3[x][i]->Add(m_statictext_GH3[x][i], 0, (wxUP), 4);
m_sizer_GH3[x][i]->Add(m_Button_GH3[x][i], 0, (wxLEFT), 2);
m_sGH3_StrumUp[i] = new wxBoxSizer(wxHORIZONTAL); }
m_sGH3_StrumDown[i] = new wxBoxSizer(wxHORIZONTAL);
m_sGH3_Green[i] = new wxBoxSizer(wxHORIZONTAL);
m_sGH3_Green[i]->Add(m_tGH3_Green[i], 0, wxALIGN_RIGHT | (wxUP), 4);
m_sGH3_Green[i]->Add(m_bGH3_Green[i], 0, wxALIGN_RIGHT | (wxLEFT), 2);
m_sGH3_Red[i] = new wxBoxSizer(wxHORIZONTAL);
m_sGH3_Red[i]->Add(m_tGH3_Red[i], 0, wxALIGN_RIGHT | (wxUP), 4);
m_sGH3_Red[i]->Add(m_bGH3_Red[i], 0, wxALIGN_RIGHT | (wxLEFT), 2);
m_sGH3_Yellow[i] = new wxBoxSizer(wxHORIZONTAL);
m_sGH3_Yellow[i]->Add(m_tGH3_Yellow[i], 0, wxALIGN_RIGHT | (wxUP), 4);
m_sGH3_Yellow[i]->Add(m_bGH3_Yellow[i], 0, wxALIGN_RIGHT | (wxLEFT), 2);
m_sGH3_Blue[i] = new wxBoxSizer(wxHORIZONTAL);
m_sGH3_Blue[i]->Add(m_tGH3_Blue[i], 0, wxALIGN_RIGHT | (wxUP), 4);
m_sGH3_Blue[i]->Add(m_bGH3_Blue[i], 0, wxALIGN_RIGHT | (wxLEFT), 2);
m_sGH3_Orange[i] = new wxBoxSizer(wxHORIZONTAL);
m_sGH3_Orange[i]->Add(m_tGH3_Orange[i], 0, wxALIGN_RIGHT | (wxUP), 4);
m_sGH3_Orange[i]->Add(m_bGH3_Orange[i], 0, wxALIGN_RIGHT | (wxLEFT), 2);
m_sGH3_Plus[i] = new wxBoxSizer(wxHORIZONTAL);
m_sGH3_Plus[i]->Add(m_tGH3_Plus[i], 0, wxALIGN_RIGHT | (wxUP), 4);
m_sGH3_Plus[i]->Add(m_bGH3_Plus[i], 0, wxALIGN_RIGHT | (wxLEFT), 2);
m_sGH3_Minus[i] = new wxBoxSizer(wxHORIZONTAL);
m_sGH3_Minus[i]->Add(m_tGH3_Minus[i], 0, wxALIGN_RIGHT | (wxUP), 4);
m_sGH3_Minus[i]->Add(m_bGH3_Minus[i], 0, wxALIGN_RIGHT | (wxLEFT), 2);
m_sGH3_ALeft[i] = new wxBoxSizer(wxHORIZONTAL);
m_sGH3_ALeft[i]->Add(m_tGH3_ALeft[i], 0, wxALIGN_RIGHT | (wxUP), 4);
m_sGH3_ALeft[i]->Add(m_bGH3_ALeft[i], 0, wxALIGN_RIGHT | (wxLEFT), 2);
m_sGH3_ARight[i] = new wxBoxSizer(wxHORIZONTAL);
m_sGH3_ARight[i]->Add(m_tGH3_ARight[i], 0, wxALIGN_RIGHT | (wxUP), 4);
m_sGH3_ARight[i]->Add(m_bGH3_ARight[i], 0, wxALIGN_RIGHT | (wxLEFT), 2);
m_sGH3_AUp[i] = new wxBoxSizer(wxHORIZONTAL);
m_sGH3_AUp[i]->Add(m_tGH3_AUp[i], 0, wxALIGN_RIGHT | (wxUP), 4);
m_sGH3_AUp[i]->Add(m_bGH3_AUp[i], 0, wxALIGN_RIGHT | (wxLEFT), 2);
m_sGH3_ADown[i] = new wxBoxSizer(wxHORIZONTAL);
m_sGH3_ADown[i]->Add(m_tGH3_ADown[i], 0, wxALIGN_RIGHT | (wxUP), 4);
m_sGH3_ADown[i]->Add(m_bGH3_ADown[i], 0, wxALIGN_RIGHT | (wxLEFT), 2);
m_sGH3_StrumUp[i] = new wxBoxSizer(wxHORIZONTAL);
m_sGH3_StrumUp[i]->Add(m_tGH3_StrumUp[i], 0, wxALIGN_RIGHT | (wxUP), 4);
m_sGH3_StrumUp[i]->Add(m_bGH3_StrumUp[i], 0, wxALIGN_RIGHT | (wxLEFT), 2);
m_sGH3_StrumDown[i] = new wxBoxSizer(wxHORIZONTAL);
m_sGH3_StrumDown[i]->Add(m_tGH3_StrumDown[i], 0, wxALIGN_RIGHT | (wxUP), 4);
m_sGH3_StrumDown[i]->Add(m_bGH3_StrumDown[i], 0, wxALIGN_RIGHT | (wxLEFT), 2);
// The left parent // The left parent
m_SGH3VertLeft[i] = new wxBoxSizer(wxVERTICAL); m_SGH3VertLeft[i] = new wxBoxSizer(wxVERTICAL);
m_SGH3VertLeft[i]->Add(m_sGH3_Analog[i], 0, wxALIGN_RIGHT | (wxALL), 2); m_SGH3VertLeft[i]->Add(m_sGH3_Analog[i], 0, wxALIGN_RIGHT | (wxALL), 2);
m_SGH3VertLeft[i]->Add(m_sGH3_Whammy[i], 0, wxALIGN_RIGHT | (wxALL), 2);
m_SGH3VertLeft[i]->Add(m_sGH3_ALeft[i], 0, wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1); for (int x = IDB_GH3_WHAMMY - IDB_GH3_GREEN; x <= IDB_GH3_ANALOG_DOWN - IDB_GH3_GREEN; x++)
m_SGH3VertLeft[i]->Add(m_sGH3_AUp[i], 0, wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1); m_SGH3VertLeft[i]->Add(m_sizer_GH3[x][i], 0, wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
m_SGH3VertLeft[i]->Add(m_sGH3_ARight[i], 0, wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
m_SGH3VertLeft[i]->Add(m_sGH3_ADown[i], 0, wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
// The right parent // The right parent
m_SGH3VertRight[i] = new wxBoxSizer(wxVERTICAL); m_SGH3VertRight[i] = new wxBoxSizer(wxVERTICAL);
m_SGH3VertRight[i]->Add(m_sGH3_Green[i], 0, wxALIGN_RIGHT | (wxALL), 1); for (int x = 0; x <= IDB_GH3_MINUS - IDB_GH3_GREEN; x++)
m_SGH3VertRight[i]->Add(m_sGH3_Red[i], 0, wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1); m_SGH3VertRight[i]->Add(m_sizer_GH3[x][i], 0, wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
m_SGH3VertRight[i]->Add(m_sGH3_Yellow[i], 0, wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
m_SGH3VertRight[i]->Add(m_sGH3_Blue[i], 0, wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1); m_SGH3VertRight[i]->Add(m_sizer_GH3[IDB_GH3_STRUM_UP - IDB_GH3_GREEN][i], 0, wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
m_SGH3VertRight[i]->Add(m_sGH3_Orange[i], 0, wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1); m_SGH3VertRight[i]->Add(m_sizer_GH3[IDB_GH3_STRUM_DOWN - IDB_GH3_GREEN][i], 0, wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
m_SGH3VertRight[i]->Add(m_sGH3_Plus[i], 0, wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
m_SGH3VertRight[i]->Add(m_sGH3_Minus[i], 0, wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
m_SGH3VertRight[i]->Add(m_sGH3_StrumUp[i], 0, wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
m_SGH3VertRight[i]->Add(m_sGH3_StrumDown[i], 0, wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
// The parent sizer // The parent sizer
m_gGuitarHero3Controller[i] = new wxStaticBoxSizer (wxHORIZONTAL, m_Controller[i], wxT("Guitar Hero 3 Controller")); m_gGuitarHero3Controller[i] = new wxStaticBoxSizer (wxHORIZONTAL, m_Controller[i], wxT("Guitar Hero 3 Controller"));
m_gGuitarHero3Controller[i]->Add(m_SGH3VertLeft[i], 0, wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1); m_gGuitarHero3Controller[i]->Add(m_SGH3VertLeft[i], 0, wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
// m_gGuitarHero3Controller[i]->Add(m_SGH3VertMiddle[i], 0, wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
m_gGuitarHero3Controller[i]->Add(m_SGH3VertRight[i], 0, wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1); m_gGuitarHero3Controller[i]->Add(m_SGH3VertRight[i], 0, wxALIGN_RIGHT | (wxLEFT | wxRIGHT | wxDOWN), 1);
}
//Set values
m_CcComboLeftStick[i]->SetSelection(g_Config.ClassicController.LType);
m_CcComboRightStick[i]->SetSelection(g_Config.ClassicController.RType);
m_CcComboTriggers[i]->SetSelection(g_Config.ClassicController.TType);
// Row 4 Sizers // Row 4 Sizers
m_HorizControllerMapping[i] = new wxBoxSizer(wxHORIZONTAL); m_HorizControllerMapping[i] = new wxBoxSizer(wxHORIZONTAL);
m_HorizControllerMapping[i]->Add(m_gWiimote[i], 0, (wxLEFT), 5); m_HorizControllerMapping[i]->Add(m_gWiimote[i], 0, (wxLEFT), 5);
switch(g_Config.iExtensionConnected)
{
case EXT_NUNCHUCK:
m_HorizControllerMapping[i]->AddStretchSpacer(2); m_HorizControllerMapping[i]->AddStretchSpacer(2);
m_HorizControllerMapping[i]->Add(m_gNunchuck[i], 0, (wxLEFT), 5); m_HorizControllerMapping[i]->Add(m_gNunchuck[i], 0, (wxLEFT), 5);
break;
case EXT_CLASSIC_CONTROLLER:
m_HorizControllerMapping[i]->Add(m_gClassicController[i], 0, (wxLEFT), 5); m_HorizControllerMapping[i]->Add(m_gClassicController[i], 0, (wxLEFT), 5);
break;
case EXT_GUITARHERO3_CONTROLLER:
m_HorizControllerMapping[i]->Add(m_gGuitarHero3Controller[i], 0, (wxLEFT), 5); m_HorizControllerMapping[i]->Add(m_gGuitarHero3Controller[i], 0, (wxLEFT), 5);
break;
case EXT_GUITARHEROWT_DRUMS:
default:
break;
}
m_HorizControllerMapping[i]->AddStretchSpacer(2); m_HorizControllerMapping[i]->AddStretchSpacer(2);
// Set up sizers and layout // Set up sizers and layout

View File

@ -164,21 +164,8 @@ class WiimotePadConfigDialog : public wxDialog
wxBoxSizer *m_SGH3VertLeft[4], wxBoxSizer *m_SGH3VertLeft[4],
*m_SGH3VertMiddle[4], *m_SGH3VertMiddle[4],
*m_SGH3VertRight[4], *m_SGH3VertRight[4],
*m_sGH3_Green[4], *m_sizer_GH3[GH3_CONTROLS][4],
*m_sGH3_Red[4], *m_sGH3_Analog[4];
*m_sGH3_Yellow[4],
*m_sGH3_Blue[4],
*m_sGH3_Orange[4],
*m_sGH3_Plus[4],
*m_sGH3_Minus[4],
*m_sGH3_Whammy[4],
*m_sGH3_Analog[4],
*m_sGH3_ALeft[4],
*m_sGH3_ARight[4],
*m_sGH3_AUp[4],
*m_sGH3_ADown[4],
*m_sGH3_StrumUp[4],
*m_sGH3_StrumDown[4];
wxGridBagSizer *m_SizeAnalogTriggerHorizConfig[4], *m_SizeAnalogTriggerStatusBox[4], *m_TiltGrid[4], wxGridBagSizer *m_SizeAnalogTriggerHorizConfig[4], *m_SizeAnalogTriggerStatusBox[4], *m_TiltGrid[4],
*m_GridLeftStick[4], *m_GridRightStick[4]; *m_GridLeftStick[4], *m_GridRightStick[4];
@ -199,21 +186,8 @@ class WiimotePadConfigDialog : public wxDialog
*m_bCcLl[4], *m_bCcLu[4], *m_bCcLr[4], *m_bCcLd[4], *m_bCcLl[4], *m_bCcLu[4], *m_bCcLr[4], *m_bCcLd[4],
*m_bCcRl[4], *m_bCcRu[4], *m_bCcRr[4], *m_bCcRd[4]; *m_bCcRl[4], *m_bCcRu[4], *m_bCcRr[4], *m_bCcRd[4];
//GH3 //GH3
wxButton *m_bGH3_Green[4], wxButton *m_Button_GH3[GH3_CONTROLS][4],
*m_bGH3_Red[4], *m_bGH3_Analog[4];
*m_bGH3_Yellow[4],
*m_bGH3_Blue[4],
*m_bGH3_Orange[4],
*m_bGH3_Plus[4],
*m_bGH3_Minus[4],
*m_bGH3_Whammy[4],
*m_bGH3_Analog[4],
*m_bGH3_ALeft[4],
*m_bGH3_ARight[4],
*m_bGH3_AUp[4],
*m_bGH3_ADown[4],
*m_bGH3_StrumUp[4],
*m_bGH3_StrumDown[4];
wxStaticText *m_TextScreenWidth[4], *m_TextScreenHeight[4], *m_TextScreenLeft[4], *m_TextScreenTop[4], *m_TextAR[4], wxStaticText *m_TextScreenWidth[4], *m_TextScreenHeight[4], *m_TextScreenLeft[4], *m_TextScreenTop[4], *m_TextAR[4],
*m_tAnalogX[8], *m_tAnalogY[8], *m_TiltTextRoll[4], *m_TiltTextPitch[4], *m_tAnalogX[8], *m_tAnalogY[8], *m_TiltTextRoll[4], *m_TiltTextPitch[4],
@ -234,21 +208,8 @@ class WiimotePadConfigDialog : public wxDialog
*m_tCcRl[4], *m_tCcRu[4], *m_tCcRr[4], *m_tCcRd[4], *m_tCcRl[4], *m_tCcRu[4], *m_tCcRr[4], *m_tCcRd[4],
*m_CcTextLeftStick[4], *m_CcTextRightStick[4], *m_CcTextTriggers[4], *m_CcTextLeftStick[4], *m_CcTextRightStick[4], *m_CcTextTriggers[4],
// GH3 // GH3
*m_tGH3_Green[4], *m_statictext_GH3[GH3_CONTROLS][4],
*m_tGH3_Red[4], *m_tGH3_Analog[4];
*m_tGH3_Yellow[4],
*m_tGH3_Blue[4],
*m_tGH3_Orange[4],
*m_tGH3_Plus[4],
*m_tGH3_Minus[4],
*m_tGH3_Whammy[4],
*m_tGH3_Analog[4],
*m_tGH3_ALeft[4],
*m_tGH3_ARight[4],
*m_tGH3_AUp[4],
*m_tGH3_ADown[4],
*m_tGH3_StrumUp[4],
*m_tGH3_StrumDown[4];
wxButton *ClickedButton; wxButton *ClickedButton;
wxString OldLabel; wxString OldLabel;