- Timestamp:
- Jan 11, 2017, 5:26:09 PM (8 years ago)
- Location:
- trunk/LocalPlayer
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Help.pas
r40 r50 208 208 SearchResult := THyperText.Create; 209 209 SearchResult.OwnsObjects := True; 210 sb := TPVScrollbar.Create; 210 211 CreatePVSB(sb, Handle, 36, 551, 36 + 432); 211 212 … … 244 245 procedure THelpDlg.FormDestroy(Sender: TObject); 245 246 begin 247 FreeAndNil(sb); 246 248 FreeAndNil(MainText); 247 249 FreeAndNil(SearchResult); -
trunk/LocalPlayer/PVSB.pas
r49 r50 11 11 12 12 type 13 TPVScrollbar = record 13 14 { TPVScrollbar } 15 16 TPVScrollbar = class 14 17 h: integer; 15 18 si: TScrollInfo; 16 19 Form: TForm; 20 destructor Destroy; override; 17 21 end; 18 22 … … 154 158 end; 155 159 160 { TPVScrollbar } 161 162 destructor TPVScrollbar.Destroy; 163 begin 164 h := 0; 165 si.cbSize := 0; 166 FreeAndNil(Form); 167 end; 168 156 169 end. -
trunk/LocalPlayer/Select.pas
r41 r50 100 100 inherited; 101 101 Canvas.Font.Assign(UniFont[ftNormal]); 102 sb := TPVScrollbar.Create; 102 103 CreatePVSB(sb, Handle, 2, 361, 2 + 422); 103 104 InitButtons(); … … 114 115 procedure TListDlg.FormDestroy(Sender: TObject); 115 116 begin 116 ScienceNationDot.Free; 117 FreeAndNil(sb); 118 FreeAndNil(ScienceNationDot); 117 119 end; 118 120 … … 120 122 begin 121 123 Closable := true; 122 Close 124 Close; 123 125 end; 124 126 125 127 procedure TListDlg.FormCloseQuery(Sender: TObject; var CanClose: boolean); 126 128 begin 127 CanClose := Closable or not(Kind in MustChooseKind) 129 CanClose := Closable or not(Kind in MustChooseKind); 128 130 end; 129 131 … … 133 135 begin 134 136 Sel := -2; 135 SmartUpdateContent(true) 136 end 137 SmartUpdateContent(true); 138 end; 137 139 end; 138 140 … … 145 147 PaintBox1MouseMove(nil, [], m.lParam and $FFFF - Left, 146 148 m.lParam shr 16 - Top); 147 end 149 end; 148 150 end; 149 151 … … 154 156 line(Canvas, Sel, false, false); 155 157 Sel := -2; 156 end 158 end; 157 159 end; 158 160 … … 183 185 LoweredTextOut(Canvas, -2, MainTexture, 184 186 (ClientWidth - BiColorTextWidth(Canvas, s)) div 2, ClientHeight - 29, s); 185 end 187 end; 186 188 end; 187 189 -
trunk/LocalPlayer/Term.pas
r49 r50 3455 3455 i, j: integer; 3456 3456 begin 3457 sb := TPVScrollbar.Create; 3457 3458 {$IFDEF WINDOWS}{ TODO } 3458 3459 Screen.Cursors[crImpDrag] := LoadCursor(HInstance, 'DRAG'); … … 3529 3530 i: integer; 3530 3531 begin 3531 TopBar.free; 3532 Mini.free; 3533 Buffer.free; 3534 Panel.free; 3532 FreeAndNil(sb); 3533 FreeAndNil(TopBar); 3534 FreeAndNil(Mini); 3535 FreeAndNil(Buffer); 3536 FreeAndNil(Panel); 3535 3537 for i := 0 to nPl - 1 do 3536 3538 if AILogo[i] <> nil then 3537 AILogo[i].free;3539 FreeAndNil(AILogo[i]); 3538 3540 end; 3539 3541 … … 4155 4157 end; 4156 4158 4157 function ScrollDCCopy(Canvas: TCanvas; dx: longint; dy: longint; const lprcScroll:TRect; const lprcClip:TRect; hrgnUpdate:HRGN; lprcUpdate: PRect):Boolean; 4159 {$IFDEF LINUX} 4160 // Can't do scrolling of DC under Linux, then fallback into BitBlt. 4161 function ScrollDC(Canvas: TCanvas; dx: longint; dy: longint; const lprcScroll:TRect; const lprcClip:TRect; hrgnUpdate:HRGN; lprcUpdate: PRect):Boolean; 4158 4162 begin 4159 4163 BitBltCanvas(Canvas, lprcScroll.Left + dx, lprcScroll.Top + dy, lprcScroll.Right - lprcScroll.Left, lprcScroll.Bottom - lprcScroll.Top, 4160 4164 Canvas, lprcScroll.Left, lprcScroll.Top, SRCCOPY); 4161 4165 end; 4166 {$ENDIF} 4162 4167 4163 4168 procedure TMainScreen.MainOffscreenPaint; … … 4212 4217 {$ENDIF} 4213 4218 {$IFDEF LINUX} 4214 // Fallback to bitblt 4215 ScrollDCCopy(offscreen.Canvas, (xwd - xw) * (xxt * 2), (ywd - yw) * yyt, 4219 ScrollDC(offscreen.Canvas, (xwd - xw) * (xxt * 2), (ywd - yw) * yyt, 4216 4220 rec, rec, 0, nil); 4217 4221 {$ENDIF} … … 4226 4230 {$ENDIF} 4227 4231 {$IFDEF LINUX} 4228 // Fallback to bitblt 4229 ScrollDCCopy(Canvas, (xwd - xw) * (xxt * 2), (ywd - yw) * yyt, 4232 ScrollDC(Canvas, (xwd - xw) * (xxt * 2), (ywd - yw) * yyt, 4230 4233 rec, rec, 0, nil); 4231 4234 {$ENDIF}
Note:
See TracChangeset
for help on using the changeset viewer.