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/Draft.pas

    r349 r361  
    6868begin
    6969  inherited;
    70   InitButtons();
     70  InitButtons;
    7171  HelpContext := 'CLASSES';
    7272  Caption := Phrases.Lookup('TITLE_DRAFT');
     
    183183        Phrases.Lookup('UNITSPEED'));
    184184      DLine(offscreen.Canvas, xTotal - 2, xTotal + 174, y + 16,
    185         MainTexture.clBevelShade, MainTexture.clBevelLight);
     185        MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    186186      DLine(offscreen.Canvas, xTotal2 + 176, xTotal2 + 263, y + 16,
    187         MainTexture.clBevelShade, MainTexture.clBevelLight);
     187        MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    188188      s := MovementToString(MyRO.DevModel.Speed);
    189189      RisedTextOut(offscreen.Canvas, xTotal2 + 170 + 64 + 30 -
     
    199199        xTotal2 + 148 + 30, y, '=');
    200200      DLine(offscreen.Canvas, xTotal - 2, xTotal + 174, y + 16,
    201         MainTexture.clBevelShade, MainTexture.clBevelLight);
     201        MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    202202      DLine(offscreen.Canvas, xTotal2 + 176, xTotal2 + 263, y + 16,
    203         MainTexture.clBevelShade, MainTexture.clBevelLight);
     203        MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    204204      s := IntToStr(MyRO.DevModel.Cost);
    205205      RisedTextOut(offscreen.Canvas, xTotal2 + 170 + 64 + 30 - 12 -
     
    216216          xTotal2 + 148 + 30, y, '=');
    217217        DLine(offscreen.Canvas, xTotal - 2, xTotal + 174, y + 16,
    218           MainTexture.clBevelShade, MainTexture.clBevelLight);
     218          MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    219219        DLine(offscreen.Canvas, xTotal2 + 176, xTotal2 + 263, y + 16,
    220           MainTexture.clBevelShade, MainTexture.clBevelLight);
     220          MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    221221        s := IntToStr(MyRO.DevModel.Cost * BuildCostMod
    222222          [G.Difficulty[me]] div 12);
     
    236236
    237237  ClientHeight := Template.Height - Cut;
    238   if ClientHeight > hMainTexture then
     238  if ClientHeight > MainTexture.Height then
    239239  // assemble background from 2 texture tiles
    240240  begin
    241241    DpiBitCanvas(Back.Canvas, 0, 0, ClientWidth, 64,
    242       MainTexture.Image.Canvas, (wMainTexture - ClientWidth) div 2,
    243       hMainTexture - 64);
     242      MainTexture.Image.Canvas, (MainTexture.Width - ClientWidth) div 2,
     243      MainTexture.Height - 64);
    244244    DpiBitCanvas(Back.Canvas, 0, 64, ClientWidth, ClientHeight - 64,
    245       MainTexture.Image.Canvas, (wMainTexture - ClientWidth) div 2,
     245      MainTexture.Image.Canvas, (MainTexture.Width - ClientWidth) div 2,
    246246      0);
    247247  end
    248248  else
    249249    DpiBitCanvas(Back.Canvas, 0, 0, ClientWidth, ClientHeight,
    250       MainTexture.Image.Canvas, (wMainTexture - ClientWidth) div 2,
    251       (hMainTexture - ClientHeight) div 2);
     250      MainTexture.Image.Canvas, (MainTexture.Width - ClientWidth) div 2,
     251      (MainTexture.Height - ClientHeight) div 2);
    252252  ImageOp_B(Back, Template, 0, 0, 0, 0, Template.Width, 64);
    253253  ImageOp_B(Back, Template, 0, 64, 0, 64 + Cut, Template.Width,
     
    320320            RFrame(offscreen.Canvas, xFeature - (21 + 1),
    321321              yFeature + 2 + LinePitch * i - 1, xFeature - (21 - 24),
    322               yFeature + 2 + LinePitch * i + 12, MainTexture.clBevelShade,
    323               MainTexture.clBevelLight);
     322              yFeature + 2 + LinePitch * i + 12, MainTexture.ColorBevelShade,
     323              MainTexture.ColorBevelLight);
    324324          end
    325325          else
     
    329329            RFrame(offscreen.Canvas, xFeature - (9 + 1),
    330330              yFeature + 2 + LinePitch * i - 1, xFeature - (21 - 24),
    331               yFeature + 2 + LinePitch * i + 12, MainTexture.clBevelShade,
    332               MainTexture.clBevelLight);
     331              yFeature + 2 + LinePitch * i + 12, MainTexture.ColorBevelShade,
     332              MainTexture.ColorBevelLight);
    333333          end;
    334334
     
    362362
    363363        if MyRO.DevModel.Cap[code[i]] > 0 then
    364           TextColor := MainTexture.clLitText
     364          TextColor := MainTexture.ColorLitText
    365365        else
    366366          TextColor := -1;
Note: See TracChangeset for help on using the changeset viewer.