From 643c13f3ebd3240aa58f83a35a66909fdd9545d9 Mon Sep 17 00:00:00 2001 From: Ian C Date: Mon, 28 May 2012 22:46:59 +0000 Subject: Added test code to handle buttons to make sure drawing is OK. --- .../Joystick/JoystickState.cs | 37 ++++++++++++++++------ 1 file changed, 27 insertions(+), 10 deletions(-) (limited to 'src/Noddybox.Emulation.Xna.Input/Joystick/JoystickState.cs') diff --git a/src/Noddybox.Emulation.Xna.Input/Joystick/JoystickState.cs b/src/Noddybox.Emulation.Xna.Input/Joystick/JoystickState.cs index d57ebaa..3933127 100644 --- a/src/Noddybox.Emulation.Xna.Input/Joystick/JoystickState.cs +++ b/src/Noddybox.Emulation.Xna.Input/Joystick/JoystickState.cs @@ -28,16 +28,33 @@ namespace Noddybox.Emulation.Xna.Input.Joystick /// /// Defines the state of the joystick. /// - public enum JoystickState + [Flags] + public enum DigitalJoystickState { - None = 0x00, - Up = 0x01, - Down = 0x02, - Left = 0x04, - Right = 0x08, - Fire1 = 0x10, - Fire2 = 0x20, - Fire3 = 0x40, - Fire4 = 0x80 + Centre = 0x00, + Up = 0x01, + Down = 0x02, + Left = 0x04, + Right = 0x08 + } + + /// + /// Defines the type of joystick. + /// + public enum JoystickType + { + Analogue, + Digital + } + + /// + /// Defines the locked axis of the joystick. + /// + public enum JoystickLock + { + EightWay, + FourWay, + TwoWayHorizontal, + TwoWayVertical } } -- cgit v1.2.3