WPILib 2012
WPILibRoboticsLibraryforFRC
Buttons/JoystickButton.h
00001 /*----------------------------------------------------------------------------*/
00002 /* Copyright (c) FIRST 2011. All Rights Reserved.                                                         */
00003 /* Open Source Software - may be modified and shared by FRC teams. The code   */
00004 /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib.  */
00005 /*----------------------------------------------------------------------------*/
00006 
00007 #ifndef __JOYSTICK_BUTTON_H__
00008 #define __JOYSTICK_BUTTON_H__
00009 
00010 #include "Joystick.h"
00011 #include "Buttons/Button.h"
00012 
00013 class JoystickButton : public Button
00014 {
00015 public:
00016         JoystickButton(Joystick *joystick, int buttonNumber);
00017         virtual ~JoystickButton() {}
00018 
00019         virtual bool Get();
00020 
00021 private:
00022         Joystick *m_joystick;
00023         int m_buttonNumber;
00024 };
00025 
00026 #endif
 All Classes Functions Variables