Rev 9 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9 | Rev 21 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | 2 | ||
3 | interface |
3 | interface |
4 | 4 | ||
5 | uses |
5 | uses |
6 | Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, |
6 | Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, |
7 | Dialogs, StdCtrls, MMSystem, Math, ExtCtrls, Registry, Main; |
7 | Dialogs, StdCtrls, MMSystem, Math, ExtCtrls, Registry, LevelFunctions; |
8 | 8 | ||
9 | type |
9 | type |
10 | TFinishForm = class(TForm) |
10 | TFinishForm = class(TForm) |
11 | Label1: TLabel; |
11 | Label1: TLabel; |
12 | Label2: TLabel; |
12 | Label2: TLabel; |
Line 41... | Line 41... | ||
41 | FinishForm: TFinishForm; |
41 | FinishForm: TFinishForm; |
42 | 42 | ||
43 | implementation |
43 | implementation |
44 | 44 | ||
45 | uses |
45 | uses |
46 | History, Constants, LevelFunctions; |
46 | History, Constants; |
47 | 47 | ||
48 | {$R *.dfm} |
48 | {$R *.dfm} |
49 | 49 | ||
50 | procedure TFinishForm.CancelBtnClick(Sender: TObject); |
50 | procedure TFinishForm.CancelBtnClick(Sender: TObject); |
51 | begin |
51 | begin |
52 | Close; |
52 | Close; |
53 | end; |
53 | end; |
54 | 54 | ||
55 | function TFinishForm.Execute(LevelName: String; Score, StonesTotal, StonesRemoved, Seconds: Integer; GoalStatus: TGoalStatus; JumpHistory: TStringList): Integer; |
55 | function TFinishForm.Execute(LevelName: String; Score, StonesTotal, StonesRemoved, Seconds: Integer; GoalStatus: TGoalStatus; JumpHistory: TStringList): Integer; |
- | 56 | resourcestring |
|
- | 57 | LNG_SCORE = 'Score: %d'; |
|
- | 58 | LNG_REMAINING = 'Remaining stones: %d (%f%%)'; |
|
- | 59 | LNG_TIME_SECONDS = 'Time: %d seconds'; |
|
- | 60 | LNG_POINTS_PER_MINUTE = '%d points per minute'; |
|
- | 61 | LNG_GOAL_RED = 'Red stone in target field (%d points)'; |
|
- | 62 | LNG_GOAL_YELLOW = 'Yellow stone in target field (%d points)'; |
|
- | 63 | LNG_GOAL_GREEN = 'Green stone in target field (%d points)'; |
|
- | 64 | LNG_GOAL_MISSED = 'No stone in target field (%d points)'; |
|
56 | var |
65 | var |
57 | ExtraPoints: Integer; |
66 | ExtraPoints: Integer; |
58 | begin |
67 | begin |
59 | FLevel := LevelName; |
68 | FLevel := LevelName; |
60 | FScore := Score; |
69 | FScore := Score; |
Line 158... | Line 167... | ||
158 | reg.Free; |
167 | reg.Free; |
159 | end; |
168 | end; |
160 | end; |
169 | end; |
161 | 170 | ||
162 | procedure TFinishForm.SaveBtnClick(Sender: TObject); |
171 | procedure TFinishForm.SaveBtnClick(Sender: TObject); |
- | 172 | resourcestring |
|
- | 173 | LNG_ENTER_NAME = 'Please enter your name to get added to the high score lists.'; |
|
163 | begin |
174 | begin |
164 | if NameEdit.Text = '' then |
175 | if NameEdit.Text = '' then |
165 | begin |
176 | begin |
166 | MessageDlg(LNG_ENTER_NAME, mtWarning, [mbOk], 0); |
177 | MessageDlg(LNG_ENTER_NAME, mtWarning, [mbOk], 0); |
167 | NameEdit.SetFocus; |
178 | NameEdit.SetFocus; |