forked from JernejL/samp-map-editor
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathu_showcode.pas
73 lines (60 loc) · 1.54 KB
/
u_showcode.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
unit u_showcode;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, ExtCtrls;
type
Twnd_showcode = class(TForm)
readwriter: TMemo;
SaveDialog1: TSaveDialog;
Panel5: TPanel;
Image4: TImage;
btn_export: TSpeedButton;
CheckBox1: TRadioButton;
RadioButton1: TRadioButton;
CDO: TRadioButton;
lin_cars: TMemo;
Splitter1: TSplitter;
CheckBox2: TCheckBox;
brn_rgen: TSpeedButton;
RadioButton2: TRadioButton;
procedure btn_exportClick(Sender: TObject);
procedure CheckBox1Click(Sender: TObject);
procedure brn_rgenClick(Sender: TObject);
procedure CheckBox2Click(Sender: TObject);
procedure RadioButton2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
wnd_showcode: Twnd_showcode;
implementation
uses u_edit;
{$R *.dfm}
procedure Twnd_showcode.btn_exportClick(Sender: TObject);
begin
if SaveDialog1.execute = false then exit;
readwriter.lines.AddStrings(lin_cars.Lines);
readwriter.lines.SaveToFile(changefileext(SaveDialog1.filename, '.pwn'));
gtaeditor.gencode()
end;
procedure Twnd_showcode.CheckBox1Click(Sender: TObject);
begin
wnd_showcode.readwriter.lines.clear;
gtaeditor.gencode()
end;
procedure Twnd_showcode.brn_rgenClick(Sender: TObject);
begin
gtaeditor.gencode()
end;
procedure Twnd_showcode.CheckBox2Click(Sender: TObject);
begin
gtaeditor.gencode()
end;
procedure Twnd_showcode.RadioButton2Click(Sender: TObject);
begin
gtaeditor.gencode()
end;
end.