Ignore:
Timestamp:
Apr 6, 2021, 10:16:55 PM (3 years ago)
Author:
chronos
Message:
  • Modified: TTexture changed from record to class.
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Select.pas

    r350 r352  
    202202    begin
    203203      Frame(offscreen.Canvas, x + (16 - 1), y + (16 - 2), x + (16 + xSizeSmall),
    204         y + (16 - 1 + ySizeSmall), MainTexture.clBevelLight,
    205         MainTexture.clBevelShade);
     204        y + (16 - 1 + ySizeSmall), MainTexture.ColorBevelLight,
     205        MainTexture.ColorBevelShade);
    206206      if pix and cpType = 0 then
    207207        if (pix and cpIndex = imPalace) and (MyRO.Government <> gAnarchy) then
     
    231231      if y + TextSize.cy >= TitleHeight + InnerHeight then
    232232        TextSize.cy := TitleHeight + InnerHeight - y;
    233       Fill(ca, x, y, TextSize.cx, TextSize.cy, (wMaintexture - ClientWidth)
    234         div 2, (hMaintexture - ClientHeight) div 2);
     233      Fill(ca, x, y, TextSize.cx, TextSize.cy, (Maintexture.Width - ClientWidth)
     234        div 2, (Maintexture.Height - ClientHeight) div 2);
    235235    end;
    236236    LoweredTextOut(ca, Color, MainTexture, x, y, s);
     
    260260      begin
    261261        x := x + SideFrame;
    262         y := y + TitleHeight
     262        y := y + TitleHeight;
    263263      end;
    264264      if lit then
    265         TextColor := MainTexture.clLitText
     265        TextColor := MainTexture.ColorLitText
    266266      else
    267267        TextColor := -1;
     
    434434    end;
    435435    if lit then
    436       TextColor := MainTexture.clLitText
     436      TextColor := MainTexture.ColorLitText
    437437    else
    438438      TextColor := -1;
     
    556556              begin
    557557                Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1, (8 + 16 + 36),
    558                   y0 + 20, MainTexture.clBevelLight, MainTexture.clBevelShade);
     558                  y0 + 20, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    559559                Dump(offscreen, HGrSystem, (8 + 16), y0, 36, 20, 223, 295)
    560560              end
     
    562562              begin
    563563                Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1, (8 + 16 + 36),
    564                   y0 + 20, MainTexture.clBevelLight, MainTexture.clBevelShade);
     564                  y0 + 20, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    565565                Dump(offscreen, HGrSystem, (8 + 16), y0, 36, 20, 260, 295)
    566566              end
     
    568568              begin
    569569                Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1, (8 + 16 + 36),
    570                   y0 + 20, MainTexture.clBevelLight, MainTexture.clBevelShade);
     570                  y0 + 20, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    571571                Dump(offscreen, HGrSystem, (8 + 16), y0, 36, 20, 38, 295)
    572572              end
     
    575575                Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1,
    576576                  (8 + 16 + xSizeSmall), y0 + ySizeSmall,
    577                   MainTexture.clBevelLight, MainTexture.clBevelShade);
     577                  MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    578578                if AdvIcon[lix] < 84 then
    579579                  BitBltCanvas(offscreen.Canvas, (8 + 16), y0, xSizeSmall,
     
    681681            Frame(offscreen.Canvas, 8 + 16 - 1, y0 - 15 + (16 - 2),
    682682              8 + 16 + xSizeSmall, y0 - 15 + (16 - 1 + ySizeSmall),
    683               MainTexture.clBevelLight, MainTexture.clBevelShade);
     683              MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    684684            BitBltCanvas(offscreen.Canvas, 8 + 16, y0 - 15 + (16 - 1),
    685685              xSizeSmall, ySizeSmall, SmallImp.Canvas,
     
    712712    end;
    713713    if lit then
    714       TextColor := MainTexture.clLitText
     714      TextColor := MainTexture.ColorLitText
    715715    else
    716716      TextColor := -1;
     
    812812    begin
    813813      Fill(Canvas, 9, ClientHeight - 29, ClientWidth - 18, 24,
    814         (wMaintexture - ClientWidth) div 2,
    815         (hMaintexture - ClientHeight) div 2);
     814        (Maintexture.Width - ClientWidth) div 2,
     815        (Maintexture.Height - ClientHeight) div 2);
    816816      if ScienceNation >= 0 then
    817817      begin
     
    829829          ScienceNationDot.Height, Canvas, xScreen - 10, ClientHeight - 27);
    830830        ImageOp_BCC(ScienceNationDotBuffer, Templates.Data, Point(0, 0),
    831           ScienceNationDot.BoundsRect, MainTexture.clBevelShade, Tribe[ScienceNation].Color);
     831          ScienceNationDot.BoundsRect, MainTexture.ColorBevelShade, Tribe[ScienceNation].Color);
    832832        BitBltCanvas(Canvas, xScreen - 10, ClientHeight - 27, ScienceNationDot.Width,
    833833          ScienceNationDot.Height, ScienceNationDotBuffer.Canvas, 0, 0);
     
    15321532  begin
    15331533    LineDistance := 21; // looks ugly with scrollbar
    1534     MaxLines := (hMaintexture - (24 + TitleHeight + NarrowFrame))
     1534    MaxLines := (Maintexture.Height - (24 + TitleHeight + NarrowFrame))
    15351535      div LineDistance - 1;
    15361536  end
     
    15381538  begin
    15391539    LineDistance := 24;
    1540     MaxLines := (hMaintexture - (24 + TitleHeight + WideFrame))
     1540    MaxLines := (Maintexture.Height - (24 + TitleHeight + WideFrame))
    15411541      div LineDistance - 1;
    15421542  end;
     
    15741574    ClientHeight := InnerHeight + TitleHeight + NarrowFrame;
    15751575  end;
    1576   assert(ClientHeight <= hMaintexture);
     1576  assert(ClientHeight <= Maintexture.Height);
    15771577
    15781578  TechNameSpace := 224;
Note: See TracChangeset for help on using the changeset viewer.