Changeset 69 for trunk/LocalPlayer
- Timestamp:
- Jan 14, 2017, 10:33:42 PM (8 years ago)
- Location:
- trunk/LocalPlayer
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Help.lfm
r9 r69 17 17 OnDestroy = FormDestroy 18 18 OnKeyDown = FormKeyDown 19 OnMouseWheel = FormMouseWheel 19 20 OnMouseDown = PaintBox1MouseDown 20 21 OnMouseMove = PaintBox1MouseMove -
trunk/LocalPlayer/Help.pas
r68 r69 47 47 end; 48 48 49 { THelpDlg } 50 49 51 THelpDlg = class(TFramedDlg) 50 52 CloseBtn: TButtonB; … … 54 56 procedure FormCreate(Sender: TObject); 55 57 procedure FormDestroy(Sender: TObject); 58 procedure FormMouseWheel(Sender: TObject; Shift: TShiftState; 59 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean); 56 60 procedure FormPaint(Sender: TObject); 57 61 procedure CloseBtnClick(Sender: TObject); … … 65 69 procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); 66 70 procedure SearchBtnClick(Sender: TObject); 67 public68 Difficulty: integer;69 procedure ShowNewContent(NewMode, Category, Index: integer);70 procedure ClearHistory;71 function TextIndex(Item: string): integer;72 71 protected 73 72 procedure OffscreenPaint; override; … … 87 86 HistPos: array [0 .. MaxHist - 1] of integer; 88 87 HistSearchContent: array [0 .. MaxHist - 1] of shortstring; 88 procedure ScrollBarUpdate(Sender: TObject); 89 89 procedure line(ca: TCanvas; i: integer; lit: boolean); 90 90 procedure Prepare(sbPos: integer = 0); … … 92 92 procedure Search(SearchString: string); 93 93 procedure OnScroll(var m: TMessage); message WM_VSCROLL; 94 procedure OnMouseWheel(var m: TMessage); message LM_MOUSEWHEEL;95 94 procedure OnMouseLeave(var Msg: TMessage); message CM_MOUSELEAVE; 95 public 96 Difficulty: integer; 97 procedure ShowNewContent(NewMode, Category, Index: integer); 98 procedure ClearHistory; 99 function TextIndex(Item: string): integer; 96 100 end; 97 101 … … 202 206 SearchResult.OwnsObjects := True; 203 207 sb := TPVScrollbar.Create; 204 CreatePVSB(sb, Handle, 36, 551, 36 + 432); 208 sb.Setup(36, 9, 11, Self); 209 sb.OnUpdate := ScrollBarUpdate; 205 210 206 211 HelpText := TStringTable.Create; … … 247 252 end; 248 253 254 procedure THelpDlg.FormMouseWheel(Sender: TObject; Shift: TShiftState; 255 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean); 256 begin 257 if sb.ProcessMouseWheel(WheelDelta) then begin 258 PaintBox1MouseMove(nil, [], MousePos.X - Left, 259 MousePos.Y - Top); 260 end; 261 end; 262 249 263 procedure THelpDlg.CloseBtnClick(Sender: TObject); 250 264 begin 251 Close 265 Close; 252 266 end; 253 267 254 268 procedure THelpDlg.OnScroll(var m: TMessage); 255 269 begin 256 if ProcessPVSB(sb, m) then 257 begin 270 if sb.Process(m) then begin 258 271 Sel := -1; 259 272 SmartUpdateContent(true) … … 261 274 end; 262 275 263 procedure THelpDlg.OnMouseWheel(var m: TMessage);264 begin265 if ProcessMouseWheel(sb, m) then266 begin267 Sel := -1;268 SmartUpdateContent(true);269 PaintBox1MouseMove(nil, [], m.lParam and $FFFF - Left,270 m.lParam shr 16 - Top);271 end272 end;273 274 276 procedure THelpDlg.OnMouseLeave(var Msg: TMessage); 275 277 begin 276 if Sel <> -1 then 277 begin 278 if Sel <> -1 then begin 278 279 line(Canvas, Sel, false); 279 280 Sel := -1 … … 771 772 MarkUsedOffscreen(InnerWidth, InnerHeight + 13 + 48); 772 773 end; { OffscreenPaint } 774 775 procedure THelpDlg.ScrollBarUpdate(Sender: TObject); 776 begin 777 Sel := -1; 778 SmartUpdateContent(true) 779 end; 773 780 774 781 procedure THelpDlg.Prepare(sbPos: integer = 0); … … 1835 1842 LF; 1836 1843 1837 InitPVSB(sb, Count - 1, InnerHeight div 24); 1838 if sbPos <> 0 then 1839 begin 1840 sb.si.npos := sbPos; 1841 sb.si.FMask := SIF_POS; 1842 SetScrollInfo(sb.h, SB_CTL, sb.si, true); 1843 end; 1844 //Self.Show; 1845 sb.Init(Count - 1, InnerHeight div 24); 1846 sb.SetPos(sbPos); 1844 1847 BackBtn.Visible := nHist > 0; 1845 1848 TopBtn.Visible := (nHist > 0) or (Kind <> hkMisc) or (no <> miscMain); -
trunk/LocalPlayer/PVSB.pas
r50 r69 8 8 Windows, 9 9 {$ENDIF} 10 Forms, LCLIntf, LCLType, LMessages, Messages, SysUtils; 10 Classes, Controls, Forms, LCLIntf, LCLType, LMessages, Messages, SysUtils, 11 StdCtrls, Math; 11 12 12 13 type … … 14 15 { TPVScrollbar } 15 16 16 TPVScrollbar = class 17 h: integer; 17 TPVScrollBar = class 18 private 19 FOnUpdate: TNotifyEvent; 20 procedure ScrollBarChanged(Sender: TObject); 21 public 22 ScrollBar: TScrollBar; 18 23 si: TScrollInfo; 19 Form: TForm;20 24 destructor Destroy; override; 25 procedure Setup(TopSpacing, RightSpacing, BottomSpacing: integer; Parent: TWinControl); 26 procedure Init(max, Page: integer); 27 procedure SetPos(Pos: Integer); 28 function Process(const m: TMessage): boolean; 29 function ProcessMouseWheel(Delta: Integer) : boolean; 30 procedure Show(Visible: boolean); 31 procedure EndSB; 32 procedure UpdateScrollBar; 33 property OnUpdate: TNotifyEvent read FOnUpdate write FOnUpdate; 21 34 end; 22 35 23 procedure CreatePVSB(var sb: TPVScrollbar; Handle, y0, x1, y1: integer);24 procedure InitPVSB(var sb: TPVScrollbar; max, Page: integer);25 function ProcessPVSB(var sb: TPVScrollbar; const m: TMessage): boolean;26 function ProcessMouseWheel(var sb: TPVScrollbar; const m: TMessage)27 : boolean;28 procedure ShowPVSB(var sb: TPVScrollbar; Visible: boolean);29 procedure EndPVSB(var sb: TPVScrollbar);30 36 31 37 implementation … … 34 40 Count: integer = 0; 35 41 36 procedure CreatePVSB(var sb: TPVScrollbar; Handle, y0, x1, y1: integer); 42 procedure TPVScrollBar.Setup(TopSpacing, RightSpacing, BottomSpacing: integer; 43 Parent: TWinControl); 37 44 begin 38 45 inc(Count); 39 {$IFDEF LINUX} 40 sb.Form := TForm.Create(nil); 41 sb.Form.SetBounds(x1 - 100, y0, 100, y1 - y0); 42 sb.Form.Name := 'PVSB' + IntToStr(Count); 43 sb.h := sb.Form.Handle; 46 //{$IFDEF LINUX} 47 // sb.Form := TForm.Create(nil); 48 // sb.Form.SetBounds(x1 - 100, y0, 100, y1 - y0); 49 // sb.Form.Name := 'PVSB' + IntToStr(Count); 50 ScrollBar := TScrollBar.Create(Parent); 51 ScrollBar.Kind := sbVertical; 52 ScrollBar.Name := 'PVSB' + IntToStr(Count); 53 ScrollBar.Parent := Parent; 54 ScrollBar.BorderSpacing.Top := TopSpacing; 55 ScrollBar.BorderSpacing.Right := RightSpacing; 56 ScrollBar.BorderSpacing.Bottom := BottomSpacing; 57 ScrollBar.Align := alRight; 58 ScrollBar.OnChange := ScrollBarChanged; 59 //sb.h := sb.ScrollBar.Handle; 60 (* 44 61 {$ENDIF} 45 62 {$IFDEF WINDOWS} … … 48 65 Handle, 0, 0, nil); 49 66 {$ENDIF} 50 sb.si.cbSize := 28;51 end;52 53 procedure InitPVSB(var sb: TPVScrollbar; max, Page: integer); 54 begin 55 with sb.si do 56 begin67 *) 68 si.cbSize := 28; 69 end; 70 71 procedure TPVScrollBar.Init(max, Page: integer); 72 begin 73 with si do begin 57 74 nMin := 0; 58 75 nMax := max; … … 61 78 FMask := SIF_PAGE or SIF_POS or SIF_RANGE; 62 79 end; 63 SetScrollInfo(sb.h, SB_CTL, sb.si, true); 64 if max < Page then 65 ShowWindow(sb.h, SW_HIDE) 66 else 67 ShowWindow(sb.h, SW_SHOW) 68 end; 69 70 function ProcessPVSB(var sb: TPVScrollbar; const m: TMessage): Boolean; 80 UpdateScrollBar; 81 //SetScrollInfo(sb.ScrollBar.Handle, SB_CTL, sb.si, true); 82 if max < Page then ScrollBar.Visible := False 83 else ScrollBar.Visible := True; 84 end; 85 86 procedure TPVScrollBar.SetPos(Pos: Integer); 87 begin 88 if Pos <> 0 then begin 89 si.npos := Pos; 90 si.FMask := SIF_POS; 91 //SetScrollInfo(sb.ScrollBar.Handle, SB_CTL, sb.si, true); 92 UpdateScrollBar; 93 end; 94 end; 95 96 function TPVScrollBar.Process(const m: TMessage): boolean; 71 97 var 72 98 NewPos: integer; 73 99 begin 74 with s b.si do100 with si do 75 101 if nMax < integer(nPage) then 76 102 result := false … … 105 131 npos := NewPos; 106 132 FMask := SIF_POS; 107 SetScrollInfo(sb.h, SB_CTL, sb.si, true); 133 UpdateScrollBar; 134 //SetScrollInfo(sb.ScrollBar.Handle, SB_CTL, sb.si, true); 108 135 end; 109 136 end … … 111 138 end; 112 139 113 function ProcessMouseWheel(var sb: TPVScrollbar; const m: TMessage): Boolean; 140 function TPVScrollBar.ProcessMouseWheel(Delta: Integer 141 ): boolean; 114 142 var 115 143 NewPos: integer; 116 144 begin 117 with s b.si do145 with si do 118 146 if nMax < integer(nPage) then 119 147 result := false 120 148 else 121 149 begin 122 NewPos := npos - m.wParam div (1 shl 16 * 40);150 NewPos := npos - Delta div 300; 123 151 if NewPos < 0 then 124 152 NewPos := 0; … … 130 158 npos := NewPos; 131 159 FMask := SIF_POS; 132 SetScrollInfo(sb.h, SB_CTL, sb.si, true); 160 UpdateScrollBar; 161 //SetScrollInfo(sb.ScrollBar.Handle, SB_CTL, sb.si, true); 133 162 end 134 163 end 135 164 end; 136 165 137 procedure ShowPVSB(var sb: TPVScrollbar; Visible: boolean); 138 begin 139 if not Visible or (sb.si.nMax < integer(sb.si.nPage)) then 140 ShowWindow(sb.h, SW_HIDE) 141 else 142 ShowWindow(sb.h, SW_SHOW) 143 end; 144 145 procedure EndPVSB(var sb: TPVScrollbar); 146 begin 147 with sb.si do 148 begin 166 procedure TPVScrollBar.Show(Visible: boolean); 167 begin 168 if not Visible or (si.nMax < integer(si.nPage)) then 169 ScrollBar.Visible := False 170 else ScrollBar.Visible := True; 171 end; 172 173 procedure TPVScrollBar.EndSB; 174 begin 175 with si do begin 149 176 if nMax < integer(nPage) then 150 177 npos := 0 // hidden 151 else 152 begin153 s b.si.npos := nMax - integer(nPage) + 1;154 sb.si.FMask := SIF_POS;155 SetScrollInfo(sb.h, SB_CTL, sb.si, true);178 else begin 179 si.npos := nMax - integer(nPage) + 1; 180 si.FMask := SIF_POS; 181 UpdateScrollBar; 182 //SetScrollInfo(sb.ScrollBar.Handle, SB_CTL, sb.si, true); 156 183 end 157 184 end 158 185 end; 159 186 187 procedure TPVScrollBar.UpdateScrollBar; 188 begin 189 ScrollBar.Min := si.nMin; 190 ScrollBar.Max := Max(si.nMax - si.nPage + 1, 0); 191 ScrollBar.PageSize := si.nPage; 192 ScrollBar.Position := si.nPos; 193 end; 194 160 195 { TPVScrollbar } 161 196 162 destructor TPVScrollbar.Destroy; 163 begin 164 h := 0; 197 procedure TPVScrollBar.ScrollBarChanged(Sender: TObject); 198 begin 199 si.npos := ScrollBar.Position; 200 if Assigned(FOnUpdate) then FOnUpdate(Self); 201 end; 202 203 destructor TPVScrollBar.Destroy; 204 begin 205 //h := 0; 165 206 si.cbSize := 0; 166 FreeAndNil( Form);207 FreeAndNil(ScrollBar); 167 208 end; 168 209 -
trunk/LocalPlayer/Select.lfm
r9 r69 17 17 OnDestroy = FormDestroy 18 18 OnKeyDown = FormKeyDown 19 OnMouseWheel = FormMouseWheel 19 20 OnMouseDown = PaintBox1MouseDown 20 21 OnMouseMove = PaintBox1MouseMove -
trunk/LocalPlayer/Select.pas
r50 r69 18 18 kChooseETech, kChooseModel, kChooseEModel, kChooseCity, kChooseECity, 19 19 kStealTech, kGov, kMission); 20 21 { TListDlg } 20 22 21 23 TListDlg = class(TFramedDlg) … … 26 28 ToggleBtn: TButtonB; 27 29 Popup: TPopupMenu; 30 procedure FormMouseWheel(Sender: TObject; Shift: TShiftState; 31 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean); 28 32 procedure PaintBox1MouseMove(Sender: TObject; Shift: TShiftState; 29 33 x, y: integer); … … 40 44 procedure PlayerClick(Sender: TObject); 41 45 procedure FormDestroy(Sender: TObject); 42 46 private 47 Kind: TListKind; 48 LineDistance, MaxLines, cixProject, pView, Sel, DispLines, Layer, nColumn, 49 TechNameSpace, ScienceNation: integer; 50 sb: TPVScrollbar; 51 Lines, FirstShrinkedLine: array [0 .. MaxLayer - 1] of integer; 52 code: array [0 .. MaxLayer - 1, 0 .. 4095] of integer; 53 Column: array [0 .. nPl - 1] of integer; 54 Closable, MultiPage: boolean; 55 ScienceNationDot: TBitmap; 56 procedure ScrollBarUpdate(Sender: TObject); 57 procedure InitLines; 58 procedure line(ca: TCanvas; l: integer; NonText, lit: boolean); 59 function RenameCity(cix: integer): boolean; 60 function RenameModel(mix: integer): boolean; 61 procedure OnScroll(var m: TMessage); message WM_VSCROLL; 62 procedure OnMouseLeave(var Msg: TMessage); message CM_MOUSELEAVE; 43 63 public 44 64 result: integer; … … 53 73 procedure AddCity; 54 74 procedure RemoveUnit; 55 56 private57 Kind: TListKind;58 LineDistance, MaxLines, cixProject, pView, Sel, DispLines, Layer, nColumn,59 TechNameSpace, ScienceNation: integer;60 sb: TPVScrollbar;61 Lines, FirstShrinkedLine: array [0 .. MaxLayer - 1] of integer;62 code: array [0 .. MaxLayer - 1, 0 .. 4095] of integer;63 Column: array [0 .. nPl - 1] of integer;64 Closable, MultiPage: boolean;65 ScienceNationDot: TBitmap;66 procedure InitLines;67 procedure line(ca: TCanvas; l: integer; NonText, lit: boolean);68 function RenameCity(cix: integer): boolean;69 function RenameModel(mix: integer): boolean;70 procedure OnScroll(var m: TMessage); message WM_VSCROLL;71 procedure OnMouseWheel(var m: TMessage); message LM_MOUSEWHEEL;72 procedure OnMouseLeave(var Msg: TMessage); message CM_MOUSELEAVE;73 75 end; 74 76 … … 101 103 Canvas.Font.Assign(UniFont[ftNormal]); 102 104 sb := TPVScrollbar.Create; 103 CreatePVSB(sb, Handle, 2, 361, 2 + 422); 105 sb.Setup(36, 10, 36, Self); 106 sb.OnUpdate := ScrollBarUpdate; 104 107 InitButtons(); 105 108 Kind := kMission; … … 132 135 procedure TListDlg.OnScroll(var m: TMessage); 133 136 begin 134 if ProcessPVSB(sb, m) then 135 begin 137 if sb.Process(m) then begin 136 138 Sel := -2; 137 139 SmartUpdateContent(true); 138 end;139 end;140 141 procedure TListDlg.OnMouseWheel(var m: TMessage);142 begin143 if ProcessMouseWheel(sb, m) then144 begin145 Sel := -2;146 SmartUpdateContent(true);147 PaintBox1MouseMove(nil, [], m.lParam and $FFFF - Left,148 m.lParam shr 16 - Top);149 140 end; 150 141 end; … … 834 825 end; 835 826 827 procedure TListDlg.FormMouseWheel(Sender: TObject; Shift: TShiftState; 828 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean); 829 begin 830 if sb.ProcessMouseWheel(WheelDelta) then begin 831 PaintBox1MouseMove(nil, [], MousePos.X - Left, 832 MousePos.Y - Top); 833 end; 834 end; 835 836 836 function TListDlg.RenameCity(cix: integer): boolean; 837 837 var … … 1599 1599 CaptionLeft := ToggleBtn.Left + ToggleBtn.Width; 1600 1600 CaptionRight := CloseBtn.Left; 1601 SetWindowPos(sb. h, 0, SideFrame + InnerWidth - GetSystemMetrics(SM_CXVSCROLL),1601 SetWindowPos(sb.ScrollBar.Handle, 0, SideFrame + InnerWidth - GetSystemMetrics(SM_CXVSCROLL), 1602 1602 TitleHeight, GetSystemMetrics(SM_CXVSCROLL), LineDistance * DispLines + 48, 1603 1603 SWP_NOZORDER or SWP_NOREDRAW); … … 1633 1633 Sel := -2; 1634 1634 ScienceNation := -1; 1635 InitPVSB(sb,Lines[Layer] - 1, DispLines);1635 sb.Init(Lines[Layer] - 1, DispLines); 1636 1636 1637 1637 OffscreenPaint; … … 1749 1749 InitLines; 1750 1750 Sel := -2; 1751 InitPVSB(sb,Lines[Layer] - 1, DispLines);1751 sb.Init(Lines[Layer] - 1, DispLines); 1752 1752 OffscreenPaint; 1753 1753 Invalidate … … 1762 1762 1763 1763 Sel := -2; 1764 InitPVSB(sb,Lines[Layer] - 1, DispLines);1764 sb.Init(Lines[Layer] - 1, DispLines); 1765 1765 SmartUpdateContent 1766 1766 end; … … 1863 1863 end; 1864 1864 1865 procedure TListDlg.ScrollBarUpdate(Sender: TObject); 1866 begin 1867 Sel := -2; 1868 SmartUpdateContent(true); 1869 end; 1870 1865 1871 end. -
trunk/LocalPlayer/Term.pas
r67 r69 22 22 23 23 type 24 25 { TMainScreen } 26 24 27 TMainScreen = class(TDrawDlg) 25 28 Timer1: TTimer; … … 216 219 procedure BareBtnDownChanged(Sender: TObject); 217 220 procedure MovieSpeedBtnClick(Sender: TObject); 218 219 public220 procedure CreateParams(var p: TCreateParams); override;221 procedure Client(Command, NewPlayer: integer; var Data);222 procedure SetAIName(p: integer; Name: string);223 function ZoomToCity(Loc: integer; NextUnitOnClose: boolean = false;224 ShowEvent: integer = 0): boolean;225 procedure CityClosed(Activateuix: integer; StepFocus: boolean = false;226 SelectFocus: boolean = false);227 function DipCall(Command: integer): integer;228 function OfferCall(var Offer: TOffer): integer;229 procedure UpdateViews(UpdateCityScreen: boolean = false);230 function ContactRefused(p: integer; Item: String): boolean;231 232 221 private 233 222 xw, yw, xwd, ywd, xwMini, ywMini, xMidPanel, xRightPanel, xTroop, xTerrain, … … 242 231 Closable, RepaintOnResize, Tracking, TurnComplete, Edited, GoOnPhase, 243 232 HaveStrategyAdvice, FirstMovieTurn: boolean; 233 procedure ScrollBarUpdate(Sender: TObject); 244 234 procedure ArrangeMidPanel; 245 235 procedure MainOffscreenPaint; … … 282 272 procedure OnScroll(var m: TMessage); message WM_VSCROLL; 283 273 procedure OnEOT(var Msg: TMessage); message WM_EOT; 274 public 275 procedure CreateParams(var p: TCreateParams); override; 276 procedure Client(Command, NewPlayer: integer; var Data); 277 procedure SetAIName(p: integer; Name: string); 278 function ZoomToCity(Loc: integer; NextUnitOnClose: boolean = false; 279 ShowEvent: integer = 0): boolean; 280 procedure CityClosed(Activateuix: integer; StepFocus: boolean = false; 281 SelectFocus: boolean = false); 282 function DipCall(Command: integer): integer; 283 function OfferCall(var Offer: TOffer): integer; 284 procedure UpdateViews(UpdateCityScreen: boolean = false); 285 function ContactRefused(p: integer; Item: String): boolean; 284 286 end; 285 287 … … 1473 1475 StayOnTop_Ensured := false; 1474 1476 1475 CreatePVSB(sb, Handle, 100 - 200, 122, 100 + MidPanelHeight - 16 - 200); 1477 sb.Setup(0, 0, 0, Self); 1478 sb.OnUpdate := ScrollBarUpdate; 1476 1479 end; { InitModule } 1477 1480 … … 2656 2659 if Controls[i] is TButtonC then 2657 2660 Controls[i].Visible := false; 2658 InitPVSB(sb,0, 1);2661 sb.Init(0, 1); 2659 2662 for p1 := 0 to nPl - 1 do 2660 2663 if Tribe[p1] <> nil then … … 3577 3580 EOT.Top := ClientHeight - 64; 3578 3581 EOT.Left := ClientWidth - 62; 3579 SetWindowPos(sb.h, 0, xRightPanel + 10 - 14 - GetSystemMetrics(SM_CXVSCROLL), 3582 sb.ScrollBar.BorderSpacing.Top := ClientHeight - yTroop - 24; 3583 sb.ScrollBar.BorderSpacing.Right := ClientWidth - xRightPanel + 8; 3584 sb.ScrollBar.BorderSpacing.Bottom := 8; 3585 SetWindowPos(sb.ScrollBar.Handle, 0, xRightPanel + 10 - 14 - GetSystemMetrics(SM_CXVSCROLL), 3580 3586 ClientHeight - MidPanelHeight + 8, 0, 0, SWP_NOSIZE or SWP_NOZORDER); 3581 3587 MapBtn0.Left := xMini + G.lx - 44; … … 3615 3621 procedure TMainScreen.OnScroll(var m: TMessage); 3616 3622 begin 3617 if ProcessPVSB(sb, m) then 3618 begin 3623 if sb.Process(m) then begin 3619 3624 PanelPaint; 3620 Update 3621 end 3625 Update; 3626 end; 3622 3627 end; 3623 3628 … … 3962 3967 end; 3963 3968 3964 procedure TMainScreen.PaintLocTemp(Loc ,Style: integer);3969 procedure TMainScreen.PaintLocTemp(Loc: integer; Style: integer); 3965 3970 var 3966 3971 y0, x0, xMap, yMap: integer; … … 6341 6346 Server(sGetUnits, me, Loc, TrCnt); 6342 6347 if TrCnt = 0 then 6343 InitPVSB(sb,0, 1)6348 sb.Init(0, 1) 6344 6349 else 6345 6350 begin 6346 InitPVSB(sb,(TrCnt + TrRow - 1) div TrRow - 1, 1);6351 sb.Init((TrCnt + TrRow - 1) div TrRow - 1, 1); 6347 6352 with sb.si do 6348 6353 if (nMax >= integer(nPage)) and (trixFocus >= 0) then … … 6350 6355 sb.si.npos := trixFocus div TrRow; 6351 6356 sb.si.FMask := SIF_POS; 6352 SetScrollInfo(sb. h, SB_CTL, sb.si, true);6357 SetScrollInfo(sb.ScrollBar.Handle, SB_CTL, sb.si, true); 6353 6358 end 6354 6359 end … … 8005 8010 end; 8006 8011 8012 procedure TMainScreen.ScrollBarUpdate(Sender: TObject); 8013 begin 8014 PanelPaint; 8015 Update; 8016 end; 8017 8007 8018 initialization 8008 8019
Note:
See TracChangeset
for help on using the changeset viewer.