Line | |
---|
1 | unit UFormHelp;
|
---|
2 |
|
---|
3 | {$mode delphi}
|
---|
4 |
|
---|
5 | interface
|
---|
6 |
|
---|
7 | uses
|
---|
8 | Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls;
|
---|
9 |
|
---|
10 | type
|
---|
11 |
|
---|
12 | { TFormHelp }
|
---|
13 |
|
---|
14 | TFormHelp = class(TForm)
|
---|
15 | Memo1: TMemo;
|
---|
16 | procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
---|
17 | procedure FormCreate(Sender: TObject);
|
---|
18 | procedure FormShow(Sender: TObject);
|
---|
19 | private
|
---|
20 |
|
---|
21 | public
|
---|
22 |
|
---|
23 | end;
|
---|
24 |
|
---|
25 | var
|
---|
26 | FormHelp: TFormHelp;
|
---|
27 |
|
---|
28 | implementation
|
---|
29 |
|
---|
30 | {$R *.lfm}
|
---|
31 |
|
---|
32 | uses
|
---|
33 | UCore;
|
---|
34 |
|
---|
35 | resourcestring
|
---|
36 | SParagraph1 = '2048 is a single-player block sliding puzzle game.';
|
---|
37 | SParagraph2 = 'The game''s objective is to slide numbered tiles on a grid to combine them to create a tile with the number 2048.';
|
---|
38 | SControls = 'Use arrow keys to slide blocks to one of board side.';
|
---|
39 | SEveryTurn = 'Every turn, a new tile will randomly appear in an empty spot on the board with a value of either 2 or 4.';
|
---|
40 | SUndo = 'You can undo one move back, if undo action is enabled.';
|
---|
41 |
|
---|
42 | { TFormHelp }
|
---|
43 |
|
---|
44 | procedure TFormHelp.FormCreate(Sender: TObject);
|
---|
45 | begin
|
---|
46 | Core.Translator1.TranslateComponentRecursive(Self);
|
---|
47 | Core.ThemeManager1.UseTheme(Self);
|
---|
48 | end;
|
---|
49 |
|
---|
50 | procedure TFormHelp.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
---|
51 | begin
|
---|
52 | Core.PersistentForm1.Save(Self);
|
---|
53 | end;
|
---|
54 |
|
---|
55 | procedure TFormHelp.FormShow(Sender: TObject);
|
---|
56 | begin
|
---|
57 | Core.PersistentForm1.Load(Self);
|
---|
58 | Memo1.Text := SParagraph1 + LineEnding +
|
---|
59 | SParagraph2 + LineEnding +
|
---|
60 | SControls + LineEnding +
|
---|
61 | SEveryTurn + LineEnding +
|
---|
62 | SUndo + LineEnding +
|
---|
63 | '';
|
---|
64 | end;
|
---|
65 |
|
---|
66 | end.
|
---|
67 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.