Changeset 642


Ignore:
Timestamp:
Nov 23, 2024, 8:50:21 PM (3 hours ago)
Author:
chronos
Message:
  • Fixed: Do not scroll map if mouse is outside of window region.
Location:
trunk
Files:
2 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
  • trunk/Packages/DpiControls/Dpi.Controls.pas

    r620 r642  
    212212    property OnMouseUp: TMouseEvent read FOnMouseUp write FOnMouseUp;
    213213    property OnMouseWheel: TMouseWheelEvent read FOnMouseWheel write FOnMouseWheel;
     214    property OnMouseEnter: TNotifyEvent read FOnMouseEnter write FOnMouseEnter;
     215    property OnMouseLeave: TNotifyEvent read FOnMouseLeave write FOnMouseLeave;
    214216  end;
    215217
Note: See TracChangeset for help on using the changeset viewer.