Line data Source code
1 0 : /* 2 : 3 : PlayerEntityStickProfile.h 4 : 5 : GUI for managing joystick profile settings 6 : 7 : Oolite 8 : Copyright (C) 2004-2013 Giles C Williams and contributors 9 : 10 : This program is free software; you can redistribute it and/or 11 : modify it under the terms of the GNU General Public License 12 : as published by the Free Software Foundation; either version 2 13 : of the License, or (at your option) any later version. 14 : 15 : This program is distributed in the hope that it will be useful, 16 : but WITHOUT ANY WARRANTY; without even the implied warranty of 17 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 : GNU General Public License for more details. 19 : 20 : You should have received a copy of the GNU General Public License 21 : along with this program; if not, write to the Free Software 22 : Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 23 : MA 02110-1301, USA. 24 : 25 : */ 26 : 27 : #import "PlayerEntity.h" 28 : #import "GuiDisplayGen.h" 29 : #import "MyOpenGLView.h" 30 : #import "OOJoystickProfile.h" 31 : #import "Universe.h" 32 : 33 : @interface PlayerEntity (StickProfile) 34 : 35 0 : - (void) setGuiToStickProfileScreen: (GuiDisplayGen *) gui; 36 0 : - (void) stickProfileInputHandler: (GuiDisplayGen *) gui view: (MyOpenGLView *) gameView; 37 0 : - (void) stickProfileGraphAxisProfile: (GLfloat) alpha screenAt: (Vector) screenAt screenSize: (NSSize) screenSize; 38 : 39 : @end 40 : 41 0 : @interface StickProfileScreen: NSObject 42 : { 43 : @private 44 0 : OOJoystickManager *stickHandler; 45 0 : NSUInteger current_axis; 46 0 : OOJoystickAxisProfile *profiles[3][2]; 47 0 : GuiDisplayGen *gui; 48 0 : NSRect graphRect; 49 0 : NSInteger selected_control_point; 50 0 : NSInteger dragged_control_point; 51 0 : NSInteger double_click_control_point; 52 : } 53 : 54 0 : - (id) init; 55 0 : - (void) dealloc; 56 0 : - (void) startGui: (GuiDisplayGen *) gui_display_gen; 57 0 : - (void) mouseDown: (NSPoint) position; 58 0 : - (void) mouseUp; 59 0 : - (void) deleteSelected; 60 : 61 : @end 62 :