Changeset 531 for trunk/LocalPlayer/UnitStat.pas
- Timestamp:
- Mar 27, 2024, 12:31:14 PM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/UnitStat.pas
r530 r531 293 293 end; 294 294 295 procedure FeatureBar( dst: TBitmap; X, Y: Integer; const mi: TModelInfo;295 procedure FeatureBar(Dst: TBitmap; X, Y: Integer; const mi: TModelInfo; 296 296 T: TTexture); 297 297 var 298 I, W, dx, num: Integer;298 I, W, dx, Num: Integer; 299 299 S: string; 300 300 begin 301 DarkGradient( dst.Canvas, X - 6, Y + 1, 180, 1);302 with dst.Canvas do301 DarkGradient(Dst.Canvas, X - 6, Y + 1, 180, 1); 302 with Dst.Canvas do 303 303 if mi.Kind >= $10 then 304 304 begin … … 315 315 for I := 3 to nFeature - 1 do 316 316 begin 317 num := 0;317 Num := 0; 318 318 case I of 319 319 mcSeaTrans: 320 320 if mi.Domain = dSea then 321 num := mi.TTrans;321 Num := mi.TTrans; 322 322 mcCarrier: 323 323 if mi.Domain = dSea then 324 num := mi.ATrans_Fuel;324 Num := mi.ATrans_Fuel; 325 325 mcBombs: 326 num := mi.Bombs;326 Num := mi.Bombs; 327 327 mcFuel: 328 328 if mi.Domain = dAir then 329 num := mi.ATrans_Fuel;329 Num := mi.ATrans_Fuel; 330 330 mcAirTrans: 331 331 if mi.Domain = dAir then 332 num := mi.TTrans;332 Num := mi.TTrans; 333 333 mcFirstNonCap .. nFeature - 1: 334 334 if mi.Cap and (1 shl (I - mcFirstNonCap)) <> 0 then 335 num := 1;335 Num := 1; 336 336 end; 337 if ( num > 0) and337 if (Num > 0) and 338 338 ((I <> mcSE) or (mi.Cap and (1 shl (mcNP - mcFirstNonCap)) = 0)) 339 339 then 340 340 begin 341 if num > 1 then341 if Num > 1 then 342 342 begin 343 S := IntToStr( num);343 S := IntToStr(Num); 344 344 W := TextWidth(S); 345 345 Brush.Color := $FFFFFF; … … 352 352 FrameRect(Rect(X - 3 + dx, Y + 2, X + 11 + dx, Y + 16)); 353 353 Brush.Style := TBrushStyle.bsClear; 354 Sprite( dst, HGrSystem, X - 1 + dx, Y + 4, 10, 10,354 Sprite(Dst, HGrSystem, X - 1 + dx, Y + 4, 10, 10, 355 355 66 + I mod 11 * 11, 137 + I div 11 * 11); 356 356 Inc(dx, 15); … … 360 360 end; 361 361 362 procedure NumberBarS( dst: TBitmap; X, Y: Integer; Cap, S: string; T: TTexture);363 begin 364 DLine( dst.Canvas, X - 2, X + 170, Y + 16, T.ColorBevelShade, T.ColorBevelLight);365 LoweredTextOut( dst.Canvas, -1, T, X - 2, Y, Cap);366 RisedTextout( dst.Canvas, X + 170 - BiColorTextWidth(dst.Canvas, S), Y, S);362 procedure NumberBarS(Dst: TBitmap; X, Y: Integer; Cap, S: string; T: TTexture); 363 begin 364 DLine(Dst.Canvas, X - 2, X + 170, Y + 16, T.ColorBevelShade, T.ColorBevelLight); 365 LoweredTextOut(Dst.Canvas, -1, T, X - 2, Y, Cap); 366 RisedTextout(Dst.Canvas, X + 170 - BiColorTextWidth(Dst.Canvas, S), Y, S); 367 367 end; 368 368
Note:
See TracChangeset
for help on using the changeset viewer.