Oolite 1.91.0.7645-241119-222d325
Loading...
Searching...
No Matches
PlayerEntity(StickProfile) Category Reference

#include <PlayerEntityStickProfile.h>

Instance Methods

(void) - setGuiToStickProfileScreen:
 
(void) - stickProfileInputHandler:view:
 
(void) - stickProfileGraphAxisProfile:screenAt:screenSize:
 

Detailed Description

Definition at line 33 of file PlayerEntityStickProfile.h.

Method Documentation

◆ setGuiToStickProfileScreen:

- (void) setGuiToStickProfileScreen: (GuiDisplayGen *) gui

Extends class PlayerEntity.

Definition at line 43 of file PlayerEntityStickProfile.m.

69 : (GuiDisplayGen *) gui
70{
71 gui_screen = GUI_SCREEN_STICKPROFILE;
72 [stickProfileScreen startGui: gui];
73 return;
74}

◆ stickProfileGraphAxisProfile:screenAt:screenSize:

- (void) stickProfileGraphAxisProfile: (GLfloat) alpha
screenAt: (Vector) screenAt
screenSize: (NSSize) screenSize 

Extends class PlayerEntity.

Definition at line 43 of file PlayerEntityStickProfile.m.

225 : (GLfloat) alpha screenAt: (Vector) screenAt screenSize: (NSSize) screenSize
226{
227
228 [stickProfileScreen graphProfile: alpha at: make_vector(screenAt.x - 110.0, screenAt.y - 100, screenAt.z) size: NSMakeSize(220,220)];
229 return;
230}

◆ stickProfileInputHandler:view:

- (void) stickProfileInputHandler: (GuiDisplayGen *) gui
view: (MyOpenGLView *) gameView 

Extends class PlayerEntity.

Definition at line 43 of file PlayerEntityStickProfile.m.

76 : (GuiDisplayGen *) gui
77 view: (MyOpenGLView *) gameView
78{
79 if ([gameView isDown: gvMouseLeftButton])
80 {
81 NSPoint mouse_position = NSMakePoint(
82 [gameView virtualJoystickPosition].x * [gui size].width,
83 [gameView virtualJoystickPosition].y * [gui size].height );
84 [stickProfileScreen mouseDown: mouse_position];
85 }
86 else
87 {
88 [stickProfileScreen mouseUp];
89 }
90 if ([gameView isDown: gvDeleteKey])
91 {
92 [stickProfileScreen deleteSelected];
93 }
94 [self handleGUIUpDownArrowKeys];
95
96 if ([self checkKeyPress:n_key_gui_select] && [gui selectedRow] == GUI_ROW_STICKPROFILE_BACK)
97 {
98 [stickProfileScreen saveSettings];
99 [self setGuiToStickMapperScreen: 0 resetCurrentRow: YES];
100 }
101 switch ([gui selectedRow])
102 {
104 if ([self checkKeyPress:n_key_gui_arrow_left])
105 {
106 if (!stickProfileArrow_pressed && ![self checkKeyPress:n_key_gui_arrow_right])
107 {
108 [stickProfileScreen previousAxis];
110 }
111 }
112 else if ([self checkKeyPress: n_key_gui_arrow_right])
113 {
114 if (!stickProfileArrow_pressed && ![self checkKeyPress: n_key_gui_arrow_left])
115 {
116 [stickProfileScreen nextAxis];
118 }
119 }
120 else
121 {
123 }
124 break;
125
127 if ([self checkKeyPress:n_key_gui_arrow_left])
128 {
129 if (!stickProfileArrow_pressed && ![self checkKeyPress: n_key_gui_arrow_right])
130 {
131 [stickProfileScreen decreaseDeadzone];
133 }
134 }
135 else if ([self checkKeyPress: n_key_gui_arrow_right])
136 {
137 if (!stickProfileArrow_pressed && ![self checkKeyPress: n_key_gui_arrow_left])
138 {
139 [stickProfileScreen increaseDeadzone];
141 }
142 }
143 else
144 {
146 }
147 break;
148
150 if ([self checkKeyPress:n_key_gui_arrow_left])
151 {
152 if (!stickProfileArrow_pressed && ![self checkKeyPress: n_key_gui_arrow_right])
153 {
154 [stickProfileScreen previousProfileType];
156 }
157 }
158 else if ([self checkKeyPress: n_key_gui_arrow_right])
159 {
160 if (!stickProfileArrow_pressed && ![self checkKeyPress: n_key_gui_arrow_left])
161 {
162 [stickProfileScreen nextProfileType];
164 }
165 }
166 else
167 {
169 }
170 break;
171 }
172
173 if (![stickProfileScreen currentProfileIsSpline])
174 {
175 if ([gui selectedRow] == GUI_ROW_STICKPROFILE_POWER)
176 {
177 if ([self checkKeyPress:n_key_gui_arrow_left])
178 {
179 if (!stickProfileArrow_pressed && ![self checkKeyPress: n_key_gui_arrow_right])
180 {
181 [stickProfileScreen DecreasePower];
183 }
184 }
185 else if ([self checkKeyPress: n_key_gui_arrow_right])
186 {
187 if (!stickProfileArrow_pressed && ![self checkKeyPress: n_key_gui_arrow_left])
188 {
189 [stickProfileScreen IncreasePower];
191 }
192 }
193 else
194 {
196 }
197 }
198 else if ([gui selectedRow] == GUI_ROW_STICKPROFILE_PARAM)
199 {
200 if ([self checkKeyPress:n_key_gui_arrow_left])
201 {
202 if (!stickProfileArrow_pressed && ![self checkKeyPress: n_key_gui_arrow_right])
203 {
204 [stickProfileScreen DecreaseParam];
206 }
207 }
208 else if ([self checkKeyPress: n_key_gui_arrow_right])
209 {
210 if (!stickProfileArrow_pressed && ![self checkKeyPress: n_key_gui_arrow_left])
211 {
212 [stickProfileScreen IncreaseParam];
214 }
215 }
216 else
217 {
219 }
220 }
221 }
222 return;
223}
@ gvMouseLeftButton
@ gvDeleteKey
float y
float x
#define GUI_ROW_STICKPROFILE_PARAM
static BOOL stickProfileArrow_pressed
#define GUI_ROW_STICKPROFILE_AXIS
#define GUI_ROW_STICKPROFILE_BACK
#define GUI_ROW_STICKPROFILE_DEADZONE
#define GUI_ROW_STICKPROFILE_PROFILE_TYPE
#define GUI_ROW_STICKPROFILE_POWER
voidpf void uLong size
Definition ioapi.h:134

The documentation for this category was generated from the following files: