Changeset 361 for branches/highdpi/LocalPlayer/Select.pas
- Timestamp:
- Apr 9, 2021, 5:56:50 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/LocalPlayer/Select.pas
r349 r361 112 112 Canvas.Font.Assign(UniFont[ftNormal]); 113 113 sb := TPVScrollbar.Create(Self); 114 sb.SetBorderSpacing(36, 10, 36); 114 115 sb.OnUpdate := ScrollBarUpdate; 115 InitButtons ();116 InitButtons; 116 117 Kind := kMission; 117 118 Layer0Btn.Hint := Phrases.Lookup('BTN_IMPRS'); … … 201 202 begin 202 203 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); 205 206 if pix and cpType = 0 then 206 207 if (pix and cpIndex = imPalace) and (MyRO.Government <> gAnarchy) then … … 230 231 if y + TextSize.cy >= TitleHeight + InnerHeight then 231 232 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); 234 235 end; 235 236 LoweredTextOut(ca, Color, MainTexture, x, y, s); … … 259 260 begin 260 261 x := x + SideFrame; 261 y := y + TitleHeight 262 y := y + TitleHeight; 262 263 end; 263 264 if lit then 264 TextColor := MainTexture. clLitText265 TextColor := MainTexture.ColorLitText 265 266 else 266 267 TextColor := -1; … … 433 434 end; 434 435 if lit then 435 TextColor := MainTexture. clLitText436 TextColor := MainTexture.ColorLitText 436 437 else 437 438 TextColor := -1; … … 555 556 begin 556 557 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); 558 559 Dump(offscreen, HGrSystem, (8 + 16), y0, 36, 20, 223, 295) 559 560 end … … 561 562 begin 562 563 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); 564 565 Dump(offscreen, HGrSystem, (8 + 16), y0, 36, 20, 260, 295) 565 566 end … … 567 568 begin 568 569 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); 570 571 Dump(offscreen, HGrSystem, (8 + 16), y0, 36, 20, 38, 295) 571 572 end … … 574 575 Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1, 575 576 (8 + 16 + xSizeSmall), y0 + ySizeSmall, 576 MainTexture. clBevelLight, MainTexture.clBevelShade);577 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 577 578 if AdvIcon[lix] < 84 then 578 579 DpiBitCanvas(offscreen.Canvas, (8 + 16), y0, xSizeSmall, … … 680 681 Frame(offscreen.Canvas, 8 + 16 - 1, y0 - 15 + (16 - 2), 681 682 8 + 16 + xSizeSmall, y0 - 15 + (16 - 1 + ySizeSmall), 682 MainTexture. clBevelLight, MainTexture.clBevelShade);683 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 683 684 DpiBitCanvas(offscreen.Canvas, 8 + 16, y0 - 15 + (16 - 1), 684 685 xSizeSmall, ySizeSmall, SmallImp.Canvas, … … 711 712 end; 712 713 if lit then 713 TextColor := MainTexture. clLitText714 TextColor := MainTexture.ColorLitText 714 715 else 715 716 TextColor := -1; … … 811 812 begin 812 813 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); 815 816 if ScienceNation >= 0 then 816 817 begin … … 828 829 ScienceNationDot.Height, Canvas, xScreen - 10, ClientHeight - 27); 829 830 ImageOp_BCC(ScienceNationDotBuffer, Templates.Data, Point(0, 0), 830 ScienceNationDot.BoundsRect, MainTexture. clBevelShade, Tribe[ScienceNation].Color);831 ScienceNationDot.BoundsRect, MainTexture.ColorBevelShade, Tribe[ScienceNation].Color); 831 832 DpiBitCanvas(Canvas, xScreen - 10, ClientHeight - 27, ScienceNationDot.Width, 832 833 ScienceNationDot.Height, ScienceNationDotBuffer.Canvas, 0, 0); … … 1531 1532 begin 1532 1533 LineDistance := 21; // looks ugly with scrollbar 1533 MaxLines := ( hMaintexture- (24 + TitleHeight + NarrowFrame))1534 MaxLines := (Maintexture.Height - (24 + TitleHeight + NarrowFrame)) 1534 1535 div LineDistance - 1; 1535 1536 end … … 1537 1538 begin 1538 1539 LineDistance := 24; 1539 MaxLines := ( hMaintexture- (24 + TitleHeight + WideFrame))1540 MaxLines := (Maintexture.Height - (24 + TitleHeight + WideFrame)) 1540 1541 div LineDistance - 1; 1541 1542 end; … … 1551 1552 if (Kind = kAdvance) and (MyData.FarTech <> adNone) or (Kind = kModels) or 1552 1553 (Kind = kEModels) then begin 1554 sb.SetBorderSpacing(56, 10, 10); 1553 1555 TitleHeight := WideFrame + 20; 1554 sb.SetBorderSpacing(56, 10, 10);1555 1556 end else begin 1557 sb.SetBorderSpacing(36, 10, 34); 1556 1558 TitleHeight := WideFrame; 1557 sb.SetBorderSpacing(36, 10, 34);1558 1559 end; 1559 1560 … … 1576 1577 ClientHeight := InnerHeight + TitleHeight + NarrowFrame; 1577 1578 end; 1578 assert(ClientHeight <= hMaintexture);1579 assert(ClientHeight <= Maintexture.Height); 1579 1580 1580 1581 TechNameSpace := 224;
Note:
See TracChangeset
for help on using the changeset viewer.