Weapons online/offline toggle control can now be assigned to joystick button too.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3776 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Nikos Barkas 2010-10-22 22:30:09 +00:00
parent 0fa1256a88
commit 8f6c69079f
5 changed files with 9 additions and 1 deletions

View File

@ -1046,6 +1046,7 @@
"stickmapper-disarm-secondary" = "Disarm secondary";
"stickmapper-target-nearest-incoming-missile" = "Target nearest incoming missile";
"stickmapper-cycle-secondary" = "Cycle secondary";
"stickmapper-weapons-online-toggle" = "Weapons online toggle";
"stickmapper-ECM" = "ECM";
"stickmapper-toggle-ID" = "Toggle ID";
"stickmapper-fuel-injection" = "Fuel Injection";

View File

@ -69,6 +69,7 @@ enum {
#endif
BUTTON_CYCLEMISSILE,
BUTTON_ENERGYBOMB,
BUTTON_WEAPONSONLINETOGGLE,
BUTTON_ID,
BUTTON_ECM,
BUTTON_ESCAPE,

View File

@ -759,7 +759,7 @@ static NSTimeInterval time_last_frame;
exceptionContext = @"weapons online toggle";
// weapons online / offline toggle '_'
if ([gameView isDown:key_weapons_online_toggle])
if ([gameView isDown:key_weapons_online_toggle] || joyButtonState[BUTTON_WEAPONSONLINETOGGLE])
{
if (!weaponsOnlineToggle_pressed)
{

View File

@ -447,6 +447,11 @@ MA 02110-1301, USA.
allowable: HW_BUTTON
axisfn: STICK_NOFUNCTION
butfn: BUTTON_CYCLEMISSILE]];
[funcList addObject:
[self makeStickGuiDict: DESC(@"stickmapper-weapons-online-toggle")
allowable: HW_BUTTON
axisfn: STICK_NOFUNCTION
butfn: BUTTON_WEAPONSONLINETOGGLE]];
[funcList addObject:
[self makeStickGuiDict: DESC(@"stickmapper-ECM")
allowable: HW_BUTTON

View File

@ -72,6 +72,7 @@ enum {
BUTTON_UNARM,
BUTTON_CYCLEMISSILE,
BUTTON_ENERGYBOMB,
BUTTON_WEAPONSONLINETOGGLE,
BUTTON_ID,
BUTTON_ECM,
BUTTON_ESCAPE,