changes avoiding enter key repeat problems in mission choices
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@590 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
8f35abf10b
commit
aded61b305
@ -386,6 +386,7 @@
|
||||
"missionChoice_string equal YES"
|
||||
);
|
||||
do = (
|
||||
resetMissionChoice,
|
||||
setGuiToStatusScreen,
|
||||
"setMissionImage: none",
|
||||
"set: mission_trumbles TRUMBLE_BOUGHT",
|
||||
@ -400,17 +401,17 @@
|
||||
"missionChoice_string equal NO"
|
||||
);
|
||||
do = (
|
||||
resetMissionChoice,
|
||||
setGuiToStatusScreen,
|
||||
"setMissionImage: none",
|
||||
"set: mission_trumbles NOT_NOW",
|
||||
resetMissionChoice
|
||||
"set: mission_trumbles NOT_NOW"
|
||||
);
|
||||
},
|
||||
{
|
||||
conditions = (
|
||||
"status_string equal STATUS_EXITING_WITCHSPACE",
|
||||
"mission_trumbles equal NOT_NOW",
|
||||
"d100_number lessthan 5"
|
||||
"d100_number lessthan 2"
|
||||
);
|
||||
do = ("set: mission_trumbles BUY_ME", resetMissionChoice);
|
||||
}
|
||||
|
@ -1367,6 +1367,7 @@ static int searchStringLength;
|
||||
static double timeLastKeyPress;
|
||||
static BOOL upDownKeyPressed;
|
||||
static BOOL leftRightKeyPressed;
|
||||
static BOOL enterSelectKeyPressed;
|
||||
static BOOL volumeControlPressed;
|
||||
static int oldSelection;
|
||||
static BOOL selectPressed;
|
||||
@ -2660,22 +2661,25 @@ static BOOL toggling_music;
|
||||
upDownKeyPressed = (([gameView isDown:gvArrowKeyUp])||([gameView isDown:gvArrowKeyDown]));
|
||||
//
|
||||
if ([gameView isDown:13]) // '<enter/return>'
|
||||
{
|
||||
if (!enterSelectKeyPressed)
|
||||
{
|
||||
if (missionChoice)
|
||||
[missionChoice release];
|
||||
missionChoice = [[NSString stringWithString:[gui selectedRowKey]] retain];
|
||||
//
|
||||
[self setStatus:STATUS_DOCKED];
|
||||
[universe removeDemoShips];
|
||||
[gui setBackgroundImage:nil];
|
||||
[self setGuiToStatusScreen];
|
||||
if (missionMusic)
|
||||
{
|
||||
[missionMusic stop];
|
||||
}
|
||||
//
|
||||
[self checkScript];
|
||||
}
|
||||
enterSelectKeyPressed = YES;
|
||||
}
|
||||
else
|
||||
enterSelectKeyPressed = NO;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1926,14 +1926,11 @@ static int shipsFound;
|
||||
#else
|
||||
if ((missionMusic)&&(!ootunes_on))
|
||||
{
|
||||
// GoToBeginningOfMovie ([missionMusic QTMovie]);
|
||||
// StartMovie ([missionMusic QTMovie]);
|
||||
[missionMusic play];
|
||||
}
|
||||
#endif
|
||||
|
||||
// the following are necessary...
|
||||
// status = STATUS_COCKPIT_DISPLAY;
|
||||
[universe setDisplayText:YES];
|
||||
[universe setViewDirection:VIEW_GUI_DISPLAY];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user