Changeset 62 for trunk/Forms


Ignore:
Timestamp:
Jan 5, 2023, 10:14:31 PM (23 months ago)
Author:
chronos
Message:
  • Modified: Hide main menu in full screen mode.
  • Modified: Use colors as player names.
  • Modified: Use black background around player frames.
Location:
trunk/Forms
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.lfm

    r59 r62  
    11object FormMain: TFormMain
    22  Left = 692
    3   Height = 536
     3  Height = 617
    44  Top = 479
    5   Width = 668
     5  Width = 770
    66  Caption = 'Tunneler'
    7   ClientHeight = 506
    8   ClientWidth = 668
    9   DesignTimePPI = 125
     7  ClientHeight = 583
     8  ClientWidth = 770
     9  DesignTimePPI = 144
    1010  Menu = MainMenu1
    1111  OnClose = FormClose
     
    1919  object StatusBar1: TStatusBar
    2020    Left = 0
    21     Height = 24
    22     Top = 482
    23     Width = 668
     21    Height = 28
     22    Top = 555
     23    Width = 770
    2424    Panels = <   
    2525      item
    26         Width = 64
     26        Width = 74
    2727      end   
    2828      item
    29         Width = 64
     29        Width = 74
    3030      end   
    3131      item
    32         Width = 64
     32        Width = 74
    3333      end   
    3434      item
    35         Width = 64
     35        Width = 74
    3636      end   
    3737      item
    38         Width = 64
     38        Width = 74
    3939      end   
    4040      item
    41         Width = 64
     41        Width = 74
    4242      end   
    4343      item
    44         Width = 64
     44        Width = 74
    4545      end>
    4646    ParentFont = False
     
    5050  object Image1: TImage
    5151    Left = 0
    52     Height = 482
     52    Height = 555
    5353    Top = 0
    54     Width = 668
     54    Width = 770
    5555    Align = alClient
    5656    OnResize = Image1Resize
     
    5959    Interval = 50
    6060    OnTimer = TimerDrawTimer
    61     Left = 129
    62     Top = 66
     61    Left = 149
     62    Top = 76
    6363  end
    6464  object MainMenu1: TMainMenu
    65     Left = 240
    66     Top = 21
     65    Left = 276
     66    Top = 24
    6767    object MenuItem1: TMenuItem
    6868      Caption = 'Game'
     
    9292  object TimerEngineTick: TTimer
    9393    Interval = 20
    94     OnTimer = TimerEngineTickTimer
    95     Left = 125
    96     Top = 135
     94    Left = 144
     95    Top = 156
    9796  end
    9897  object ActionList1: TActionList
    99     Left = 375
    100     Top = 42
     98    Left = 432
     99    Top = 48
    101100    object AFullScreen: TAction
    102101      Caption = 'Fullscreen mode'
     
    132131    RootName = 'CONFIG'
    133132    ReadOnly = False
    134     Left = 129
    135     Top = 313
     133    Left = 149
     134    Top = 361
    136135  end
    137136  object AboutDialog1: TAboutDialog
     
    139138    ThemeManager = Core.ThemeManager1
    140139    ApplicationInfo = Core.ApplicationInfo
    141     Left = 267
    142     Top = 157
     140    Left = 308
     141    Top = 181
    143142  end
    144143end
  • trunk/Forms/UFormMain.pas

    r61 r62  
    5151    procedure Image1Resize(Sender: TObject);
    5252    procedure TimerDrawTimer(Sender: TObject);
    53     procedure TimerEngineTickTimer(Sender: TObject);
    5453  private
    5554    StartTime: TDateTime;
     
    5857    procedure LoadConfig;
    5958    procedure SaveConfig;
     59    procedure UpdateInterface;
    6060  public
    6161    PersistentForm: TPersistentForm;
     
    110110end;
    111111
    112 procedure TFormMain.TimerEngineTickTimer(Sender: TObject);
    113 begin
    114   //Engine.Tick;
    115 end;
    116 
    117112procedure TFormMain.LoadConfig;
    118113begin
     
    134129  ForceDirectories(ExtractFileDir(XMLConfig1.Filename));
    135130  XMLConfig1.Flush;
     131end;
     132
     133procedure TFormMain.UpdateInterface;
     134begin
     135  if FullScreenEnabled then Menu := nil
     136    else Menu := MainMenu1;
     137  {$IFDEF DEBUG}
     138  StatusBar1.Visible := not FullScreenEnabled;
     139  {$ENDIF}
    136140end;
    137141
     
    169173procedure TFormMain.FormDestroy(Sender: TObject);
    170174begin
     175  TimerDraw.Enabled := False;
    171176  FreeAndNil(PersistentForm);
    172177  FreeAndNil(Engine);
     
    177182  FullScreenEnabled := not FullScreenEnabled;
    178183  PersistentForm.SetFullScreen(FullScreenEnabled);
     184  UpdateInterface;
    179185end;
    180186
     
    238244  PersistentForm.Load(Self, False, True);
    239245  FullScreenEnabled := PersistentForm.FormFullScreen;
    240   {$IFDEF DEBUG}
    241   StatusBar1.Visible := True;
    242   {$ENDIF}
     246  UpdateInterface
    243247end;
    244248
Note: See TracChangeset for help on using the changeset viewer.