mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Restore 'click' sound when pressing a button.
This commit is contained in:
parent
bd9eb37465
commit
6c008d5fea
@ -126,9 +126,10 @@ void AdventureMapButton::clickLeft(tribool down, bool previousState)
|
||||
{
|
||||
if(blocked)
|
||||
return;
|
||||
if (down)
|
||||
if (down) {
|
||||
CGI->soundh->playSound(soundBase::button);
|
||||
state=1;
|
||||
else
|
||||
} else
|
||||
state=0;
|
||||
show(screenBuf);
|
||||
if (actOnDown && down)
|
||||
@ -304,9 +305,10 @@ void CHighlightableButton::clickLeft(tribool down, bool previousState)
|
||||
{
|
||||
if(blocked)
|
||||
return;
|
||||
if (down)
|
||||
if (down) {
|
||||
CGI->soundh->playSound(soundBase::button);
|
||||
state = 1;
|
||||
else
|
||||
} else
|
||||
state = selected ? 3 : 0;
|
||||
show(screenBuf);
|
||||
if(previousState && down == false)
|
||||
|
@ -608,7 +608,6 @@ void SelectionTab::select( int position )
|
||||
amax(py, 0);
|
||||
amin(py, curItems.size()-1);
|
||||
|
||||
CGI->soundh->playSound(soundBase::button);
|
||||
selectionPos = py;
|
||||
|
||||
if(position < 0)
|
||||
@ -787,7 +786,7 @@ void SelectionTab::onDoubleClick()
|
||||
{
|
||||
if(getLine() != -1) //double clicked scenarios list
|
||||
{
|
||||
//act as start button was pressed
|
||||
//act as if start button was pressed
|
||||
(static_cast<CSelectionScreen*>(parent))->start->callback();
|
||||
}
|
||||
}
|
||||
@ -933,7 +932,7 @@ void InfoCard::showAll( SDL_Surface * to )
|
||||
blitAtLoc(sizes->ourImages[temp].bitmap, 318, 22, to);
|
||||
temp = curMap->victoryCondition.condition;
|
||||
if (temp>12) temp=11;
|
||||
blitAtLoc(CGP->victory->ourImages[temp].bitmap, 24, 302, to); //vicotry cond descr
|
||||
blitAtLoc(CGP->victory->ourImages[temp].bitmap, 24, 302, to); //victory cond descr
|
||||
temp=curMap->lossCondition.typeOfLossCon;
|
||||
if (temp>12) temp=3;
|
||||
blitAtLoc(CGP->loss->ourImages[temp].bitmap, 24, 359, to); //loss cond
|
||||
|
Loading…
Reference in New Issue
Block a user