| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | //////////////////////////////////////////////////////////////////////////////////////////
 | 
					
						
							|  |  |  |  | // Project description
 | 
					
						
							|  |  |  |  | // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
					
						
							|  |  |  |  | // Name: nJoy 
 | 
					
						
							|  |  |  |  | // Description: A Dolphin Compatible Input Plugin
 | 
					
						
							|  |  |  |  | //
 | 
					
						
							|  |  |  |  | // Author: Falcon4ever (nJoy@falcon4ever.com)
 | 
					
						
							|  |  |  |  | // Site: www.multigesture.net
 | 
					
						
							|  |  |  |  | // Copyright (C) 2003-2008 Dolphin Project.
 | 
					
						
							|  |  |  |  | //
 | 
					
						
							|  |  |  |  | //////////////////////////////////////////////////////////////////////////////////////////
 | 
					
						
							|  |  |  |  | //
 | 
					
						
							|  |  |  |  | // Licensetype: GNU General Public License (GPL)
 | 
					
						
							|  |  |  |  | //
 | 
					
						
							|  |  |  |  | // 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/
 | 
					
						
							|  |  |  |  | //
 | 
					
						
							|  |  |  |  | //////////////////////////////////////////////////////////////////////////////////////////
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-26 02:42:15 +00:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | #ifndef __CONFIGBOX_h__
 | 
					
						
							|  |  |  |  | #define __CONFIGBOX_h__
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | #ifndef WX_PRECOMP
 | 
					
						
							|  |  |  |  | 	#include <wx/wx.h>
 | 
					
						
							|  |  |  |  | 	#include <wx/dialog.h>
 | 
					
						
							|  |  |  |  | #else
 | 
					
						
							|  |  |  |  | 	#include <wx/wxprec.h>
 | 
					
						
							|  |  |  |  | #endif
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | #include <wx/button.h>
 | 
					
						
							|  |  |  |  | #include <wx/stattext.h>
 | 
					
						
							|  |  |  |  | #include <wx/statbox.h>
 | 
					
						
							|  |  |  |  | #include <wx/notebook.h>
 | 
					
						
							|  |  |  |  | #include <wx/panel.h>
 | 
					
						
							|  |  |  |  | #include <wx/statbmp.h>
 | 
					
						
							| 
									
										
										
										
											2008-12-26 02:42:15 +00:00
										 |  |  |  | #include <wx/gbsizer.h>
 | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-10 14:02:01 +00:00
										 |  |  |  | #include "../nJoy.h"
 | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | class ConfigBox : public wxDialog | 
					
						
							|  |  |  |  | { | 
					
						
							|  |  |  |  | 	private: | 
					
						
							|  |  |  |  | 		DECLARE_EVENT_TABLE(); | 
					
						
							|  |  |  |  | 		 | 
					
						
							|  |  |  |  | 	public: | 
					
						
							| 
									
										
										
										
											2008-12-26 02:42:15 +00:00
										 |  |  |  | 		ConfigBox(wxWindow *parent, wxWindowID id = 1, | 
					
						
							|  |  |  |  | 			const wxString &title = wxT("Configure: nJoy Input Plugin"), | 
					
						
							|  |  |  |  | 			const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, | 
					
						
							|  |  |  |  | 			long style = wxDEFAULT_DIALOG_STYLE); | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 		virtual ~ConfigBox(); | 
					
						
							| 
									
										
										
										
											2008-12-26 02:42:15 +00:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | 	#if wxUSE_TIMER
 | 
					
						
							|  |  |  |  | 		void OnTimer(wxTimerEvent& WXUNUSED(event)) { Update(); } | 
					
						
							| 
									
										
										
										
											2009-01-19 17:47:00 +00:00
										 |  |  |  | 		void OnButtonTimer(wxTimerEvent& WXUNUSED(event)) { DoGetButtons(GetButtonWaitingID); } | 
					
						
							|  |  |  |  | 		wxTimer *m_ConstantTimer, *m_ButtonMappingTimer; | 
					
						
							| 
									
										
										
										
											2008-12-26 02:42:15 +00:00
										 |  |  |  | 	#endif
 | 
					
						
							| 
									
										
										
										
											2008-12-27 11:32:03 +00:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// Debugging
 | 
					
						
							|  |  |  |  | 		wxStaticText* m_pStatusBar, * m_pStatusBar2; | 
					
						
							| 
									
										
										
										
											2009-01-21 18:09:31 +00:00
										 |  |  |  | 		wxTextCtrl* m_TCDebugging; | 
					
						
							|  |  |  |  | 		bool Debugging; | 
					
						
							|  |  |  |  | 		void LogMsg(const char* format, ...); | 
					
						
							| 
									
										
										
										
											2008-12-27 11:32:03 +00:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// Status window
 | 
					
						
							|  |  |  |  | 		int BoxW, BoxH; | 
					
						
							| 
									
										
										
										
											2009-01-19 17:47:00 +00:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// Configure buttons
 | 
					
						
							|  |  |  |  | 		int GetButtonWaitingID, GetButtonWaitingTimer; | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 		 | 
					
						
							|  |  |  |  | 	private: | 
					
						
							|  |  |  |  | 		wxButton *m_About; | 
					
						
							|  |  |  |  | 		wxButton *m_OK; | 
					
						
							|  |  |  |  | 		wxButton *m_Cancel; | 
					
						
							|  |  |  |  | 				 | 
					
						
							| 
									
										
										
										
											2008-12-27 11:32:03 +00:00
										 |  |  |  | 		wxPanel *m_Controller[4]; // Main containers	
 | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 		wxNotebook *m_Notebook; | 
					
						
							| 
									
										
										
										
											2008-12-27 11:32:03 +00:00
										 |  |  |  | 		wxBoxSizer * m_MainSizer; | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-27 11:32:03 +00:00
										 |  |  |  | 		wxPanel * m_pKeys[4], * m_pInStatus[4], * m_pOutStatus[4]; | 
					
						
							|  |  |  |  | 		wxBitmap WxStaticBitmap1_BITMAP, WxStaticBitmap1_BITMAPGray; | 
					
						
							| 
									
										
										
										
											2008-12-26 02:42:15 +00:00
										 |  |  |  | 		wxStaticBoxSizer * m_sKeys[4]; | 
					
						
							| 
									
										
										
										
											2008-12-27 11:32:03 +00:00
										 |  |  |  | 		wxBoxSizer *m_sMain[4], *m_sMainLeft[4], *m_sMainRight[4]; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		/////////////////////////////
 | 
					
						
							|  |  |  |  | 		// Settings
 | 
					
						
							|  |  |  |  | 		// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
					
						
							| 
									
										
										
										
											2008-12-26 02:42:15 +00:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 		wxComboBox *m_Joyname[4]; | 
					
						
							| 
									
										
										
										
											2009-01-20 05:28:30 +00:00
										 |  |  |  | 		wxComboBox *m_ControlType[4], *m_TriggerType[4]; | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 		wxComboBox *m_Deadzone[4]; | 
					
						
							|  |  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-01-20 05:28:30 +00:00
										 |  |  |  | 		wxCheckBox *m_Joyattach[4]; // Attached pad
 | 
					
						
							| 
									
										
										
										
											2008-12-26 02:42:15 +00:00
										 |  |  |  | 		wxStaticBoxSizer *m_gJoyname[4]; | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-20 05:28:30 +00:00
										 |  |  |  | 		wxStaticBoxSizer *m_gExtrasettings[4];  // Extra settings
 | 
					
						
							|  |  |  |  | 		wxGridBagSizer * m_gGBExtrasettings[4]; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		wxBoxSizer* m_sSettings[4]; // General settings 2
 | 
					
						
							|  |  |  |  | 		wxStaticBoxSizer *m_gGenSettings[4];		 | 
					
						
							| 
									
										
										
										
											2008-12-27 11:32:03 +00:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-20 05:28:30 +00:00
										 |  |  |  | 		wxStaticBoxSizer *m_gGenSettingsID[4]; | 
					
						
							|  |  |  |  | 		wxGridBagSizer * m_gGBGenSettings[4]; | 
					
						
							| 
									
										
										
										
											2009-02-10 14:02:01 +00:00
										 |  |  |  | 		wxCheckBox *m_CBSaveByID[4], *m_CBShowAdvanced[4]; | 
					
						
							| 
									
										
										
										
											2009-01-20 05:28:30 +00:00
										 |  |  |  | 		wxStaticText *m_TSControltype[4], *m_TSTriggerType[4]; | 
					
						
							| 
									
										
										
										
											2008-12-27 11:32:03 +00:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-10 14:02:01 +00:00
										 |  |  |  | 		wxStaticBoxSizer *m_gStatusIn[4], *m_gStatusInSettings[4], *m_gStatusAdvancedSettings[4]; // Advanced settings
 | 
					
						
							| 
									
										
										
										
											2008-12-27 11:32:03 +00:00
										 |  |  |  | 		wxBoxSizer *m_gStatusInSettingsH[4]; | 
					
						
							|  |  |  |  | 		wxGridBagSizer * m_GBAdvancedMainStick[4]; | 
					
						
							| 
									
										
										
										
											2009-01-20 05:28:30 +00:00
										 |  |  |  | 		wxStaticText *m_TStatusIn[4], *m_TStatusOut[4], *m_STDiagonal[4]; | 
					
						
							|  |  |  |  | 		wxComboBox *m_CoBDiagonal[4]; wxCheckBox *m_CBS_to_C[4]; | 
					
						
							| 
									
										
										
										
											2009-02-10 14:02:01 +00:00
										 |  |  |  | 		wxCheckBox *m_CBCheckFocus[4], *m_AdvancedMapFilter[4]; | 
					
						
							| 
									
										
										
										
											2008-12-27 11:32:03 +00:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-20 05:28:30 +00:00
										 |  |  |  | 		wxStaticBoxSizer *m_gStatusTriggers[4]; // Triggers
 | 
					
						
							|  |  |  |  | 		wxStaticText *m_TStatusTriggers[4]; | 
					
						
							| 
									
										
										
										
											2008-12-27 11:32:03 +00:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | 		/////////////////////////////
 | 
					
						
							|  |  |  |  | 		// Keys
 | 
					
						
							|  |  |  |  | 		// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
					
						
							| 
									
										
										
										
											2008-12-28 18:50:24 +00:00
										 |  |  |  | 		int g_Pressed; // Keyboard input
 | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | 		wxTextCtrl *m_JoyShoulderL[4]; | 
					
						
							|  |  |  |  | 		wxTextCtrl *m_JoyShoulderR[4]; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		wxButton *m_bJoyShoulderL[4]; | 
					
						
							|  |  |  |  | 		wxButton *m_bJoyShoulderR[4]; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		wxTextCtrl *m_JoyButtonA[4]; | 
					
						
							|  |  |  |  | 		wxTextCtrl *m_JoyButtonB[4]; | 
					
						
							|  |  |  |  | 		wxTextCtrl *m_JoyButtonX[4]; | 
					
						
							|  |  |  |  | 		wxTextCtrl *m_JoyButtonY[4]; | 
					
						
							|  |  |  |  | 		wxTextCtrl *m_JoyButtonZ[4]; | 
					
						
							|  |  |  |  | 		wxTextCtrl *m_JoyButtonStart[4]; | 
					
						
							|  |  |  |  | 		wxTextCtrl *m_JoyButtonHalfpress[4]; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		wxButton *m_bJoyButtonA[4]; | 
					
						
							|  |  |  |  | 		wxButton *m_bJoyButtonB[4]; | 
					
						
							|  |  |  |  | 		wxButton *m_bJoyButtonX[4]; | 
					
						
							|  |  |  |  | 		wxButton *m_bJoyButtonY[4]; | 
					
						
							|  |  |  |  | 		wxButton *m_bJoyButtonZ[4]; | 
					
						
							|  |  |  |  | 		wxButton *m_bJoyButtonStart[4]; | 
					
						
							|  |  |  |  | 		wxButton *m_bJoyButtonHalfpress[4]; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		wxTextCtrl *m_JoyAnalogMainX[4]; | 
					
						
							|  |  |  |  | 		wxTextCtrl *m_JoyAnalogMainY[4]; | 
					
						
							|  |  |  |  | 		wxTextCtrl *m_JoyAnalogSubX[4]; | 
					
						
							|  |  |  |  | 		wxTextCtrl *m_JoyAnalogSubY[4]; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		wxButton *m_bJoyAnalogMainX[4]; | 
					
						
							|  |  |  |  | 		wxButton *m_bJoyAnalogMainY[4]; | 
					
						
							|  |  |  |  | 		wxButton *m_bJoyAnalogSubX[4]; | 
					
						
							|  |  |  |  | 		wxButton *m_bJoyAnalogSubY[4]; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		wxTextCtrl *m_JoyDpadUp[4]; | 
					
						
							|  |  |  |  | 		wxTextCtrl *m_JoyDpadDown[4]; | 
					
						
							|  |  |  |  | 		wxTextCtrl *m_JoyDpadLeft[4]; | 
					
						
							|  |  |  |  | 		wxTextCtrl *m_JoyDpadRight[4]; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		wxButton *m_bJoyDpadUp[4]; | 
					
						
							|  |  |  |  | 		wxButton *m_bJoyDpadDown[4]; | 
					
						
							|  |  |  |  | 		wxButton *m_bJoyDpadLeft[4]; | 
					
						
							|  |  |  |  | 		wxButton *m_bJoyDpadRight[4]; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		wxStaticText *m_textMainX[4]; | 
					
						
							|  |  |  |  | 		wxStaticText *m_textMainY[4]; | 
					
						
							|  |  |  |  | 		wxStaticText *m_textDpadUp[4]; | 
					
						
							|  |  |  |  | 		wxStaticText *m_textDpadDown[4]; | 
					
						
							|  |  |  |  | 		wxStaticText *m_textDpadLeft[4]; | 
					
						
							|  |  |  |  | 		wxStaticText *m_textDpadRight[4]; | 
					
						
							|  |  |  |  | 		wxStaticText *m_textDeadzone[4]; | 
					
						
							|  |  |  |  | 		wxStaticText *m_textHalfpress[4]; | 
					
						
							|  |  |  |  | 		wxStaticText *m_textSubX[4]; | 
					
						
							|  |  |  |  | 		wxStaticText *m_textSubY[4]; | 
					
						
							|  |  |  |  | 		wxStaticText *m_textWebsite[4]; | 
					
						
							|  |  |  |  | 		 | 
					
						
							|  |  |  |  | 		wxTextCtrl *m_PlaceholderBMP[4]; | 
					
						
							| 
									
										
										
										
											2008-12-27 11:32:03 +00:00
										 |  |  |  | 		wxStaticBitmap *m_controllerimage[4], | 
					
						
							|  |  |  |  | 			*m_bmpSquare[4], *m_bmpDot[4], *m_bmpSquareOut[4], *m_bmpDotOut[4]; | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-01-21 18:09:31 +00:00
										 |  |  |  | 		int notebookpage; bool ControlsCreated; | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 	private: | 
					
						
							|  |  |  |  | 		enum | 
					
						
							|  |  |  |  | 		{ | 
					
						
							|  |  |  |  | 			ID_ABOUT = 1000, | 
					
						
							|  |  |  |  | 			ID_OK, | 
					
						
							|  |  |  |  | 			ID_CANCEL, | 
					
						
							|  |  |  |  | 			ID_NOTEBOOK, | 
					
						
							|  |  |  |  | 			ID_CONTROLLERPAGE1, | 
					
						
							|  |  |  |  | 			ID_CONTROLLERPAGE2, | 
					
						
							|  |  |  |  | 			ID_CONTROLLERPAGE3, | 
					
						
							|  |  |  |  | 			ID_CONTROLLERPAGE4, | 
					
						
							| 
									
										
										
										
											2008-12-27 11:32:03 +00:00
										 |  |  |  | 			ID_CONTROLLERPICTURE, // Background picture
 | 
					
						
							| 
									
										
										
										
											2008-12-26 02:42:15 +00:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | 			ID_KEYSPANEL1, ID_KEYSPANEL2, ID_KEYSPANEL3, ID_KEYSPANEL4, | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-27 11:32:03 +00:00
										 |  |  |  | 			IDG_JOYSTICK, IDC_JOYNAME, IDC_JOYATTACH, // Controller attached
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 			IDG_EXTRASETTINGS, IDC_DEADZONE, // Extra settings
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-20 05:28:30 +00:00
										 |  |  |  | 			IDG_CONTROLLERTYPE,	IDC_CONTROLTYPE, IDC_TRIGGERTYPE, // Controller type		
 | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-10 14:02:01 +00:00
										 |  |  |  | 			IDC_SAVEBYID, IDC_SHOWADVANCED, // Settings
 | 
					
						
							| 
									
										
										
										
											2008-12-27 11:32:03 +00:00
										 |  |  |  | 			 | 
					
						
							|  |  |  |  | 			ID_INSTATUS1, ID_INSTATUS2, ID_INSTATUS3, ID_INSTATUS4, // Advanced status
 | 
					
						
							| 
									
										
										
										
											2008-12-26 02:42:15 +00:00
										 |  |  |  | 			ID_STATUSBMP1, ID_STATUSBMP2, ID_STATUSBMP3, ID_STATUSBMP4, | 
					
						
							|  |  |  |  | 			ID_STATUSDOTBMP1, ID_STATUSDOTBMP2, ID_STATUSDOTBMP3, ID_STATUSDOTBMP4, | 
					
						
							| 
									
										
										
										
											2008-12-27 11:32:03 +00:00
										 |  |  |  | 			IDT_STATUS_IN, IDT_STATUS_OUT, | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-27 11:32:03 +00:00
										 |  |  |  | 			// Advaced settings
 | 
					
						
							| 
									
										
										
										
											2009-02-10 14:02:01 +00:00
										 |  |  |  | 			IDCB_MAINSTICK_DIAGONAL, IDCB_MAINSTICK_S_TO_C, IDT_MAINSTICK_DIAGONAL, IDT_TRIGGERS, IDCB_CHECKFOCUS, IDCB_FILTER_SETTINGS, | 
					
						
							| 
									
										
										
										
											2008-12-27 11:32:03 +00:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-19 17:47:00 +00:00
										 |  |  |  | 			// Timers
 | 
					
						
							|  |  |  |  | 			IDTM_CONSTANT, IDTM_BUTTON, | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-27 11:32:03 +00:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-19 23:17:29 +00:00
										 |  |  |  | 			// ==============================================
 | 
					
						
							| 
									
										
										
										
											2008-12-27 11:32:03 +00:00
										 |  |  |  | 			// Keys objects
 | 
					
						
							|  |  |  |  | 			// -----------------------------
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-20 10:37:48 +00:00
										 |  |  |  | 			// -------------------------------------
 | 
					
						
							|  |  |  |  | 			// Text controls that hold the mapped key value
 | 
					
						
							|  |  |  |  | 			// ----------
 | 
					
						
							|  |  |  |  | 			ID_ANALOG_MAIN_X = 2000, | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 			ID_ANALOG_MAIN_Y, | 
					
						
							|  |  |  |  | 			ID_ANALOG_SUB_X, | 
					
						
							|  |  |  |  | 			ID_ANALOG_SUB_Y, | 
					
						
							| 
									
										
										
										
											2009-01-20 10:37:48 +00:00
										 |  |  |  | 			ID_SHOULDER_L, | 
					
						
							|  |  |  |  | 			ID_SHOULDER_R, | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | 			ID_DPAD_UP, | 
					
						
							|  |  |  |  | 			ID_DPAD_DOWN, | 
					
						
							|  |  |  |  | 			ID_DPAD_LEFT, | 
					
						
							|  |  |  |  | 			ID_DPAD_RIGHT, | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-20 10:37:48 +00:00
										 |  |  |  | 			ID_BUTTON_A, | 
					
						
							|  |  |  |  | 			ID_BUTTON_B, | 
					
						
							|  |  |  |  | 			ID_BUTTON_X, | 
					
						
							|  |  |  |  | 			ID_BUTTON_Y, | 
					
						
							|  |  |  |  | 			ID_BUTTON_Z, | 
					
						
							|  |  |  |  | 			ID_BUTTONSTART, | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 			ID_BUTTONHALFPRESS, | 
					
						
							|  |  |  |  | 			// ------------------ Keep this order
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-19 23:17:29 +00:00
										 |  |  |  | 			// -------------------------------------
 | 
					
						
							|  |  |  |  | 			// Buttons controls (it's important that they are kept in this order)	
 | 
					
						
							| 
									
										
										
										
											2009-01-20 10:37:48 +00:00
										 |  |  |  | 			// --------
 | 
					
						
							| 
									
										
										
										
											2009-01-19 05:49:25 +00:00
										 |  |  |  | 			IDB_ANALOG_MAIN_X = 3000, | 
					
						
							|  |  |  |  | 			IDB_ANALOG_MAIN_Y, | 
					
						
							|  |  |  |  | 			IDB_ANALOG_SUB_X, | 
					
						
							|  |  |  |  | 			IDB_ANALOG_SUB_Y, | 
					
						
							|  |  |  |  | 			IDB_SHOULDER_L, | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 			IDB_SHOULDER_R, | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-19 05:49:25 +00:00
										 |  |  |  | 			IDB_DPAD_UP, | 
					
						
							|  |  |  |  | 			IDB_DPAD_DOWN, | 
					
						
							|  |  |  |  | 			IDB_DPAD_LEFT, | 
					
						
							|  |  |  |  | 			IDB_DPAD_RIGHT, | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 			IDB_BUTTON_A, | 
					
						
							|  |  |  |  | 			IDB_BUTTON_B, | 
					
						
							|  |  |  |  | 			IDB_BUTTON_X, | 
					
						
							|  |  |  |  | 			IDB_BUTTON_Y, | 
					
						
							|  |  |  |  | 			IDB_BUTTON_Z, | 
					
						
							|  |  |  |  | 			IDB_BUTTONSTART, | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-19 05:49:25 +00:00
										 |  |  |  | 			IDB_BUTTONHALFPRESS, | 
					
						
							| 
									
										
										
										
											2009-01-19 23:17:29 +00:00
										 |  |  |  | 			// ------------------ Keep this order
 | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-20 10:37:48 +00:00
										 |  |  |  | 			// Statis text controls that hold the button label
 | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 			IDT_ANALOG_MAIN_X = 4000, | 
					
						
							|  |  |  |  | 			IDT_ANALOG_MAIN_Y, | 
					
						
							| 
									
										
										
										
											2009-01-20 10:37:48 +00:00
										 |  |  |  | 			IDT_ANALOG_SUB_X, | 
					
						
							|  |  |  |  | 			IDT_ANALOG_SUB_Y, | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 			IDT_DPAD_UP, | 
					
						
							|  |  |  |  | 			IDT_DPAD_DOWN, | 
					
						
							|  |  |  |  | 			IDT_DPAD_LEFT, | 
					
						
							|  |  |  |  | 			IDT_DPAD_RIGHT, | 
					
						
							|  |  |  |  | 			IDT_DEADZONE, | 
					
						
							|  |  |  |  | 			IDT_BUTTONHALFPRESS, | 
					
						
							| 
									
										
										
										
											2009-01-20 10:37:48 +00:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | 			IDT_DPADTYPE, IDT_TRIGGERTYPE,	 | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 			IDT_WEBSITE, | 
					
						
							| 
									
										
										
										
											2009-01-21 18:09:31 +00:00
										 |  |  |  | 			IDT_DEBUGGING, IDT_DEBUGGING2, IDT_DEBUGGING3, | 
					
						
							| 
									
										
										
										
											2009-01-19 23:17:29 +00:00
										 |  |  |  | 			// ============
 | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | 			ID_DUMMY_VALUE_ //don't remove this value unless you have other enum values
 | 
					
						
							|  |  |  |  | 		}; | 
					
						
							|  |  |  |  | 	 | 
					
						
							|  |  |  |  | 	private: | 
					
						
							|  |  |  |  | 		void AboutClick(wxCommandEvent& event); | 
					
						
							|  |  |  |  | 		void OKClick(wxCommandEvent& event); | 
					
						
							|  |  |  |  | 		void CancelClick(wxCommandEvent& event); | 
					
						
							| 
									
										
										
										
											2009-01-21 18:09:31 +00:00
										 |  |  |  | 		void DoSave(bool ChangePad = false, int Slot = -1); | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-21 18:09:31 +00:00
										 |  |  |  | 		void DoChangeJoystick(); void PadOpen(int Open); void PadClose(int Close); | 
					
						
							|  |  |  |  | 		void UpdateGUI(int _notebookpage); | 
					
						
							| 
									
										
										
										
											2008-12-27 11:32:03 +00:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-25 18:20:16 +00:00
										 |  |  |  | 		void ChangeSettings(wxCommandEvent& event); | 
					
						
							| 
									
										
										
										
											2008-12-27 11:32:03 +00:00
										 |  |  |  | 		void ComboChange(wxCommandEvent& event); | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | 		void OnClose(wxCloseEvent& event); | 
					
						
							| 
									
										
										
										
											2008-12-26 02:42:15 +00:00
										 |  |  |  | 		void CreateGUIControls(); void CreateAdvancedControls(int i); | 
					
						
							| 
									
										
										
										
											2008-12-27 11:32:03 +00:00
										 |  |  |  | 		void SizeWindow(); | 
					
						
							| 
									
										
										
										
											2008-12-26 02:42:15 +00:00
										 |  |  |  | 		wxBitmap CreateBitmap(); wxBitmap CreateBitmapDot(); | 
					
						
							|  |  |  |  | 		void PadGetStatus(); void Update(); | 
					
						
							|  |  |  |  |   | 
					
						
							| 
									
										
										
										
											2009-02-10 14:02:01 +00:00
										 |  |  |  | 		void UpdateGUIButtonMapping(int controller); | 
					
						
							| 
									
										
										
										
											2009-01-21 18:09:31 +00:00
										 |  |  |  | 		void SaveButtonMapping(int controller, bool DontChangeId = false, int FromSlot = -1); | 
					
						
							| 
									
										
										
										
											2009-01-25 18:20:16 +00:00
										 |  |  |  | 		void SaveButtonMappingAll(int Slot); | 
					
						
							| 
									
										
										
										
											2009-02-02 03:16:59 +00:00
										 |  |  |  | 		void UpdateGUIAll(int Slot); | 
					
						
							| 
									
										
										
										
											2009-01-20 10:37:48 +00:00
										 |  |  |  | 		void ToBlank(bool ToBlank = true); | 
					
						
							| 
									
										
										
										
											2009-01-21 18:09:31 +00:00
										 |  |  |  | 		void OnSaveById(); | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | 		void NotebookPageChanged(wxNotebookEvent& event); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-19 17:47:00 +00:00
										 |  |  |  | 		void GetButtons(wxCommandEvent& event); void DoGetButtons(int); | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | 		void GetHats(int ID); | 
					
						
							|  |  |  |  | 		void GetAxis(wxCommandEvent& event); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-26 02:42:15 +00:00
										 |  |  |  | 		void OnPaint(wxPaintEvent &event); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-25 18:20:16 +00:00
										 |  |  |  | 		void SetButtonText(int id, char text[128], int Page = -1); void SetButtonTextAll(int id, char text[128]); | 
					
						
							|  |  |  |  | 		wxString GetButtonText(int id, int Page = -1); | 
					
						
							| 
									
										
										
										
											2008-12-28 18:50:24 +00:00
										 |  |  |  | 		void OnKeyDown(wxKeyEvent& event); | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  |  | }; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | #endif
 |