-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJoystickDialog.h
More file actions
63 lines (50 loc) · 1.5 KB
/
JoystickDialog.h
File metadata and controls
63 lines (50 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//////////////////////////////////////////////////////////////////////////////
// Configuration dialog for joysticks
//////////////////////////////////////////////////////////////////////////////
#ifndef __HEADER_JOYSTICKDIALOG__
#define __HEADER_JOYSTICKDIALOG__
#include <wx/wx.h>
#include "Input.h"
// Declaration of the joystick dialog class
class CJoystickDialog : public wxDialog
{
private:
DECLARE_EVENT_TABLE();
public:
// Constructor and destructor
CJoystickDialog(wxWindow *parent, CInput* pInput);
virtual ~CJoystickDialog();
private:
void OnClose(wxCloseEvent& event);
// Click on the Ok button, check and save config
void OnOk(wxCommandEvent& event);
// Click on the cancel button closes the dialog, changes are lost
void OnCancel(wxCommandEvent& event);
// Update values of joystick axis
void OnTimerUpdate(wxTimerEvent& WXUNUSED(event));
// Controls of the dialog
private:
// Labels for axe values
wxTextCtrl* m_pAxeLabels[12];
// Comboboxes for axe selection
wxComboBox* m_pAxes[4];
// Checkboxes for inverted axes
wxCheckBox* m_pInverted[4];
// Labels for buttons states
wxTextCtrl** m_ppButtonLabels;
// Comboboxes for button selection
wxComboBox* m_pButtons[7];
// Number of buttons
int m_iButtons;
// Timer for value update
wxTimer m_Timer;
// Input object
CInput* m_pInput;
enum
{
ID_BUTTONOK = 1010,
ID_BUTTONCANCEL,
TIMER_UPDATE
};
};
#endif