Panda3D

gamepadButton.h
Go to the documentation of this file.
1 /**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file gamepadButton.h
10 * @author rdb
11 * @date 2015-08-21
12 */
13
14 #ifndef GAMEPADBUTTON_H
15 #define GAMEPADBUTTON_H
16
17 #include "pandabase.h"
18
19 #include "buttonHandle.h"
20
21 /**
22 * This class is just used as a convenient namespace for grouping all of these
23 * handy functions that return buttons which map to gamepad buttons.
24 */
25 class EXPCL_PANDA_PUTIL GamepadButton {
26 PUBLISHED:
27 static ButtonHandle lstick();
28 static ButtonHandle rstick();
29 static ButtonHandle lshoulder();
30 static ButtonHandle rshoulder();
31 static ButtonHandle ltrigger();
32 static ButtonHandle rtrigger();
33 static ButtonHandle lgrip();
34 static ButtonHandle rgrip();
35
36 static ButtonHandle dpad_left();
37 static ButtonHandle dpad_right();
38 static ButtonHandle dpad_up();
39 static ButtonHandle dpad_down();
40
41 static ButtonHandle back();
42 static ButtonHandle guide();
43 static ButtonHandle start();
44
45 static ButtonHandle next();
46 static ButtonHandle previous();
47
48 static ButtonHandle face_a();
49 static ButtonHandle face_b();
50 static ButtonHandle face_c();
51 static ButtonHandle face_x();
52 static ButtonHandle face_y();
53 static ButtonHandle face_z();
54
55 static ButtonHandle face_1();
56 static ButtonHandle face_2();
57
58 // Flight stick buttons, takes zero-based index. First is always trigger.
59 static ButtonHandle trigger();
60 static ButtonHandle joystick(int button_number);
61 static ButtonHandle hat_up();
62 static ButtonHandle hat_down();
63 static ButtonHandle hat_left();
64 static ButtonHandle hat_right();
65
66 public:
67 static void init_gamepad_buttons();
68 };
69
70 #endif
buttonHandle.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
ButtonHandle
A ButtonHandle represents a single button from any device, including keyboard buttons and mouse butto...
Definition: buttonHandle.h:26
GamepadButton
This class is just used as a convenient namespace for grouping all of these handy functions that retu...
Definition: gamepadButton.h:25
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.