Ignore:
Timestamp:
Apr 9, 2021, 5:56:50 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Merged changes from trunk r360 into highdpi branch.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/highdpi/LocalPlayer/Select.pas

    r349 r361  
    112112  Canvas.Font.Assign(UniFont[ftNormal]);
    113113  sb := TPVScrollbar.Create(Self);
     114  sb.SetBorderSpacing(36, 10, 36);
    114115  sb.OnUpdate := ScrollBarUpdate;
    115   InitButtons();
     116  InitButtons;
    116117  Kind := kMission;
    117118  Layer0Btn.Hint := Phrases.Lookup('BTN_IMPRS');
     
    201202    begin
    202203      Frame(offscreen.Canvas, x + (16 - 1), y + (16 - 2), x + (16 + xSizeSmall),
    203         y + (16 - 1 + ySizeSmall), MainTexture.clBevelLight,
    204         MainTexture.clBevelShade);
     204        y + (16 - 1 + ySizeSmall), MainTexture.ColorBevelLight,
     205        MainTexture.ColorBevelShade);
    205206      if pix and cpType = 0 then
    206207        if (pix and cpIndex = imPalace) and (MyRO.Government <> gAnarchy) then
     
    230231      if y + TextSize.cy >= TitleHeight + InnerHeight then
    231232        TextSize.cy := TitleHeight + InnerHeight - y;
    232       Fill(ca, x, y, TextSize.cx, TextSize.cy, (wMaintexture - ClientWidth)
    233         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);
    234235    end;
    235236    LoweredTextOut(ca, Color, MainTexture, x, y, s);
     
    259260      begin
    260261        x := x + SideFrame;
    261         y := y + TitleHeight
     262        y := y + TitleHeight;
    262263      end;
    263264      if lit then
    264         TextColor := MainTexture.clLitText
     265        TextColor := MainTexture.ColorLitText
    265266      else
    266267        TextColor := -1;
     
    433434    end;
    434435    if lit then
    435       TextColor := MainTexture.clLitText
     436      TextColor := MainTexture.ColorLitText
    436437    else
    437438      TextColor := -1;
     
    555556              begin
    556557                Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1, (8 + 16 + 36),
    557                   y0 + 20, MainTexture.clBevelLight, MainTexture.clBevelShade);
     558                  y0 + 20, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    558559                Dump(offscreen, HGrSystem, (8 + 16), y0, 36, 20, 223, 295)
    559560              end
     
    561562              begin
    562563                Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1, (8 + 16 + 36),
    563                   y0 + 20, MainTexture.clBevelLight, MainTexture.clBevelShade);
     564                  y0 + 20, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    564565                Dump(offscreen, HGrSystem, (8 + 16), y0, 36, 20, 260, 295)
    565566              end
     
    567568              begin
    568569                Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1, (8 + 16 + 36),
    569                   y0 + 20, MainTexture.clBevelLight, MainTexture.clBevelShade);
     570                  y0 + 20, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    570571                Dump(offscreen, HGrSystem, (8 + 16), y0, 36, 20, 38, 295)
    571572              end
     
    574575                Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1,
    575576                  (8 + 16 + xSizeSmall), y0 + ySizeSmall,
    576                   MainTexture.clBevelLight, MainTexture.clBevelShade);
     577                  MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    577578                if AdvIcon[lix] < 84 then
    578579                  DpiBitCanvas(offscreen.Canvas, (8 + 16), y0, xSizeSmall,
     
    680681            Frame(offscreen.Canvas, 8 + 16 - 1, y0 - 15 + (16 - 2),
    681682              8 + 16 + xSizeSmall, y0 - 15 + (16 - 1 + ySizeSmall),
    682               MainTexture.clBevelLight, MainTexture.clBevelShade);
     683              MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    683684            DpiBitCanvas(offscreen.Canvas, 8 + 16, y0 - 15 + (16 - 1),
    684685              xSizeSmall, ySizeSmall, SmallImp.Canvas,
     
    711712    end;
    712713    if lit then
    713       TextColor := MainTexture.clLitText
     714      TextColor := MainTexture.ColorLitText
    714715    else
    715716      TextColor := -1;
     
    811812    begin
    812813      Fill(Canvas, 9, ClientHeight - 29, ClientWidth - 18, 24,
    813         (wMaintexture - ClientWidth) div 2,
    814         (hMaintexture - ClientHeight) div 2);
     814        (Maintexture.Width - ClientWidth) div 2,
     815        (Maintexture.Height - ClientHeight) div 2);
    815816      if ScienceNation >= 0 then
    816817      begin
     
    828829          ScienceNationDot.Height, Canvas, xScreen - 10, ClientHeight - 27);
    829830        ImageOp_BCC(ScienceNationDotBuffer, Templates.Data, Point(0, 0),
    830           ScienceNationDot.BoundsRect, MainTexture.clBevelShade, Tribe[ScienceNation].Color);
     831          ScienceNationDot.BoundsRect, MainTexture.ColorBevelShade, Tribe[ScienceNation].Color);
    831832        DpiBitCanvas(Canvas, xScreen - 10, ClientHeight - 27, ScienceNationDot.Width,
    832833          ScienceNationDot.Height, ScienceNationDotBuffer.Canvas, 0, 0);
     
    15311532  begin
    15321533    LineDistance := 21; // looks ugly with scrollbar
    1533     MaxLines := (hMaintexture - (24 + TitleHeight + NarrowFrame))
     1534    MaxLines := (Maintexture.Height - (24 + TitleHeight + NarrowFrame))
    15341535      div LineDistance - 1;
    15351536  end
     
    15371538  begin
    15381539    LineDistance := 24;
    1539     MaxLines := (hMaintexture - (24 + TitleHeight + WideFrame))
     1540    MaxLines := (Maintexture.Height - (24 + TitleHeight + WideFrame))
    15401541      div LineDistance - 1;
    15411542  end;
     
    15511552  if (Kind = kAdvance) and (MyData.FarTech <> adNone) or (Kind = kModels) or
    15521553    (Kind = kEModels) then begin
     1554    sb.SetBorderSpacing(56, 10, 10);
    15531555    TitleHeight := WideFrame + 20;
    1554     sb.SetBorderSpacing(56, 10, 10);
    15551556  end else begin
     1557    sb.SetBorderSpacing(36, 10, 34);
    15561558    TitleHeight := WideFrame;
    1557     sb.SetBorderSpacing(36, 10, 34);
    15581559  end;
    15591560
     
    15761577    ClientHeight := InnerHeight + TitleHeight + NarrowFrame;
    15771578  end;
    1578   assert(ClientHeight <= hMaintexture);
     1579  assert(ClientHeight <= Maintexture.Height);
    15791580
    15801581  TechNameSpace := 224;
Note: See TracChangeset for help on using the changeset viewer.