mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Button-Sound -> haptic feedback
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
#include "../CPlayerInterface.h"
|
#include "../CPlayerInterface.h"
|
||||||
#include "../battle/BattleInterface.h"
|
#include "../battle/BattleInterface.h"
|
||||||
#include "../battle/BattleInterfaceClasses.h"
|
#include "../battle/BattleInterfaceClasses.h"
|
||||||
|
#include "../eventsSDL/InputHandler.h"
|
||||||
#include "../gui/CGuiHandler.h"
|
#include "../gui/CGuiHandler.h"
|
||||||
#include "../gui/MouseButton.h"
|
#include "../gui/MouseButton.h"
|
||||||
#include "../gui/Shortcut.h"
|
#include "../gui/Shortcut.h"
|
||||||
@@ -175,7 +176,10 @@ void CButton::clickPressed(const Point & cursorPosition)
|
|||||||
if (getState() != PRESSED)
|
if (getState() != PRESSED)
|
||||||
{
|
{
|
||||||
if (!soundDisabled)
|
if (!soundDisabled)
|
||||||
|
{
|
||||||
CCS->soundh->playSound(soundBase::button);
|
CCS->soundh->playSound(soundBase::button);
|
||||||
|
GH.input().hapticFeedback();
|
||||||
|
}
|
||||||
setState(PRESSED);
|
setState(PRESSED);
|
||||||
|
|
||||||
if (actOnDown)
|
if (actOnDown)
|
||||||
@@ -403,6 +407,7 @@ void CToggleButton::clickPressed(const Point & cursorPosition)
|
|||||||
if (canActivate())
|
if (canActivate())
|
||||||
{
|
{
|
||||||
CCS->soundh->playSound(soundBase::button);
|
CCS->soundh->playSound(soundBase::button);
|
||||||
|
GH.input().hapticFeedback();
|
||||||
setState(PRESSED);
|
setState(PRESSED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user