Changeset 62


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
Files:
8 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
  • trunk/Languages/Tunneler.cs.po

    r61 r62  
    161161msgstr "Ovládání"
    162162
     163#: uengine.sblue
     164msgid "Blue"
     165msgstr "Modrá"
     166
     167#: uengine.scyan
     168msgid "Cyan"
     169msgstr "Tyrkysová"
     170
    163171#: uengine.sexit
    164172msgctxt "uengine.sexit"
     
    166174msgstr "Odejít"
    167175
     176#: uengine.sgray
     177msgid "Gray"
     178msgstr "Å edá"
     179
     180#: uengine.sgreen
     181msgid "Green"
     182msgstr "Zelená"
     183
    168184#: uengine.sinformation
    169185msgid "Information"
     
    173189msgid "Instructions"
    174190msgstr "Instrukce"
     191
     192#: uengine.sorange
     193msgid "Orange"
     194msgstr "OranÅŸová"
     195
     196#: uengine.spink
     197msgid "Pink"
     198msgstr "Růşová"
    175199
    176200#: uengine.splayer
     
    183207msgstr "Stiskni ESC pro pokračování"
    184208
     209#: uengine.sred
     210msgid "Red"
     211msgstr "Červená"
     212
    185213#: uengine.sround
    186214msgid "Round"
     
    206234msgid "World ready"
    207235msgstr "Svět připraven"
     236
     237#: uengine.syellow
     238msgid "Yellow"
     239msgstr "Åœlutá"
    208240
    209241#: uformmain.sround
  • trunk/Languages/Tunneler.pot

    r61 r62  
    125125msgstr ""
    126126
     127#: uengine.sblue
     128msgid "Blue"
     129msgstr ""
     130
     131#: uengine.scyan
     132msgid "Cyan"
     133msgstr ""
     134
    127135#: uengine.sexit
    128136msgctxt "uengine.sexit"
     
    130138msgstr ""
    131139
     140#: uengine.sgray
     141msgid "Gray"
     142msgstr ""
     143
     144#: uengine.sgreen
     145msgid "Green"
     146msgstr ""
     147
    132148#: uengine.sinformation
    133149msgid "Information"
     
    138154msgstr ""
    139155
     156#: uengine.sorange
     157msgid "Orange"
     158msgstr ""
     159
     160#: uengine.spink
     161msgid "Pink"
     162msgstr ""
     163
    140164#: uengine.splayer
    141165msgid "Player"
     
    146170msgstr ""
    147171
     172#: uengine.sred
     173msgid "Red"
     174msgstr ""
     175
    148176#: uengine.sround
    149177msgid "Round"
     
    168196#: uengine.sworldready
    169197msgid "World ready"
     198msgstr ""
     199
     200#: uengine.syellow
     201msgid "Yellow"
    170202msgstr ""
    171203
  • trunk/UEngine.pas

    r61 r62  
    276276  SShotsFired = 'Shot fired';
    277277  SWinnerIs = 'The winner is';
     278  SGreen = 'Green';
     279  SBlue = 'Blue';
     280  SRed = 'Red';
     281  SPink = 'Pink';
     282  SCyan = 'Cyan';
     283  SYellow = 'Yellow';
     284  SOrange = 'Orange';
     285  SGray = 'Gray';
    278286
    279287{ TTanks }
     
    12091217        Text := Name + ': ' + IntToStr(Score);
    12101218        TextOut((Bitmap.Width - TextWidth(Text)) div 2, Bitmap.Height div 5 * 2 + Y, Text);
    1211         Inc(Y, 50);
     1219        Inc(Y, 60);
    12121220      end;
    12131221    end;
     
    13391347  PlayerPool.Clear;
    13401348  with PlayerPool.AddNew do begin
     1349    Name := SGreen;
    13411350    Keys.Left := 65;
    13421351    Keys.Down := 83;
     
    13491358  end;
    13501359  with PlayerPool.AddNew do begin
     1360    Name := SBlue;
    13511361    Keys.Left := 37;
    13521362    Keys.Down := 40;
     
    13591369  end;
    13601370  with PlayerPool.AddNew do begin
     1371    Name := SRed;
    13611372    Keys.Left := 76;
    13621373    Keys.Down := 147;
     
    13681379  end;
    13691380  with PlayerPool.AddNew do begin
     1381    Name := SPink;
    13701382    Keys.Left := 100;
    13711383    Keys.Down := 98;
     
    13771389  end;
    13781390  with PlayerPool.AddNew do begin
     1391    Name := SCyan;
    13791392    Keys.Left := 0;
    13801393    Keys.Down := 0;
     
    13861399  end;
    13871400  with PlayerPool.AddNew do begin
     1401    Name := SYellow;
    13881402    Keys.Left := 0;
    13891403    Keys.Down := 0;
     
    13951409  end;
    13961410  with PlayerPool.AddNew do begin
     1411    Name := SOrange;
    13971412    Keys.Left := 0;
    13981413    Keys.Down := 0;
     
    14041419  end;
    14051420  with PlayerPool.AddNew do begin
     1421    Name := SGray;
    14061422    Keys.Left := 0;
    14071423    Keys.Down := 0;
     
    14171433    Id := I;
    14181434    InitTanks;
    1419     Name := SPlayer + ' ' + IntToStr(I + 1);
    14201435    if I < 2 then Enabled := True;
    14211436  end;
     
    15591574    FBitmapLower.Count := OldCount;
    15601575
    1561     if FClearBackground then FBitmapLower.FillAll(clNavy);
     1576    if FClearBackground then FBitmapLower.FillAll(World.Matters[Integer(miBorder)].Color);
    15621577    for I := 0 to Players.Count - 1 do
    15631578    if Players[I].Enabled then begin
  • trunk/UMatter.pas

    r61 r62  
    1111
    1212  TMatterIndex = (miSpace, miDirt1, miDirt2, miRock, miBullet1, miBullet2, miBorder,
    13       miPlayer1Cannon, miPlayer1Home, miPlayer1TankBody, miPlayer1TankBody2,
    14       miPlayer2Cannon, miPlayer2Home, miPlayer2TankBody, miPlayer2TankBody2,
    15       miPlayer3Cannon, miPlayer3Home, miPlayer3TankBody, miPlayer3TankBody2,
    16       miPlayer4Cannon, miPlayer4Home, miPlayer4TankBody, miPlayer4TankBody2,
    17       miPlayer5Cannon, miPlayer5Home, miPlayer5TankBody, miPlayer5TankBody2,
    18       miPlayer6Cannon, miPlayer6Home, miPlayer6TankBody, miPlayer6TankBody2,
    19       miPlayer7Cannon, miPlayer7Home, miPlayer7TankBody, miPlayer7TankBody2,
    20       miPlayer8Cannon, miPlayer8Home, miPlayer8TankBody, miPlayer8TankBody2);
     13    miPlayer1Cannon, miPlayer1Home, miPlayer1TankBody, miPlayer1TankBody2,
     14    miPlayer2Cannon, miPlayer2Home, miPlayer2TankBody, miPlayer2TankBody2,
     15    miPlayer3Cannon, miPlayer3Home, miPlayer3TankBody, miPlayer3TankBody2,
     16    miPlayer4Cannon, miPlayer4Home, miPlayer4TankBody, miPlayer4TankBody2,
     17    miPlayer5Cannon, miPlayer5Home, miPlayer5TankBody, miPlayer5TankBody2,
     18    miPlayer6Cannon, miPlayer6Home, miPlayer6TankBody, miPlayer6TankBody2,
     19    miPlayer7Cannon, miPlayer7Home, miPlayer7TankBody, miPlayer7TankBody2,
     20    miPlayer8Cannon, miPlayer8Home, miPlayer8TankBody, miPlayer8TankBody2);
    2121
    2222  { TMatter }
  • trunk/UWorld.pas

    r61 r62  
    8989  with Matters.AddNew do begin
    9090    Kind := mkBorder;
    91     Color := clNavy;
     91    Color := clBlack;
    9292    Player := -1;
    9393  end;
  • trunk/tunneler.lpi

    r61 r62  
    203203    <Linking>
    204204      <Debugging>
     205        <DebugInfoType Value="dsDwarf2Set"/>
    205206        <UseHeaptrc Value="True"/>
    206207        <UseExternalDbgSyms Value="True"/>
Note: See TracChangeset for help on using the changeset viewer.