Changeset 447 for trunk/LocalPlayer/PVSB.pas
- Timestamp:
- May 19, 2022, 10:39:34 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/PVSB.pas
r442 r447 30 30 procedure Init(Max, PageSize: Integer); 31 31 procedure SetPos(Pos: Integer); 32 function Process(const Msg: TMessage): boolean;32 function Process(const Msg: TMessage): Boolean; 33 33 function ProcessMouseWheel(Delta: Integer): Boolean; 34 procedure Show(Visible: boolean);34 procedure Show(Visible: Boolean); 35 35 procedure EndSB; 36 36 procedure SetBorderSpacing(Top, Right, Bottom: Integer); … … 63 63 end; 64 64 65 function TPVScrollBar.Process(const Msg: TMessage): boolean;65 function TPVScrollBar.Process(const Msg: TMessage): Boolean; 66 66 var 67 NewPos: integer;67 NewPos: Integer; 68 68 begin 69 69 if Max < ScrollBar.PageSize then 70 result := false70 Result := False 71 71 else 72 72 begin 73 73 if (Msg.wParam and $ffff) in [SB_THUMBPOSITION, SB_THUMBTRACK] then 74 74 begin 75 result := ((Msg.wParam shr 16) and $ffff) <> ScrollBar.Position;75 Result := ((Msg.wParam shr 16) and $ffff) <> ScrollBar.Position; 76 76 ScrollBar.Position := (Msg.wParam shr 16) and $ffff; 77 77 end else begin … … 92 92 if NewPos > Max - ScrollBar.PageSize + 1 then 93 93 NewPos := Max - ScrollBar.PageSize + 1; 94 result := NewPos <> ScrollBar.Position;94 Result := NewPos <> ScrollBar.Position; 95 95 if (NewPos <> ScrollBar.Position) or ((Msg.wParam and $ffff) = SB_ENDSCROLL) then 96 96 begin … … 103 103 function TPVScrollBar.ProcessMouseWheel(Delta: Integer): Boolean; 104 104 var 105 NewPos: integer;105 NewPos: Integer; 106 106 begin 107 107 if Max < ScrollBar.PageSize then Result := False … … 118 118 end; 119 119 120 procedure TPVScrollBar.Show(Visible: boolean);120 procedure TPVScrollBar.Show(Visible: Boolean); 121 121 begin 122 122 if not Visible or (Max < ScrollBar.PageSize) then
Note:
See TracChangeset
for help on using the changeset viewer.