Skip to content

Commit

Permalink
Added docking clearance joystick button control to stickmapper.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnotherCommander committed Jan 1, 2019
1 parent 036c0ee commit 32c8b48
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions Resources/Config/descriptions.plist
Original file line number Diff line number Diff line change
Expand Up @@ -1659,6 +1659,7 @@
"stickmapper-dockcpu" = "Autopilot (standard)";
"stickmapper-dockcpufast" = "Autopilot (fast)";
"stickmapper-compass-mode-next" = "Next compass target";
"stickmapper-docking-clearance" = "Docking clearance";

"oolite-stickprofile-title" = "Joystick Profile";
"oolite-stickprofile-back" = "Back";
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Entities/PlayerEntityControls.m
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,7 @@ - (void) pollFlightControls:(double)delta_t

exceptionContext = @"docking clearance request";

if ([gameView isDown:key_docking_clearance_request])
if ([gameView isDown:key_docking_clearance_request] || joyButtonState[BUTTON_DOCKINGCLEARANCE])
{
if (!docking_clearance_request_key_pressed)
{
Expand Down
5 changes: 5 additions & 0 deletions src/Core/Entities/PlayerEntityStickMapper.m
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,11 @@ - (NSArray *)stickFunctionList
allowable:HW_BUTTON
axisfn:STICK_NOFUNCTION
butfn:BUTTON_COMPASSMODE]];
[funcList addObject:
[self makeStickGuiDict:DESC(@"stickmapper-docking-clearance")
allowable:HW_BUTTON
axisfn:STICK_NOFUNCTION
butfn:BUTTON_DOCKINGCLEARANCE]];
return funcList;
}

Expand Down
1 change: 1 addition & 0 deletions src/Core/OOJoystickManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ enum {
BUTTON_INC_FIELD_OF_VIEW,
BUTTON_DEC_FIELD_OF_VIEW,
#endif
BUTTON_DOCKINGCLEARANCE,
BUTTON_end
};

Expand Down

0 comments on commit 32c8b48

Please sign in to comment.