Ignore:
Timestamp:
Nov 23, 2024, 8:50:21 PM (5 hours ago)
Author:
chronos
Message:
  • Fixed: Do not scroll map if mouse is outside of window region.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Term.pas

    r624 r642  
    55835583        MousePos := ScreenToClient(Mouse.CursorPos);
    55845584        if MousePos.Y < Height - PanelHeight then
    5585           if MousePos.X <= ScrollWidth then
     5585          if (MousePos.X >= 0) and (MousePos.X <= ScrollWidth) then
    55865586            dx := -ScrollSpeed // scroll left
    5587           else if MousePos.X >= Width - ScrollWidth - 1 then
     5587          else if (MousePos.X <= Width) and (MousePos.X >= Width - ScrollWidth - 1) then
    55885588            dx := ScrollSpeed; // scroll right
    5589         if MousePos.Y <= ScrollWidth then
     5589        if (MousePos.Y >= 0) and (MousePos.Y <= ScrollWidth) then
    55905590          dy := -ScrollSpeed // scroll up
    5591         else if (MousePos.Y >= Height - ScrollWidth - 1) and
     5591        else if (MousePos.Y <= Height) and (MousePos.Y >= Height - ScrollWidth - 1) and
    55925592          (MousePos.X >= TerrainBtn.Left + TerrainBtn.Width) and
    55935593          (MousePos.X < xRightPanel + 10 - 8) then
Note: See TracChangeset for help on using the changeset viewer.