mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
add haptics to spellbook
This commit is contained in:
@@ -34,6 +34,7 @@
|
|||||||
#include "../widgets/Buttons.h"
|
#include "../widgets/Buttons.h"
|
||||||
#include "../widgets/VideoWidget.h"
|
#include "../widgets/VideoWidget.h"
|
||||||
#include "../adventureMap/AdventureMapInterface.h"
|
#include "../adventureMap/AdventureMapInterface.h"
|
||||||
|
#include "../eventsSDL/InputHandler.h"
|
||||||
|
|
||||||
#include "../../lib/CConfigHandler.h"
|
#include "../../lib/CConfigHandler.h"
|
||||||
#include "../../lib/GameConstants.h"
|
#include "../../lib/GameConstants.h"
|
||||||
@@ -99,6 +100,7 @@ CSpellWindow::InteractiveArea::InteractiveArea(const Rect & myRect, const std::f
|
|||||||
|
|
||||||
void CSpellWindow::InteractiveArea::clickPressed(const Point & cursorPosition)
|
void CSpellWindow::InteractiveArea::clickPressed(const Point & cursorPosition)
|
||||||
{
|
{
|
||||||
|
ENGINE->input().hapticFeedback();
|
||||||
onLeft();
|
onLeft();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -687,6 +689,8 @@ void CSpellWindow::SpellArea::clickPressed(const Point & cursorPosition)
|
|||||||
{
|
{
|
||||||
if(mySpell)
|
if(mySpell)
|
||||||
{
|
{
|
||||||
|
ENGINE->input().hapticFeedback();
|
||||||
|
|
||||||
if(owner->onSpellSelect)
|
if(owner->onSpellSelect)
|
||||||
{
|
{
|
||||||
owner->onSpellSelect(mySpell->id);
|
owner->onSpellSelect(mySpell->id);
|
||||||
|
|||||||
Reference in New Issue
Block a user