Changeset 335


Ignore:
Timestamp:
Mar 31, 2021, 9:36:34 PM (7 months ago)
Author:
chronos
Message:
  • Fixed: Do not process panel wheel event outside of panel in main form.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Term.pas

    r334 r335  
    35623562  MouseLoc: Integer;
    35633563begin
    3564   if sb.ProcessMouseWheel(WheelDelta) then begin
    3565     PanelPaint;
    3566     Update;
     3564  if (MousePos.Y > ClientHeight - MidPanelHeight) and
     3565    (MousePos.Y < ClientHeight) then begin
     3566    if sb.ProcessMouseWheel(WheelDelta) then begin
     3567      PanelPaint;
     3568      Update;
     3569    end;
    35673570  end else begin
    35683571    if (WheelDelta > 0) and (MainMap.TileSize < High(TTileSize)) then begin
     
    48834886      LoweredTextOut(TopBar.Canvas, -1, MainTexture, xResearchSection + 48 +
    48844887        CostFactor + 26, 18, s);
    4885     end
     4888    end;
    48864889  end;
    48874890  if ClientMode <> cEditMap then
     
    52345237      RectInvalidate(xMini + 2, TopBarHeight + MapHeight - overlap + yMini + 2,
    52355238        xMini + 2 + G.lx * 2, TopBarHeight + MapHeight - overlap + yMini
    5236         + 2 + G.ly)
     5239        + 2 + G.ly);
    52375240    end
    52385241    else if MyMap[MouseLoc] and fCity <> 0 then { city clicked }
     
    52475250        UnitStatDlg.ShowNewContent_EnemyCity(wmPersistent, MouseLoc);
    52485251        DoCenter := false;
    5249       end
     5252      end;
    52505253    end
    52515254    else if MyMap[MouseLoc] and fUnit <> 0 then { unit clicked }
     
    52695272            end;
    52705273            if i = 0 then
    5271               uix := UnFocus
     5274              uix := UnFocus;
    52725275          end
    52735276          else
     
    52955298    begin
    52965299      Centre(MouseLoc);
    5297       PaintAllMaps
    5298     end
     5300      PaintAllMaps;
     5301    end;
    52995302  end
    53005303  else if (ClientMode <> cEditMap) and (Button = mbRight) and
     
    53465349          Status := Status and ($FFFF - usStay - usRecover - usGoto - usEnhance)
    53475350            or usWaiting;
    5348           MoveUnit(dx, dy, muAutoNext) { simple move }
     5351          MoveUnit(dx, dy, muAutoNext); { simple move }
    53495352        end
    53505353        else if GetMoveAdvice(UnFocus, MouseLoc, MoveAdviceData) >= rExecuted
     
    53715374              if BattleDlg.ModalResult <> mrOK then
    53725375                exit;
    5373             end
     5376            end;
    53745377          end;
    53755378          DestinationMarkON := false;
     
    53785381            usWaiting;
    53795382          MoveToLoc(MouseLoc, false); { goto }
    5380         end
    5381       end
     5383        end;
     5384      end;
    53825385  end
    53835386  else if (Button = mbMiddle) and (UnFocus >= 0) and
     
    53925395      MoveToLoc(MouseLoc, true); { goto }
    53935396    if (UnFocus = uix) and (MyUn[uix].Loc = MouseLoc) then
    5394       MenuClick(mEnhance)
     5397      MenuClick(mEnhance);
    53955398  end
    53965399  else if (Button = mbLeft) and (ssShift in Shift) and
     
    54275430      BattleDlg.IsSuicideQuery := false;
    54285431      BattleDlg.Show;
    5429     end
    5430   end
     5432    end;
     5433  end;
    54315434end;
    54325435
Note: See TracChangeset for help on using the changeset viewer.