1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

implement overlay for touch screens

This commit is contained in:
Laserlicht
2025-02-09 13:10:27 +01:00
parent d8ee343800
commit 1f61f22122
6 changed files with 27 additions and 4 deletions

View File

@ -389,6 +389,13 @@ bool InputHandler::hasTouchInputDevice() const
return fingerHandler->hasTouchInputDevice();
}
int InputHandler::getNumTouchFingers() const
{
if(currentInputMode != InputMode::TOUCH)
return 0;
return fingerHandler->getNumTouchFingers();
}
void InputHandler::dispatchMainThread(const std::function<void()> & functor)
{
auto heapFunctor = new std::function<void()>(functor);