Ignore:
Timestamp:
Nov 16, 2014, 5:12:25 PM (10 years ago)
Author:
chronos
Message:
  • Added: Computer player settings to be low, medium or highly aggresive in attacking.
  • Fixed: Mouse move insensitivity zone is now DPI aware.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r87 r90  
    1111const
    1212  ZoomFactor = 1.5;
    13   MouseMinDiff = 6;
     13  MouseMinDiff = 0.1;
    1414
    1515type
     
    359359  if Assigned(Core.Game.CurrentPlayer) then begin
    360360    if MoveActive then
    361     if (Abs(StartMousePoint.X - X) > MouseMinDiff) or (Abs(StartMousePoint.Y - Y) > MouseMinDiff) then
     361    if (Abs(StartMousePoint.X - X) > Trunc(Screen.PixelsPerInch * MouseMinDiff)) or
     362    (Abs(StartMousePoint.Y - Y) > Trunc(Screen.PixelsPerInch * MouseMinDiff)) then
    362363    with Core.Game.CurrentPlayer do begin
    363364      if Mode = pmHuman then begin
     
    390391  Shift: TShiftState; X, Y: Integer);
    391392begin
    392   if (Abs(StartMousePoint.X - X) < MouseMinDiff) and (Abs(StartMousePoint.Y - Y) < MouseMinDiff) then begin
     393  if (Abs(StartMousePoint.X - X) < Trunc(Screen.PixelsPerInch * MouseMinDiff)) and
     394  (Abs(StartMousePoint.Y - Y) < Trunc(Screen.PixelsPerInch * MouseMinDiff)) then begin
    393395    if Core.Game.Running and (Core.Game.CurrentPlayer.Mode = pmHuman) then begin
    394396      Core.Game.CurrentPlayer.View.SelectCell(Point(X, Y), Core.Game.CurrentPlayer, Shift);
Note: See TracChangeset for help on using the changeset viewer.