Ignore:
Timestamp:
Mar 27, 2024, 12:31:14 PM (6 weeks ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/UnitStat.pas

    r530 r531  
    293293  end;
    294294
    295   procedure FeatureBar(dst: TBitmap; X, Y: Integer; const mi: TModelInfo;
     295  procedure FeatureBar(Dst: TBitmap; X, Y: Integer; const mi: TModelInfo;
    296296    T: TTexture);
    297297  var
    298     I, W, dx, num: Integer;
     298    I, W, dx, Num: Integer;
    299299    S: string;
    300300  begin
    301     DarkGradient(dst.Canvas, X - 6, Y + 1, 180, 1);
    302     with dst.Canvas do
     301    DarkGradient(Dst.Canvas, X - 6, Y + 1, 180, 1);
     302    with Dst.Canvas do
    303303      if mi.Kind >= $10 then
    304304      begin
     
    315315        for I := 3 to nFeature - 1 do
    316316        begin
    317           num := 0;
     317          Num := 0;
    318318          case I of
    319319            mcSeaTrans:
    320320              if mi.Domain = dSea then
    321                 num := mi.TTrans;
     321                Num := mi.TTrans;
    322322            mcCarrier:
    323323              if mi.Domain = dSea then
    324                 num := mi.ATrans_Fuel;
     324                Num := mi.ATrans_Fuel;
    325325            mcBombs:
    326               num := mi.Bombs;
     326              Num := mi.Bombs;
    327327            mcFuel:
    328328              if mi.Domain = dAir then
    329                 num := mi.ATrans_Fuel;
     329                Num := mi.ATrans_Fuel;
    330330            mcAirTrans:
    331331              if mi.Domain = dAir then
    332                 num := mi.TTrans;
     332                Num := mi.TTrans;
    333333            mcFirstNonCap .. nFeature - 1:
    334334              if mi.Cap and (1 shl (I - mcFirstNonCap)) <> 0 then
    335                 num := 1;
     335                Num := 1;
    336336          end;
    337           if (num > 0) and
     337          if (Num > 0) and
    338338            ((I <> mcSE) or (mi.Cap and (1 shl (mcNP - mcFirstNonCap)) = 0))
    339339          then
    340340          begin
    341             if num > 1 then
     341            if Num > 1 then
    342342            begin
    343               S := IntToStr(num);
     343              S := IntToStr(Num);
    344344              W := TextWidth(S);
    345345              Brush.Color := $FFFFFF;
     
    352352            FrameRect(Rect(X - 3 + dx, Y + 2, X + 11 + dx, Y + 16));
    353353            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,
    355355              66 + I mod 11 * 11, 137 + I div 11 * 11);
    356356            Inc(dx, 15);
     
    360360  end;
    361361
    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);
    367367  end;
    368368
Note: See TracChangeset for help on using the changeset viewer.