From 3b86c7fac45d952e3537705bd89ccaa0b326ee9d Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Mon, 11 Apr 2022 01:50:15 +0200 Subject: [PATCH] [touch] Spend stat points when clicking the buttons Fixes #4387 --- Source/controls/touch/event_handlers.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Source/controls/touch/event_handlers.cpp b/Source/controls/touch/event_handlers.cpp index dea72214d..b1b0ae0cc 100644 --- a/Source/controls/touch/event_handlers.cpp +++ b/Source/controls/touch/event_handlers.cpp @@ -95,6 +95,17 @@ void HandleBottomPanelInteraction(const SDL_Event &event) } } +void HandleCharacterPanelInteraction(const SDL_Event &event) +{ + if (!chrflag) + return; + + if (event.type == SDL_FINGERDOWN) + CheckChrBtns(); + else if (event.type == SDL_FINGERUP && chrbtnactive) + ReleaseChrBtns(false); +} + void HandleStashPanelInteraction(const SDL_Event &event) { if (pcurs >= CURSOR_FIRSTITEM) @@ -133,6 +144,7 @@ void HandleTouchEvent(const SDL_Event &event) return; HandleBottomPanelInteraction(event); + HandleCharacterPanelInteraction(event); HandleStashPanelInteraction(event); }