mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Started working on the look of the padsimple config dialog
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@641 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,125 +1,124 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// 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/
|
||||
|
||||
#ifndef __CONFIGDIALOG_h__
|
||||
#define __CONFIGDIALOG_h__
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include <wx/dialog.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/combobox.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/notebook.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/gbsizer.h>
|
||||
|
||||
|
||||
#undef CONFIGDIALOG_STYLE
|
||||
#define CONFIGDIALOG_STYLE wxCAPTION | wxSYSTEM_MENU | wxDIALOG_NO_PARENT | wxCLOSE_BOX
|
||||
|
||||
|
||||
class ConfigDialog : public wxDialog
|
||||
{
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
public:
|
||||
ConfigDialog(wxWindow *parent, wxWindowID id = 1, const wxString &title = wxT("Pad Configuration"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = CONFIGDIALOG_STYLE);
|
||||
virtual ~ConfigDialog();
|
||||
|
||||
private:
|
||||
wxNotebook *m_Notebook;
|
||||
wxPanel *m_Controller[4];
|
||||
wxButton *m_Close;
|
||||
|
||||
wxStaticBoxSizer *sDevice[4];
|
||||
wxBoxSizer *sDeviceTop[4];
|
||||
wxBoxSizer *sDeviceBottom[4];
|
||||
wxGridBagSizer* sPage[4];
|
||||
wxStaticBoxSizer *sButtons[4];
|
||||
wxStaticBoxSizer *sTriggerL[4];
|
||||
wxStaticBoxSizer *sTriggerR[4];
|
||||
wxStaticBoxSizer *sStick[4];
|
||||
wxStaticBoxSizer *sCStick[4];
|
||||
wxStaticBoxSizer *sDPad[4];
|
||||
|
||||
wxChoice *m_DeviceName[4];
|
||||
wxCheckBox *m_Attached[4];
|
||||
wxCheckBox *m_Disable[4];
|
||||
wxCheckBox *m_Rumble[4];
|
||||
|
||||
wxButton *m_ButtonA[4];
|
||||
wxButton *m_ButtonB[4];
|
||||
wxButton *m_ButtonX[4];
|
||||
wxButton *m_ButtonY[4];
|
||||
wxButton *m_ButtonZ[4];
|
||||
wxButton *m_ButtonStart[4];
|
||||
wxButton *m_TriggerL[4];
|
||||
wxButton *m_ButtonL[4];
|
||||
wxButton *m_TriggerR[4];
|
||||
wxButton *m_ButtonR[4];
|
||||
wxButton *m_StickUp[4];
|
||||
wxButton *m_StickDown[4];
|
||||
wxButton *m_StickLeft[4];
|
||||
wxButton *m_StickRight[4];
|
||||
wxButton *m_CStickUp[4];
|
||||
wxButton *m_CStickDown[4];
|
||||
wxButton *m_CStickLeft[4];
|
||||
wxButton *m_CStickRight[4];
|
||||
wxButton *m_DPadUp[4];
|
||||
wxButton *m_DPadDown[4];
|
||||
wxButton *m_DPadLeft[4];
|
||||
wxButton *m_DPadRight[4];
|
||||
|
||||
private:
|
||||
|
||||
enum
|
||||
{
|
||||
////GUI Enum Control ID Start
|
||||
ID_CLOSE = 1000,
|
||||
ID_NOTEBOOK,
|
||||
ID_CONTROLLERPAGE1,
|
||||
ID_CONTROLLERPAGE2,
|
||||
ID_CONTROLLERPAGE3,
|
||||
ID_CONTROLLERPAGE4,
|
||||
|
||||
ID_DEVICENAME,
|
||||
ID_ATTACHED,
|
||||
ID_DISABLE,
|
||||
ID_RUMBLE,
|
||||
|
||||
ID_DUMMY_VALUE_ //don't remove this value unless you have other enum values
|
||||
};
|
||||
|
||||
private:
|
||||
void OnClose(wxCloseEvent& event);
|
||||
void CreateGUIControls();
|
||||
void OnCloseClick(wxCommandEvent& event);
|
||||
void OnKeyDown(wxKeyEvent& event);
|
||||
void AttachedCheck(wxCommandEvent& event);
|
||||
void DisableCheck(wxCommandEvent& event);
|
||||
void RumbleCheck(wxCommandEvent& event);
|
||||
void OnButtonClick(wxCommandEvent& event);
|
||||
|
||||
int keyPress;
|
||||
wxButton *clickedButton;
|
||||
/*DInput m_dinput;*/
|
||||
};
|
||||
|
||||
#endif
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// 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/
|
||||
|
||||
#ifndef __CONFIGDLG_H__
|
||||
#define __CONFIGDLG_H__
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include <wx/dialog.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/combobox.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/notebook.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/gbsizer.h>
|
||||
|
||||
|
||||
#undef CONFIGDIALOG_STYLE
|
||||
#define CONFIGDIALOG_STYLE wxCAPTION | wxSYSTEM_MENU | wxDIALOG_NO_PARENT | wxCLOSE_BOX
|
||||
|
||||
|
||||
class ConfigDialog : public wxDialog
|
||||
{
|
||||
|
||||
|
||||
public:
|
||||
ConfigDialog(wxWindow *parent, wxWindowID id = 1, const wxString &title = wxT("Pad Configuration"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = CONFIGDIALOG_STYLE);
|
||||
virtual ~ConfigDialog();
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
wxNotebook *m_Notebook;
|
||||
wxPanel *m_Controller[4];
|
||||
wxButton *m_Close;
|
||||
|
||||
wxStaticBoxSizer *sDevice[4];
|
||||
wxBoxSizer *sDeviceTop[4];
|
||||
wxBoxSizer *sDeviceBottom[4];
|
||||
wxGridBagSizer* sPage[4];
|
||||
wxStaticBoxSizer *sButtons[4];
|
||||
wxBoxSizer *hButtons[4][2];
|
||||
wxStaticBoxSizer *sTriggerL[4];
|
||||
wxStaticBoxSizer *sTriggerR[4];
|
||||
wxStaticBoxSizer *sStick[4];
|
||||
wxStaticBoxSizer *sCStick[4];
|
||||
wxStaticBoxSizer *sDPad[4];
|
||||
|
||||
wxChoice *m_DeviceName[4];
|
||||
wxCheckBox *m_Attached[4];
|
||||
wxCheckBox *m_Disable[4];
|
||||
wxCheckBox *m_Rumble[4];
|
||||
|
||||
wxButton *m_ButtonA[4];
|
||||
wxButton *m_ButtonB[4];
|
||||
wxButton *m_ButtonX[4];
|
||||
wxButton *m_ButtonY[4];
|
||||
wxButton *m_ButtonZ[4];
|
||||
wxButton *m_ButtonStart[4];
|
||||
wxButton *m_TriggerL[4];
|
||||
wxButton *m_ButtonL[4];
|
||||
wxButton *m_TriggerR[4];
|
||||
wxButton *m_ButtonR[4];
|
||||
wxButton *m_StickUp[4];
|
||||
wxButton *m_StickDown[4];
|
||||
wxButton *m_StickLeft[4];
|
||||
wxButton *m_StickRight[4];
|
||||
wxButton *m_CStickUp[4];
|
||||
wxButton *m_CStickDown[4];
|
||||
wxButton *m_CStickLeft[4];
|
||||
wxButton *m_CStickRight[4];
|
||||
wxButton *m_DPadUp[4];
|
||||
wxButton *m_DPadDown[4];
|
||||
wxButton *m_DPadLeft[4];
|
||||
wxButton *m_DPadRight[4];
|
||||
|
||||
enum
|
||||
{
|
||||
////GUI Enum Control ID Start
|
||||
ID_CLOSE = 1000,
|
||||
ID_NOTEBOOK,
|
||||
ID_CONTROLLERPAGE1,
|
||||
ID_CONTROLLERPAGE2,
|
||||
ID_CONTROLLERPAGE3,
|
||||
ID_CONTROLLERPAGE4,
|
||||
|
||||
ID_DEVICENAME,
|
||||
ID_ATTACHED,
|
||||
ID_DISABLE,
|
||||
ID_RUMBLE,
|
||||
|
||||
ID_DUMMY_VALUE_ //don't remove this value unless you have other enum values
|
||||
};
|
||||
|
||||
void OnClose(wxCloseEvent& event);
|
||||
void CreateGUIControls();
|
||||
void OnCloseClick(wxCommandEvent& event);
|
||||
void OnKeyDown(wxKeyEvent& event);
|
||||
void AttachedCheck(wxCommandEvent& event);
|
||||
void DisableCheck(wxCommandEvent& event);
|
||||
void RumbleCheck(wxCommandEvent& event);
|
||||
void OnButtonClick(wxCommandEvent& event);
|
||||
|
||||
int keyPress;
|
||||
wxButton *clickedButton;
|
||||
wxString oldLabel;
|
||||
/*DInput m_dinput;*/
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
// controls
|
||||
#ifndef __PADSIMPLE_H__
|
||||
#define __PADSIMPLE_H__
|
||||
enum
|
||||
{
|
||||
CTL_A = 0,
|
||||
@@ -74,6 +76,35 @@ static const char* controlNames[] =
|
||||
"D-Pad_right",
|
||||
};
|
||||
|
||||
// control human readable
|
||||
static const char* userControlNames[] =
|
||||
{
|
||||
"A",
|
||||
"B",
|
||||
"X",
|
||||
"Y",
|
||||
"Z",
|
||||
"Start",
|
||||
"Analog", // Don't use
|
||||
"L",
|
||||
"Analog", // Don't use
|
||||
"R",
|
||||
"Up",
|
||||
"Down",
|
||||
"Left",
|
||||
"Right",
|
||||
"Soft_main_switch", // Don't use
|
||||
"Up",
|
||||
"Down",
|
||||
"Left",
|
||||
"Right",
|
||||
"Soft_sub_switch", // Don't use
|
||||
"Up",
|
||||
"Down",
|
||||
"Left",
|
||||
"Right",
|
||||
};
|
||||
|
||||
struct SPads {
|
||||
bool type; //keyboard = 0, xpad = 1
|
||||
int XPad; //player# of the xpad
|
||||
@@ -87,3 +118,5 @@ extern SPads pad[];
|
||||
|
||||
void LoadConfig();
|
||||
void SaveConfig();
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,39 +0,0 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by resource.rc
|
||||
//
|
||||
#define IDD_PADCONFIG 101
|
||||
#define IDD_ABOUTPAD 104
|
||||
#define IDC_SETSTART 1003
|
||||
#define IDC_SETA 1004
|
||||
#define IDC_SETB 1005
|
||||
#define IDC_SETX 1006
|
||||
#define IDC_SETY 1007
|
||||
#define IDC_SETZ 1008
|
||||
#define IDC_SETSUBUP 1009
|
||||
#define IDC_SETSUBLEFT 1010
|
||||
#define IDC_SETSUBRIGHT 1011
|
||||
#define IDC_SETSUBDOWN 1012
|
||||
#define IDC_SETDPADUP 1013
|
||||
#define IDC_SETDPADLEFT 1014
|
||||
#define IDC_SETDPADRIGHT 1015
|
||||
#define IDC_SETDPADDOWN 1016
|
||||
#define IDC_SETMAINUP 1017
|
||||
#define IDC_SETMAINLEFT 1018
|
||||
#define IDC_SETMAINDOWN 1019
|
||||
#define IDC_SETMAINRIGHT 1020
|
||||
#define IDC_SETL 1021
|
||||
#define IDC_SETR 1022
|
||||
#define IDC_RUMBLE 1023
|
||||
#define IDC_RUMBLE1 1023
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 105
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1024
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,137 +0,0 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_PADCONFIG DIALOGEX 0, 0, 344, 236
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Pad configuration"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Close",IDOK,287,215,50,14
|
||||
PUSHBUTTON "start",IDC_SETSTART,147,103,40,14
|
||||
PUSHBUTTON "a",IDC_SETA,249,83,40,14
|
||||
PUSHBUTTON "b",IDC_SETB,221,99,40,14
|
||||
PUSHBUTTON "x",IDC_SETX,206,72,40,14
|
||||
PUSHBUTTON "y",IDC_SETY,292,90,40,14
|
||||
PUSHBUTTON "z",IDC_SETZ,247,36,40,14
|
||||
PUSHBUTTON " ",IDC_SETSUBUP,241,129,40,14
|
||||
PUSHBUTTON " ",IDC_SETSUBLEFT,199,148,40,14
|
||||
PUSHBUTTON " ",IDC_SETSUBRIGHT,281,147,40,14
|
||||
PUSHBUTTON " ",IDC_SETSUBDOWN,242,168,40,14
|
||||
PUSHBUTTON " ",IDC_SETDPADUP,72,130,40,14
|
||||
PUSHBUTTON " ",IDC_SETDPADLEFT,29,146,40,14
|
||||
PUSHBUTTON " ",IDC_SETDPADRIGHT,118,146,40,14
|
||||
PUSHBUTTON " ",IDC_SETDPADDOWN,73,167,40,14
|
||||
PUSHBUTTON " ",IDC_SETMAINUP,47,48,40,14
|
||||
PUSHBUTTON " ",IDC_SETMAINLEFT,13,67,40,14
|
||||
PUSHBUTTON " ",IDC_SETMAINDOWN,47,87,40,14
|
||||
PUSHBUTTON " ",IDC_SETMAINRIGHT,85,67,40,14
|
||||
PUSHBUTTON "l",IDC_SETL,97,17,40,14
|
||||
PUSHBUTTON "r",IDC_SETR,222,17,40,14
|
||||
GROUPBOX "Keyboard",IDC_STATIC,7,7,330,185
|
||||
GROUPBOX "XBox 360 Pad",IDC_STATIC,7,196,107,33
|
||||
CONTROL "Enable Rumble",IDC_RUMBLE1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,210,76,10
|
||||
END
|
||||
|
||||
IDD_ABOUTPAD DIALOGEX 0, 0, 184, 76
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "About Dolphin Simple Pad Plugin"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,127,55,50,14
|
||||
LTEXT "Coded by F|RES and ector",IDC_STATIC,7,30,104,14
|
||||
LTEXT "Keyboard and XInput simple pad plugin",IDC_STATIC,7,6,126,13
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_PADCONFIG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 337
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 229
|
||||
END
|
||||
|
||||
IDD_ABOUTPAD, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 177
|
||||
TOPMARGIN, 6
|
||||
BOTTOMMARGIN, 69
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
Reference in New Issue
Block a user