-
Notifications
You must be signed in to change notification settings - Fork 3
/
Settings.pas
75 lines (63 loc) · 1.81 KB
/
Settings.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
unit Settings;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, ComCtrls;
type
TFormSet = class(TForm)
ButtonClose: TButton;
LabelDif: TLabel;
TrackBarDif: TTrackBar;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
CheckBoxMix: TCheckBox;
Bevel1: TBevel;
LabelDifV: TLabel;
ComboBoxGType: TComboBox;
LabelGameType: TLabel;
procedure ButtonCloseClick(Sender: TObject);
procedure TrackBarDifChange(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure CheckBoxMixClick(Sender: TObject);
procedure ComboBoxGTypeChange(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FormSet: TFormSet;
Showed:Boolean;
implementation
{$R *.dfm}
uses Main;
procedure TFormSet.ButtonCloseClick(Sender: TObject);
begin
if TrackBarDif.Position <> ((Game.Scatter - 10) div 50) then
if MessageBox(0, 'Íà÷àòü èãðó ñ íîâûì óðîâíåì ñëîæíîñòè?', '', MB_ICONINFORMATION or MB_YESNO) = ID_YES then
begin
Game.Scatter:=(TrackBarDif.Position*50)+10;
Game.New(True);
end;
Close;
end;
procedure TFormSet.TrackBarDifChange(Sender: TObject);
begin
LabelDifV.Caption:=IntToStr((TrackBarDif.Position*50)+10)+', ñåé÷àñ: '+IntToStr(Game.Scatter);
end;
procedure TFormSet.FormShow(Sender: TObject);
begin
TrackBarDif.Position:=((Game.Scatter - 10) div 50);
//CheckBoxMix.Checked:=Game.ShowScatter;
ComboBoxGType.ItemIndex:=Ord(Game.GameType);
end;
procedure TFormSet.CheckBoxMixClick(Sender: TObject);
begin
//Game.ShowScatter:=CheckBoxMix.Checked;
end;
procedure TFormSet.ComboBoxGTypeChange(Sender: TObject);
begin
Game.GameType:=TGameType(ComboBoxGType.ItemIndex);
end;
end.