Skip to content

Commit

Permalink
Reverted hardcoded ratios.
Browse files Browse the repository at this point in the history
This reverts commit e23b5a6.
  • Loading branch information
dood-apo committed Jan 25, 2024
1 parent e23b5a6 commit 27de726
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/fheroes2/game/game_startgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ fheroes2::GameMode Interface::AdventureMap::HumanTurn( const bool isload )
}

// Re-enable fast scroll once the cursor leaves the vulnerable parts of the border area.
if ( !isFastScrollVulnerableArea( le.GetMouseCursor() ) ) {
if ( !isScrollRight( le.GetMouseCursor() ) && !isScrollBottom( le.GetMouseCursor() ) ) {
_gameArea.setFastScrollStatus( true );
}

Expand Down
10 changes: 1 addition & 9 deletions src/fheroes2/gui/interface_base.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* fheroes2: https://github.com/ihhub/fheroes2 *
* Copyright (C) 2023 - 2024 *
* Copyright (C) 2023 *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
Expand Down Expand Up @@ -110,14 +110,6 @@ namespace Interface
return cursorPos.y >= display.height() - BORDERWIDTH;
}

static bool isFastScrollVulnerableArea( const fheroes2::Point & cursorPos )
{
const fheroes2::Display & display = fheroes2::Display::instance();

return ( cursorPos.y >= 0.6 * display.height() && cursorPos.x >= display.width() - BORDERWIDTH )
|| ( cursorPos.x >= 0.8 * display.width() && cursorPos.y >= display.height() - BORDERWIDTH );
}

GameArea & getGameArea()
{
return _gameArea;
Expand Down

0 comments on commit 27de726

Please sign in to comment.