Changeset 111 for trunk/Game.pas


Ignore:
Timestamp:
Dec 10, 2024, 11:18:50 AM (12 days ago)
Author:
chronos
Message:
  • Fixed: Score box font size scaling.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Game.pas

    r108 r111  
    125125  DirectionText: array[TMoveDirection] of string = ('None', 'Left', 'Up', 'Right', 'Down');
    126126  InitialTileCount = 2;
     127  BoxFontSize = 20;
    127128
    128129resourcestring
     
    411412  MetaCanvas.FillRect(0, 0, MetaCanvas.Width, MetaCanvas.Height);
    412413
    413   TopBarHeight := ScaleY(55, 96);
    414   LeftBarWidth := ScaleY(90, 96);
     414  TopBarHeight := ScaleY(65, 96);
     415  LeftBarWidth := ScaleY(100, 96);
    415416  if CanvasSize.X - LeftBarWidth < Canvas.Height then begin
    416417    ControlsRect := Rect(0, 0, CanvasSize.X, TopBarHeight);
     
    641642  with Canvas do begin
    642643    Font.Color := Core.Core.ThemeManager1.Theme.ColorControlText;
    643     Font.Height := Trunc(24);
     644    Font.Height := Trunc(ScaleX(BoxFontSize, 96));
    644645
    645646    BoxSize := Size(TextWidth(Title), TextHeight(Title) + TextHeight(Value));
     
    656657    Brush.Style := bsClear;
    657658    Font.Color := Core.Core.ThemeManager1.Theme.ColorControlText;
    658     Font.Height := Trunc(24);
     659    Font.Height := Trunc(ScaleX(BoxFontSize, 96));
    659660    TextOut(Pos.X + (BoxSize.Width - TextWidth(Value)) div 2,
    660661      Pos.Y + TextHeight(Title), Value);
Note: See TracChangeset for help on using the changeset viewer.