Ignore:
Timestamp:
Nov 30, 2023, 10:16:14 PM (12 months ago)
Author:
chronos
Message:
  • Modified: Updated high dpi branch from trunk.
  • Modified: Use generics.collections instead of fgl.
  • Modified: Compile with Delphi syntax.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/highdpi/LocalPlayer/PVSB.pas

    r349 r465  
    55
    66uses
    7   UDpiControls, {$IFDEF WINDOWS}
    8   Windows,
    9   {$ENDIF}
     7  UDpiControls, {$IFDEF WINDOWS}Windows,{$ENDIF}
    108  Classes, Controls, Forms, LCLIntf, LCLType, LMessages, Messages, SysUtils,
    119  StdCtrls, Math;
     
    3230    procedure Init(Max, PageSize: Integer);
    3331    procedure SetPos(Pos: Integer);
    34     function Process(const Msg: TMessage): boolean;
     32    function Process(const Msg: TMessage): Boolean;
    3533    function ProcessMouseWheel(Delta: Integer): Boolean;
    36     procedure Show(Visible: boolean);
     34    procedure Show(Visible: Boolean);
    3735    procedure EndSB;
    3836    procedure SetBorderSpacing(Top, Right, Bottom: Integer);
     
    6563end;
    6664
    67 function TPVScrollBar.Process(const Msg: TMessage): boolean;
     65function TPVScrollBar.Process(const Msg: TMessage): Boolean;
    6866var
    69   NewPos: integer;
     67  NewPos: Integer;
    7068begin
    7169    if Max < ScrollBar.PageSize then
    72       result := false
     70      Result := False
    7371    else
    7472    begin
    7573      if (Msg.wParam and $ffff) in [SB_THUMBPOSITION, SB_THUMBTRACK] then
    7674      begin
    77         result := ((Msg.wParam shr 16) and $ffff) <> ScrollBar.Position;
     75        Result := ((Msg.wParam shr 16) and $ffff) <> ScrollBar.Position;
    7876        ScrollBar.Position := (Msg.wParam shr 16) and $ffff;
    7977      end else begin
     
    9492        if NewPos > Max - ScrollBar.PageSize + 1 then
    9593          NewPos := Max - ScrollBar.PageSize + 1;
    96         result := NewPos <> ScrollBar.Position;
     94        Result := NewPos <> ScrollBar.Position;
    9795        if (NewPos <> ScrollBar.Position) or ((Msg.wParam and $ffff) = SB_ENDSCROLL) then
    9896        begin
     
    105103function TPVScrollBar.ProcessMouseWheel(Delta: Integer): Boolean;
    106104var
    107   NewPos: integer;
     105  NewPos: Integer;
    108106begin
    109107    if Max < ScrollBar.PageSize then Result := False
     
    120118end;
    121119
    122 procedure TPVScrollBar.Show(Visible: boolean);
     120procedure TPVScrollBar.Show(Visible: Boolean);
    123121begin
    124122  if not Visible or (Max < ScrollBar.PageSize) then
Note: See TracChangeset for help on using the changeset viewer.