Oolite
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 69 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 180 of file PlayerEntityStickProfile.m.

180 :(GLfloat)alpha screenAt:(Vector)screenAt screenSize:(NSSize)screenSize
181{
182
183 [stickProfileScreen graphProfile:alpha at:make_vector(screenAt.x - 110.0, screenAt.y - 100, screenAt.z) size:NSMakeSize(220, 220)];
184 return;
185}
struct Vector Vector

◆ stickProfileInputHandler:view:

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

Extends class PlayerEntity.

Definition at line 76 of file PlayerEntityStickProfile.m.

76 :(GuiDisplayGen*)gui
77 view:(MyOpenGLView*)gameView
78{
79 if ([gameView isDown:gvMouseLeftButton]) {
80 NSPoint mouse_position = NSMakePoint(
81 [gameView virtualJoystickPosition].x * [gui size].width,
82 [gameView virtualJoystickPosition].y * [gui size].height);
83 [stickProfileScreen mouseDown:mouse_position];
84 } else {
85 [stickProfileScreen mouseUp];
86 }
87 if ([gameView isDown:gvDeleteKey]) {
88 [stickProfileScreen deleteSelected];
89 }
90 [self handleGUIUpDownArrowKeys];
91
92 if ([self checkKeyPress:n_key_gui_select] && [gui selectedRow] == GUI_ROW_STICKPROFILE_BACK) {
93 [stickProfileScreen saveSettings];
94 [self setGuiToStickMapperScreen:0 resetCurrentRow:YES];
95 }
96 switch ([gui selectedRow]) {
98 if ([self checkKeyPress:n_key_gui_arrow_left]) {
99 if (!stickProfileArrow_pressed && ![self checkKeyPress:n_key_gui_arrow_right]) {
100 [stickProfileScreen previousAxis];
102 }
103 } else if ([self checkKeyPress:n_key_gui_arrow_right]) {
104 if (!stickProfileArrow_pressed && ![self checkKeyPress:n_key_gui_arrow_left]) {
105 [stickProfileScreen nextAxis];
107 }
108 } else {
110 }
111 break;
112
114 if ([self checkKeyPress:n_key_gui_arrow_left]) {
115 if (!stickProfileArrow_pressed && ![self checkKeyPress:n_key_gui_arrow_right]) {
116 [stickProfileScreen decreaseDeadzone];
118 }
119 } else if ([self checkKeyPress:n_key_gui_arrow_right]) {
120 if (!stickProfileArrow_pressed && ![self checkKeyPress:n_key_gui_arrow_left]) {
121 [stickProfileScreen increaseDeadzone];
123 }
124 } else {
126 }
127 break;
128
130 if ([self checkKeyPress:n_key_gui_arrow_left]) {
131 if (!stickProfileArrow_pressed && ![self checkKeyPress:n_key_gui_arrow_right]) {
132 [stickProfileScreen previousProfileType];
134 }
135 } else if ([self checkKeyPress:n_key_gui_arrow_right]) {
136 if (!stickProfileArrow_pressed && ![self checkKeyPress:n_key_gui_arrow_left]) {
137 [stickProfileScreen nextProfileType];
139 }
140 } else {
142 }
143 break;
144 }
145
146 if (![stickProfileScreen currentProfileIsSpline]) {
147 if ([gui selectedRow] == GUI_ROW_STICKPROFILE_POWER) {
148 if ([self checkKeyPress:n_key_gui_arrow_left]) {
149 if (!stickProfileArrow_pressed && ![self checkKeyPress:n_key_gui_arrow_right]) {
150 [stickProfileScreen DecreasePower];
152 }
153 } else if ([self checkKeyPress:n_key_gui_arrow_right]) {
154 if (!stickProfileArrow_pressed && ![self checkKeyPress:n_key_gui_arrow_left]) {
155 [stickProfileScreen IncreasePower];
157 }
158 } else {
160 }
161 } else if ([gui selectedRow] == GUI_ROW_STICKPROFILE_PARAM) {
162 if ([self checkKeyPress:n_key_gui_arrow_left]) {
163 if (!stickProfileArrow_pressed && ![self checkKeyPress:n_key_gui_arrow_right]) {
164 [stickProfileScreen DecreaseParam];
166 }
167 } else if ([self checkKeyPress:n_key_gui_arrow_right]) {
168 if (!stickProfileArrow_pressed && ![self checkKeyPress:n_key_gui_arrow_left]) {
169 [stickProfileScreen IncreaseParam];
171 }
172 } else {
174 }
175 }
176 }
177 return;
178}
@ 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:126

References GUI_ROW_STICKPROFILE_AXIS, GUI_ROW_STICKPROFILE_BACK, GUI_ROW_STICKPROFILE_DEADZONE, GUI_ROW_STICKPROFILE_PARAM, GUI_ROW_STICKPROFILE_POWER, GUI_ROW_STICKPROFILE_PROFILE_TYPE, gvDeleteKey, gvMouseLeftButton, PlayerEntity::handleGUIUpDownArrowKeys, PlayerEntity::setGuiToStickMapperScreen:resetCurrentRow:, stickProfileArrow_pressed, x, and y.

Here is the call graph for this function:

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