Changeset 86 for trunk/Game.pas


Ignore:
Timestamp:
Jun 7, 2024, 12:47:11 PM (5 months ago)
Author:
chronos
Message:
  • Modified: Remove U prefix from unit names.
  • Modified: Used TFormEx for all forms for code simplification.
  • Fixed: Fullscreen mode switching error.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Game.pas

    r85 r86  
    1 unit UGame;
    2 
    3 {$mode delphi}{$H+}
     1unit Game;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, Dialogs, fgl, Graphics, Types, Forms, Math, DateUtils,
     6  Classes, SysUtils, Dialogs, Generics.Collections, Graphics, Types, Forms, Math, DateUtils,
    97  Controls, RegistryEx;
    108
     
    2624  end;
    2725
    28   TTiles = class(TFPGObjectList<TTile>)
     26  TTiles = class(TObjectList<TTile>)
    2927  end;
    3028
     
    5048  { THistoryMoves }
    5149
    52   THistoryMoves = class(TFPGObjectList<THistoryMove>)
     50  THistoryMoves = class(TObjectList<THistoryMove>)
    5351    procedure SaveToRegistry(Reg: TRegistryEx; RegContext: TRegistryContext);
    5452    procedure LoadFromRegistry(Reg: TRegistryEx; RegContext: TRegistryContext);
     
    166164  end;
    167165
    168   TGames = class(TFPGObjectList<TGame>)
     166  TGames = class(TObjectList<TGame>)
    169167  end;
    170168
     
    196194
    197195uses
    198   UCore, MetaCanvas;
     196  Core, MetaCanvas;
    199197
    200198procedure Translate;
     
    627625  TopBarHeight := ScaleY(24, 96);
    628626  MetaCanvas.Brush.Style := bsSolid;
    629   MetaCanvas.Brush.Color := Core.ThemeManager1.Theme.ColorControl;
     627  MetaCanvas.Brush.Color := Core.Core.ThemeManager1.Theme.ColorControl;
    630628  MetaCanvas.FillRect(0, 0, MetaCanvas.Width, MetaCanvas.Height);
    631629
    632630  ValueStr := SScore + ': ' + IntToStr(Score);
    633631  MetaCanvas.Brush.Style := bsClear;
    634   MetaCanvas.Font.Color := Core.ThemeManager1.Theme.ColorControlText;
     632  MetaCanvas.Font.Color := Core.Core.ThemeManager1.Theme.ColorControlText;
    635633  MetaCanvas.Font.Height := Trunc(TopBarHeight * 0.7);
    636634  MetaCanvas.TextOut(ScaleY(16, 96), (TopBarHeight - MetaCanvas.TextHeight(ValueStr)) div 2, ValueStr);
    637635
    638636  ValueStr := STopScore + ': ' + IntToStr(TopScore);
    639   MetaCanvas.Font.Color := Core.ThemeManager1.Theme.ColorControlText;
     637  MetaCanvas.Font.Color := Core.Core.ThemeManager1.Theme.ColorControlText;
    640638  MetaCanvas.Font.Height := Trunc(TopBarHeight * 0.7);
    641639  MetaCanvas.TextOut(ScaleY(136, 96), (TopBarHeight - MetaCanvas.TextHeight(ValueStr)) div 2, ValueStr);
     
    12321230function TGame.GetTileColor(Value: Integer): TColor;
    12331231begin
    1234   if Core.ThemeManager1.Theme.Name = 'Dark' then begin
     1232  if Core.Core.ThemeManager1.Theme.Name = 'Dark' then begin
    12351233    case Value of
    12361234      0: Result := $222629;
Note: See TracChangeset for help on using the changeset viewer.