1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-10-31 00:07:39 +02:00

Fixed border scrolling when game window is maximized

This commit is contained in:
Ivan Savenko
2023-08-17 12:25:02 +03:00
parent 8b8d2b8810
commit ec0a51bd5c
2 changed files with 4 additions and 3 deletions

View File

@@ -10,6 +10,7 @@
* Background battlefield obstacles will now appear below creatures
* it is now possible to load save game located inside mod
* Added option to configure reserved screen area in Launcher on iOS
* Fixed border scrolling when game window is maximized
### AI PLAYER:
* BattleAI: Improved performance of AI spell selection

View File

@@ -169,10 +169,10 @@ void AdventureMapInterface::tick(uint32_t msPassed)
void AdventureMapInterface::handleMapScrollingUpdate(uint32_t timePassed)
{
/// Width of window border, in pixels, that triggers map scrolling
static constexpr uint32_t borderScrollWidth = 15;
static constexpr int32_t borderScrollWidth = 15;
uint32_t scrollSpeedPixels = settings["adventure"]["scrollSpeedPixels"].Float();
uint32_t scrollDistance = scrollSpeedPixels * timePassed / 1000;
int32_t scrollSpeedPixels = settings["adventure"]["scrollSpeedPixels"].Float();
int32_t scrollDistance = scrollSpeedPixels * timePassed / 1000;
Point cursorPosition = GH.getCursorPosition();
Point scrollDirection;