mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Play the sound only on mouse up when looking for help
This commit is contained in:
parent
4877928e62
commit
f11514e5e5
@ -2965,7 +2965,6 @@ bool
|
|||||||
CEvent::EventButtons (const SDL_Event & event, Point pos)
|
CEvent::EventButtons (const SDL_Event & event, Point pos)
|
||||||
{
|
{
|
||||||
Sint32 lg;
|
Sint32 lg;
|
||||||
Sounds sound;
|
|
||||||
|
|
||||||
// Cherche le tool tips à utiliser pour la souris.
|
// Cherche le tool tips à utiliser pour la souris.
|
||||||
m_textToolTips[0] = 0;
|
m_textToolTips[0] = 0;
|
||||||
@ -3033,22 +3032,14 @@ CEvent::EventButtons (const SDL_Event & event, Point pos)
|
|||||||
{
|
{
|
||||||
m_bHiliInfoButton = true;
|
m_bHiliInfoButton = true;
|
||||||
|
|
||||||
if (
|
|
||||||
event.type == SDL_MOUSEBUTTONDOWN &&
|
|
||||||
(event.button.button == SDL_BUTTON_LEFT ||
|
|
||||||
event.button.button == SDL_BUTTON_RIGHT))
|
|
||||||
{
|
|
||||||
if (m_pDecor->GetInfoMode ())
|
|
||||||
sound = SOUND_CLOSE;
|
|
||||||
else
|
|
||||||
sound = SOUND_OPEN;
|
|
||||||
m_pSound->PlayImage (sound, pos);
|
|
||||||
}
|
|
||||||
if (
|
if (
|
||||||
event.type == SDL_MOUSEBUTTONUP &&
|
event.type == SDL_MOUSEBUTTONUP &&
|
||||||
(event.button.button == SDL_BUTTON_LEFT ||
|
(event.button.button == SDL_BUTTON_LEFT ||
|
||||||
event.button.button == SDL_BUTTON_RIGHT))
|
event.button.button == SDL_BUTTON_RIGHT))
|
||||||
{
|
{
|
||||||
|
m_pSound->PlayImage (
|
||||||
|
m_pDecor->GetInfoMode () ? SOUND_CLOSE : SOUND_OPEN, pos);
|
||||||
|
|
||||||
// Show or hide the informations at the top.
|
// Show or hide the informations at the top.
|
||||||
m_pDecor->SetInfoMode (!m_pDecor->GetInfoMode ());
|
m_pDecor->SetInfoMode (!m_pDecor->GetInfoMode ());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user