projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed bug with clicked text area gadgets marking level as changed
[rocksndiamonds.git]
/
src
/
tools.c
diff --git
a/src/tools.c
b/src/tools.c
index a6a08d72aaaccce1b8dcc035c76d287af54d81d8..79c2bae71a65c82449c89f881ea05b29bcf63856 100644
(file)
--- a/
src/tools.c
+++ b/
src/tools.c
@@
-2820,9
+2820,13
@@
void ShowEnvelope(int envelope_nr)
int anim_mode = graphic_info[graphic].anim_mode;
int main_anim_mode = (anim_mode == ANIM_NONE ? ANIM_VERTICAL|ANIM_HORIZONTAL:
anim_mode == ANIM_DEFAULT ? ANIM_VERTICAL : anim_mode);
int anim_mode = graphic_info[graphic].anim_mode;
int main_anim_mode = (anim_mode == ANIM_NONE ? ANIM_VERTICAL|ANIM_HORIZONTAL:
anim_mode == ANIM_DEFAULT ? ANIM_VERTICAL : anim_mode);
+ boolean overlay_enabled = GetOverlayEnabled();
game.envelope_active = TRUE; // needed for RedrawPlayfield() events
game.envelope_active = TRUE; // needed for RedrawPlayfield() events
+ SetOverlayEnabled(FALSE);
+ UnmapAllGadgets();
+
PlayMenuSoundStereo(sound_opening, SOUND_MIDDLE);
if (anim_mode == ANIM_DEFAULT)
PlayMenuSoundStereo(sound_opening, SOUND_MIDDLE);
if (anim_mode == ANIM_DEFAULT)
@@
-2835,6
+2839,9
@@
void ShowEnvelope(int envelope_nr)
else
WaitForEventToContinue();
else
WaitForEventToContinue();
+ RemapAllGadgets();
+ SetOverlayEnabled(overlay_enabled);
+
PlayMenuSoundStereo(sound_closing, SOUND_MIDDLE);
if (anim_mode != ANIM_NONE)
PlayMenuSoundStereo(sound_closing, SOUND_MIDDLE);
if (anim_mode != ANIM_NONE)
@@
-4196,6
+4203,7
@@
void DrawPlayerField(int x, int y)
void WaitForEventToContinue(void)
{
void WaitForEventToContinue(void)
{
+ boolean first_wait = TRUE;
boolean still_wait = TRUE;
if (program.headless)
boolean still_wait = TRUE;
if (program.headless)
@@
-4218,7
+4226,16
@@
void WaitForEventToContinue(void)
{
switch (event.type)
{
{
switch (event.type)
{
- case EVENT_BUTTONRELEASE:
+ case EVENT_BUTTONPRESS:
+ case EVENT_FINGERPRESS:
+ first_wait = FALSE;
+ break;
+
+ case EVENT_BUTTONRELEASE:
+ case EVENT_FINGERRELEASE:
+ still_wait = first_wait;
+ break;
+
case EVENT_KEYPRESS:
case SDL_CONTROLLERBUTTONDOWN:
case SDL_JOYBUTTONDOWN:
case EVENT_KEYPRESS:
case SDL_CONTROLLERBUTTONDOWN:
case SDL_JOYBUTTONDOWN:
@@
-4235,7
+4252,8
@@
void WaitForEventToContinue(void)
still_wait = FALSE;
}
still_wait = FALSE;
}
- BackToFront();
+ if (!PendingEvent())
+ BackToFront();
}
}
}
}