Changeset 33 for trunk/UCore.pas


Ignore:
Timestamp:
Mar 5, 2014, 12:01:04 AM (11 years ago)
Author:
chronos
Message:
  • Added: Main application settings form.
  • Added: CoolTranslator component for interface localization.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UCore.pas

    r32 r33  
    66
    77uses
    8   Classes, SysUtils, FileUtil, ActnList, Controls, Dialogs, Forms, UGame;
     8  Classes, SysUtils, FileUtil, ActnList, Controls, Dialogs, Forms, UGame,
     9  UCoolTranslator;
    910
    1011type
     
    1314
    1415  TCore = class(TDataModule)
     16    ASettings: TAction;
    1517    ActionList1: TActionList;
    1618    AExit: TAction;
     
    1921    AGameNew: TAction;
    2022    AGameRestart: TAction;
     23    CoolTranslator1: TCoolTranslator;
    2124    ImageList1: TImageList;
    2225    procedure AExitExecute(Sender: TObject);
     
    2528    procedure AGameNewExecute(Sender: TObject);
    2629    procedure AGameRestartExecute(Sender: TObject);
     30    procedure ASettingsExecute(Sender: TObject);
     31    procedure CoolTranslator1Translate(Sender: TObject);
    2732    procedure DataModuleCreate(Sender: TObject);
    2833    procedure DataModuleDestroy(Sender: TObject);
     
    4954
    5055uses
    51   UFormMove, UFormMain, UFormNew;
     56  UFormMove, UFormMain, UFormNew, UFormSettings;
    5257
    5358resourcestring
     
    125130end;
    126131
     132procedure TCore.ASettingsExecute(Sender: TObject);
     133begin
     134  FormSettings.Load;
     135  if FormSettings.ShowModal = mrOk then
     136    FormSettings.Save;
     137end;
     138
     139procedure TCore.CoolTranslator1Translate(Sender: TObject);
     140begin
     141  UGame.InitStrings;
     142end;
     143
    127144procedure TCore.DataModuleCreate(Sender: TObject);
    128145begin
Note: See TracChangeset for help on using the changeset viewer.