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

CIntObject now receives mouse position as point instead of SDL event

This commit is contained in:
Ivan Savenko
2023-02-02 15:49:23 +02:00
parent 58cfddccaa
commit 214fc19e74
16 changed files with 97 additions and 55 deletions

View File

@ -98,9 +98,9 @@ void BattleFieldController::createHeroes()
owner.defendingHero = std::make_shared<BattleHero>(owner, owner.defendingHeroInstance, true);
}
void BattleFieldController::mouseMoved(const SDL_MouseMotionEvent &event)
void BattleFieldController::mouseMoved(const Point & cursorPosition)
{
if (!pos.isInside(event.x, event.y))
if (!pos.isInside(cursorPosition))
{
owner.actionsController->onHoverEnded();
return;