Changeset 190 for trunk/LocalPlayer
- Timestamp:
- May 7, 2020, 10:33:59 AM (5 years ago)
- Location:
- trunk/LocalPlayer
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Help.pas
r189 r190 1948 1948 if Link shr 8 and $3F = hkInternet then 1949 1949 case Link and $FF of 1950 1: OpenDocument( pchar(HomeDir + 'AI Template' + DirectorySeparator + 'AI development manual.html'));1950 1: OpenDocument(HomeDir + AITemplateFileName); 1951 1951 2: OpenURL(CevoHomepage); 1952 3: OpenURL(Cevo HomepageContact);1952 3: OpenURL(CevoContact); 1953 1953 end 1954 1954 else -
trunk/LocalPlayer/MessgEx.pas
r188 r190 345 345 if UnitsInLine > LostUnitsPerLine then 346 346 UnitsInLine := LostUnitsPerLine; 347 end 347 end; 348 348 end; 349 349 end; … … 450 450 if OpenSound <> '' then 451 451 PostMessage(Handle, WM_PLAYSOUND, 0, 0); 452 end; { FormPaint }452 end; 453 453 454 454 procedure TMessgExDlg.Button1Click(Sender: TObject); … … 469 469 procedure TMessgExDlg.Button3Click(Sender: TObject); 470 470 begin 471 ModalResult := mrCancel 471 ModalResult := mrCancel; 472 472 end; 473 473 474 474 procedure TMessgExDlg.RemoveBtnClick(Sender: TObject); 475 475 begin 476 ModalResult := mrNo 476 ModalResult := mrNo; 477 477 end; 478 478 … … 485 485 ModalResult := mrCancel 486 486 else if Button2.Visible then 487 ModalResult := mrIgnore 487 ModalResult := mrIgnore; 488 488 end; 489 489 … … 497 497 Kind := mkOk; 498 498 ShowModal; 499 end 499 end; 500 500 end; 501 501 … … 522 522 Kind := QueryKind; 523 523 ShowModal; 524 result := ModalResult 525 end 524 result := ModalResult; 525 end; 526 526 end; 527 527 … … 537 537 HelpNo := ContextNo; 538 538 ShowModal; 539 end 539 end; 540 540 end; 541 541 … … 552 552 end; 553 553 554 554 555 initialization 555 556 -
trunk/LocalPlayer/TechTree.pas
r188 r190 78 78 X, w: Integer; 79 79 begin 80 with Canvas do 81 begin 80 with Canvas do begin 82 81 // black border 83 82 brush.color := $000000; … … 120 119 procedure TTechTreeDlg.FormShow(Sender: TObject); 121 120 var 122 X, Y, ad , TexWidth, TexHeight: Integer;121 X, Y, ad: Integer; 123 122 s: string; 124 SrcPixel, DstPixel: TPixelPointer; 125 begin 126 if Image = nil then127 begin123 const 124 TransparentColor = $7F007F; 125 begin 126 if Image = nil then begin 128 127 Image := TBitmap.Create; 129 128 Image.PixelFormat := pf24bit; 130 129 LoadGraphicFile(Image, HomeDir + 'Help' + DirectorySeparator + 'AdvTree.png', gfNoGamma); 131 130 132 with Image.Canvas do 133 begin 131 with Image.Canvas do begin 134 132 // write advance names 135 133 Font.Assign(UniFont[ftSmall]); … … 147 145 TextOut(xStart + X * xPitch + 2, yStart + Y * yPitch, s); 148 146 Pixels[xStart + X * xPitch + 10, yStart + Y * yPitch - 1] 149 := $7F007F;147 := TransparentColor; 150 148 end 151 149 end; … … 162 160 end; 163 161 164 // texturize background 165 Image.BeginUpdate; 166 TexWidth := Paper.Width; 167 TexHeight := Paper.Height; 168 DstPixel.Init(Image); 169 SrcPixel.Init(Paper); 170 for Y := 0 to Image.Height - 1 do begin 171 for X := 0 to Image.Width - 1 do begin 172 if (DstPixel.Pixel^.ARGB and $FFFFFF) = $7F007F then begin // transparent 173 SrcPixel.SetXY(X mod TexWidth, Y mod TexHeight); 174 DstPixel.Pixel^.B := SrcPixel.Pixel^.B; 175 DstPixel.Pixel^.G := SrcPixel.Pixel^.G; 176 DstPixel.Pixel^.R := SrcPixel.Pixel^.R; 177 end; 178 DstPixel.NextPixel; 179 end; 180 DstPixel.NextLine; 181 end; 182 Image.EndUpdate; 162 Texturize(Image, Paper, TransparentColor); 183 163 end; 184 164 … … 205 185 xDown := X; 206 186 yDown := Y; 207 end 187 end; 208 188 end; 209 189 … … 235 215 236 216 SmartInvalidate; 237 end 217 end; 238 218 end; 239 219 … … 247 227 procedure TTechTreeDlg.CloseBtnClick(Sender: TObject); 248 228 begin 249 Close ();229 Close; 250 230 end; 251 231 -
trunk/LocalPlayer/Term.pas
r189 r190 6857 6857 end 6858 6858 else if Sender = mWebsite then 6859 OpenURL( 'http://c-evo.org')6859 OpenURL(CevoHomepage) 6860 6860 else if Sender = mRandomMap then 6861 6861 begin
Note:
See TracChangeset
for help on using the changeset viewer.