1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-21 21:17:49 +02:00

Fix cursor pivot/tip offset for xbrz mode

This commit is contained in:
Ivan Savenko 2024-09-12 21:22:29 +00:00
parent 66a2c8dc37
commit 612490712e

View File

@ -17,6 +17,7 @@
#include "../renderSDL/CursorHardware.h"
#include "../render/CAnimation.h"
#include "../render/IImage.h"
#include "../render/IScreenHandler.h"
#include "../render/IRenderHandler.h"
#include "../../lib/CConfigHandler.h"
@ -175,7 +176,7 @@ Point CursorHandler::getPivotOffsetMap(size_t index)
assert(offsets.size() == size_t(Cursor::Map::COUNT)); //Invalid number of pivot offsets for cursor
assert(index < offsets.size());
return offsets[index];
return offsets[index] * GH.screenHandler().getScalingFactor();
}
Point CursorHandler::getPivotOffsetCombat(size_t index)
@ -205,12 +206,12 @@ Point CursorHandler::getPivotOffsetCombat(size_t index)
assert(offsets.size() == size_t(Cursor::Combat::COUNT)); //Invalid number of pivot offsets for cursor
assert(index < offsets.size());
return offsets[index];
return offsets[index] * GH.screenHandler().getScalingFactor();
}
Point CursorHandler::getPivotOffsetSpellcast()
{
return { 18, 28};
return Point(18, 28) * GH.screenHandler().getScalingFactor();
}
Point CursorHandler::getPivotOffset()