summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: caaa041)
raw | patch | inline | side by side (parent: caaa041)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Mon, 29 May 2023 18:53:55 +0000 (21:53 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Mon, 29 May 2023 18:53:55 +0000 (21:53 +0300) |
diff --git a/lang/editor.ru_RU.lng b/lang/editor.ru_RU.lng
index 76d05ab24dba666299448c10bf81d5947ed72011..8f61b974bd1a1a0fa8fae09c748f70d49c66f4c9 100644 (file)
--- a/lang/editor.ru_RU.lng
+++ b/lang/editor.ru_RU.lng
@@ -1224,6 +1224,12 @@ g_language.MsgFileFilterAll$ = "Doom 2D: Forever Maps (*.dfz, *.dfzip, *.zip, *.
g_language.MsgFileFilterAll = "Карты Doom 2D: Forever (*.dfz, *.dfzip, *.zip, *.wad)|*.dfz;*.dfzip;*.zip;*.wad|Старые карты Doom 2D: Forever 0.30 (*.ini)|*.ini|Все файлы (*.*)|*.*"
g_language.MsgFileFilterWad$ = "Doom 2D: Forever Maps (*.dfz)|*.dfz|Doom 2D: Forever Maps (*.dfzip)|*.dfzip|Doom 2D: Forever Maps (*.zip)|*.zip|Doom 2D: Forever Maps (*.wad)|*.wad|All Files (*.*)|*.*"
g_language.MsgFileFilterWad = "Карты Doom 2D: Forever (*.dfz)|*.dfz|Карты Doom 2D: Forever (*.dfzip)|*.dfzip|Карты Doom 2D: Forever (*.zip)|*.zip|Карты Doom 2D: Forever (*.wad)|*.wad|Все файлы (*.*)|*.*"
+g_language.MsgFileFilterExeMac$ = "Doom 2D Forever.app|*.app|Doom 2D Forever (Unix Executable)|Doom2DF;*"
+g_language.MsgFileFilterExeMac = "Doom 2D Forever.app|*.app|Doom 2D Forever (Исполняемый файл)|Doom2DF;*"
+g_language.MsgFileFilterExeWin$ = "Doom2DF.exe|Doom2DF.exe;*.exe"
+g_language.MsgFileFilterExeWin = "Doom2DF.exe|Doom2DF.exe;*.exe"
+g_language.MsgFileFilterExeUnix$ = "Doom2DF|Doom2DF;*"
+g_language.MsgFileFilterExeUnix = "Doom2DF|Doom2DF;*"
g_language.MsgEditorTitle$ = "Doom 2D: Forever Map Editor"
g_language.MsgEditorTitle = "Редактор карт Doom 2D: Forever"
diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas
index 591b7e060f9405b89d54aadc8fc1791189bb3ca1..69f29d3e4efaaa098f8a0b699664f4c7691a91fa 100644 (file)
--- a/src/editor/f_main.pas
+++ b/src/editor/f_main.pas
gAlphaTriggerArea := ALPHA_AREA;
gAlphaMonsterRect := config.ReadInt('Editor', 'MonsterRectAlpha', 0);
gAlphaAreaRect := config.ReadInt('Editor', 'AreaRectAlpha', 0);
- if config.ReadInt('Editor', 'Scale', 0) = 1 then
- Scale := 2
- else
- Scale := 1;
- if config.ReadInt('Editor', 'DotSize', 0) = 1 then
- DotSize := 2
- else
- DotSize := 1;
+ Scale := Max(config.ReadInt('Editor', 'Scale', 1), 1);
+ DotSize := Max(config.ReadInt('Editor', 'DotSize', 1), 1);
OpenDialog.InitialDir := config.ReadStr('Editor', 'LastOpenDir', MapsDir);
SaveDialog.InitialDir := config.ReadStr('Editor', 'LastSaveDir', MapsDir);
index a2ff37d5f1b3696828d4751f862d57dc4023a029..0a3eca32107fe2c3f30ee1a89ea02cc5c2193a7b 100644 (file)
--- a/src/editor/f_options.lfm
+++ b/src/editor/f_options.lfm
object OptionsForm: TOptionsForm
- Left = 1164
+ Left = 98
Height = 360
- Top = 677
+ Top = 345
Width = 640
BorderIcons = [biSystemMenu]
BorderStyle = bsSingle
Width = 624
ActivePage = TabGeneral
TabIndex = 0
- TabOrder = 2
+ TabOrder = 0
+ Options = [nboKeyboardTabSwitch, nboDoChangeOnSetIndex]
object TabGeneral: TTabSheet
Caption = 'General'
ClientHeight = 284
Caption = 'Использовать шахматку'
Checked = True
State = cbChecked
- TabOrder = 8
+ TabOrder = 3
end
object LabelGrid: TLabel
Left = 8
Caption = 'Шаги сетки:'
ParentColor = False
end
- object eDotStepOne: TEdit
+ object SpinEdit1: TSpinEdit
Left = 8
Height = 22
Top = 128
- Width = 57
- TabOrder = 3
- Text = '16'
- end
- object UpDown1: TUpDown
- Left = 65
- Height = 22
- Top = 128
- Width = 12
- Associate = eDotStepOne
- Max = 2048
- Min = 4
- Position = 16
+ Width = 50
+ MaxValue = 2048
+ MinValue = 4
TabOrder = 4
+ Value = 16
end
- object eDotStepTwo: TEdit
+ object SpinEdit2: TSpinEdit
Left = 8
Height = 22
Top = 152
- Width = 57
+ Width = 50
+ MaxValue = 2048
+ MinValue = 4
TabOrder = 5
- Text = '8'
- end
- object UpDown2: TUpDown
- Left = 65
- Height = 22
- Top = 152
- Width = 12
- Associate = eDotStepTwo
- Max = 2048
- Min = 4
- Position = 8
- TabOrder = 6
+ Value = 8
end
object LabelGridSize: TLabel
Left = 8
ParentColor = False
WordWrap = True
end
- object cbDotSize: TComboBox
+ object SpinEdit4: TSpinEdit
Left = 8
- Height = 25
+ Height = 22
Top = 200
- Width = 73
- ItemHeight = 0
- ItemIndex = 0
- Items.Strings = (
- '1'
- '2'
- )
- TabOrder = 7
- Text = '1'
+ Width = 50
+ MaxValue = 2
+ MinValue = 1
+ TabOrder = 6
+ Value = 1
end
object LabelMinimap: TLabel
Left = 8
Height = 14
- Top = 240
+ Top = 232
Width = 128
Caption = 'Масштаб мини-карты:'
ParentColor = False
end
- object cbScale: TComboBox
+ object SpinEdit5: TSpinEdit
Left = 8
- Height = 23
- Top = 256
- Width = 70
- ItemHeight = 0
- ItemIndex = 0
- Items.Strings = (
- '1x'
- '2x'
- )
- Style = csDropDownList
- TabOrder = 9
- Text = '1x'
+ Height = 22
+ Top = 248
+ Width = 50
+ MaxValue = 10
+ MinValue = 1
+ TabOrder = 7
+ Value = 1
end
object LabelGridCol: TLabel
Left = 304
Caption = 'Цвет сетки:'
ParentColor = False
end
- object sDotColor: TShape
+ object ColorButton1: TColorButton
Left = 304
Height = 25
Top = 24
- Width = 56
- end
- object bGrid: TButton
- Left = 360
- Height = 25
- Top = 24
- Width = 11
- Caption = '..'
- OnClick = bGridClick
- TabOrder = 10
+ Width = 75
+ BorderWidth = 2
+ ButtonColorSize = 16
+ ButtonColor = clRed
end
object LabelBack: TLabel
Left = 304
Caption = 'Цвет фона:'
ParentColor = False
end
- object sBackColor: TShape
+ object ColorButton2: TColorButton
Left = 304
Height = 25
Top = 80
- Width = 56
- Brush.Color = clBlack
- end
- object bBack: TButton
- Left = 360
- Height = 25
- Top = 80
- Width = 11
- Caption = '..'
- OnClick = bBackClick
- TabOrder = 11
+ Width = 75
+ BorderWidth = 2
+ ButtonColorSize = 16
+ ButtonColor = clLime
end
object LabelPreview: TLabel
Left = 304
ParentColor = False
WordWrap = True
end
- object sPreviewColor: TShape
+ object ColorButton3: TColorButton
Left = 304
Height = 25
Top = 136
- Width = 56
- Brush.Color = clBlack
- end
- object bPreview: TButton
- Left = 360
- Height = 25
- Top = 136
- Width = 11
- Caption = '..'
- OnClick = bPreviewClick
- TabOrder = 12
+ Width = 75
+ BorderWidth = 2
+ ButtonColorSize = 16
+ ButtonColor = clBlue
end
object LabelLanguage: TLabel
Left = 304
Width = 120
ItemHeight = 0
Style = csDropDownList
- TabOrder = 13
+ TabOrder = 8
end
end
object TabFiles: TTabSheet
Top = 8
Width = 208
Caption = 'Сжимать архив при сохранении'
- TabOrder = 2
+ TabOrder = 0
end
object cbBackup: TCheckBox
Left = 8
Top = 32
Width = 218
Caption = 'Резервная копия при сохранении'
- TabOrder = 3
+ TabOrder = 1
end
object LabelRecent: TLabel
Left = 8
ParentColor = False
WordWrap = True
end
- object eRecent: TEdit
+ object SpinEdit3: TSpinEdit
Left = 8
Height = 22
Top = 80
- Width = 57
- TabOrder = 0
- Text = '5'
- end
- object UpDown3: TUpDown
- Left = 65
- Height = 22
- Top = 80
- Width = 12
- Associate = eRecent
- Max = 10
- Min = 2
- Position = 5
- TabOrder = 1
+ Width = 50
+ MaxValue = 10
+ MinValue = 2
+ TabOrder = 2
+ Value = 2
end
end
object TabTesting: TTabSheet
Caption = 'Путь к Doom2DF.exe:'
ParentColor = False
end
- object edD2dexe: TEdit
+ object ExeEdit: TFileNameEdit
Left = 8
Height = 22
Top = 24
- Width = 296
- TabOrder = 12
+ Width = 328
+ FileName = 'Doom2DF.exe'
+ DialogOptions = [ofNoChangeDir, ofDontAddToRecent, ofViewDetail]
+ FilterIndex = 0
+ HideDirectories = False
+ ButtonWidth = 23
+ NumGlyphs = 1
+ MaxLength = 0
+ TabOrder = 0
Text = 'Doom2DF.exe'
end
- object bChooseD2d: TButton
- Left = 304
- Height = 22
- Top = 24
- Width = 25
- Caption = '...'
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = [fsBold]
- OnClick = bChooseD2dClick
- ParentFont = False
- TabOrder = 13
- end
object LabelArgs: TLabel
Left = 8
Height = 14
Left = 8
Height = 22
Top = 72
- Width = 296
- TabOrder = 14
+ Width = 301
+ TabOrder = 1
end
object rbDM: TRadioButton
Left = 8
Width = 91
Caption = 'Deathmatch'
Checked = True
- TabOrder = 0
+ TabOrder = 2
TabStop = True
end
object rbTDM: TRadioButton
Top = 120
Width = 124
Caption = 'Team Deathmatch'
- TabOrder = 1
+ TabOrder = 3
end
object rbCTF: TRadioButton
Left = 8
Top = 136
Width = 114
Caption = 'Capture the Flag'
- TabOrder = 2
+ TabOrder = 4
end
object rbCOOP: TRadioButton
Left = 8
Top = 152
Width = 92
Caption = 'Cooperative'
- TabOrder = 3
+ TabOrder = 5
end
object cbTwoPlayers: TCheckBox
Left = 168
Top = 104
Width = 89
Caption = 'Два игрока'
- TabOrder = 4
+ TabOrder = 6
end
object cbTeamDamage: TCheckBox
Left = 168
Top = 120
Width = 141
Caption = 'Урон своей команде'
- TabOrder = 5
+ TabOrder = 7
end
object cbAllowExit: TCheckBox
Left = 168
Caption = 'Выход из уровня'
Checked = True
State = cbChecked
- TabOrder = 6
+ TabOrder = 8
end
object cbWeaponStay: TCheckBox
Left = 168
Top = 152
Width = 125
Caption = 'Оружие остается'
- TabOrder = 7
+ TabOrder = 9
end
object cbMonstersDM: TCheckBox
Left = 168
Top = 168
Width = 103
Caption = 'Монстры в DM'
- TabOrder = 8
+ TabOrder = 10
end
object LabelTime: TLabel
Left = 8
Height = 22
Top = 200
Width = 49
- TabOrder = 9
+ TabOrder = 11
Text = '0'
end
object LabelSecs: TLabel
Height = 22
Top = 223
Width = 49
- TabOrder = 10
+ TabOrder = 12
Text = '0'
end
object cbMapOnce: TCheckBox
Top = 256
Width = 241
Caption = 'Закрыть игру после выхода из карты'
- TabOrder = 11
+ TabOrder = 13
end
end
end
Caption = 'ОК'
Default = True
OnClick = bOKClick
- TabOrder = 0
+ TabOrder = 1
end
object bCancel: TButton
Left = 557
Cancel = True
Caption = 'Отмена'
OnClick = bCancelClick
- TabOrder = 1
- end
- object ColorDialog: TColorDialog
- Color = clBlack
- CustomColors.Strings = (
- 'ColorA=000000'
- 'ColorB=000080'
- 'ColorC=008000'
- 'ColorD=008080'
- 'ColorE=800000'
- 'ColorF=800080'
- 'ColorG=808000'
- 'ColorH=808080'
- 'ColorI=C0C0C0'
- 'ColorJ=0000FF'
- 'ColorK=00FF00'
- 'ColorL=00FFFF'
- 'ColorM=FF0000'
- 'ColorN=FF00FF'
- 'ColorO=FFFF00'
- 'ColorP=FFFFFF'
- 'ColorQ=C0DCC0'
- 'ColorR=F0CAA6'
- 'ColorS=F0FBFF'
- 'ColorT=A4A0A0'
- )
- left = 568
- top = 264
- end
- object FindD2dDialog: TOpenDialog
- Title = 'Выберите файл игры Doom 2D: Forever'
- DefaultExt = '.exe'
- Filter = 'Doom2DF.exe|Doom2DF.exe;Doom2DF'
- Options = [ofHideReadOnly, ofNoChangeDir, ofEnableSizing]
- left = 472
- top = 264
+ TabOrder = 2
end
end
index aebf686a6d997e511dd08db58578fb4b8e4d7f3f..fe05e20f2e5a964b59a9d6b649a34c5079f0aa46 100644 (file)
--- a/src/editor/f_options.pas
+++ b/src/editor/f_options.pas
uses
LCLIntf, LCLType, SysUtils, Variants, Classes,
Graphics, Controls, Forms, Dialogs, StdCtrls,
- ExtCtrls, ComCtrls, ActnList, Registry, Math, Types;
+ ExtCtrls, ComCtrls, ActnList, Spin, EditBtn, Registry, Math, Types;
type
TOptionsForm = class (TForm)
bOK: TButton;
bCancel: TButton;
+ cbAllowExit: TCheckBox;
+ cbBackup: TCheckBox;
cbCheckerboard: TCheckBox;
cbCompress: TCheckBox;
- cbBackup: TCheckBox;
cbLanguage: TComboBox;
- PageControl: TPageControl;
- TabGeneral: TTabSheet;
- TabFiles: TTabSheet;
- TabTesting: TTabSheet;
- ColorDialog: TColorDialog;
- // Общие настройки:
+ cbMapOnce: TCheckBox;
+ cbMonstersDM: TCheckBox;
cbShowDots: TCheckBox;
- cbShowTexture: TCheckBox;
cbShowSize: TCheckBox;
- // Шаги сетки:
+ cbShowTexture: TCheckBox;
+ cbTeamDamage: TCheckBox;
+ cbTwoPlayers: TCheckBox;
+ cbWeaponStay: TCheckBox;
+ ColorButton1: TColorButton;
+ ColorButton2: TColorButton;
+ ColorButton3: TColorButton;
+ edD2DArgs: TEdit;
+ edScore: TEdit;
+ edTime: TEdit;
+ ExeEdit: TFileNameEdit;
+ LabelArgs: TLabel;
+ LabelBack: TLabel;
LabelGrid: TLabel;
- eDotStepOne: TEdit;
- UpDown1: TUpDown;
- eDotStepTwo: TEdit;
- UpDown2: TUpDown;
- // Цвет сетки:
LabelGridCol: TLabel;
- sDotColor: TShape;
- bGrid: TButton;
- // Цвет фона:
- LabelBack: TLabel;
- sBackColor: TShape;
- bBack: TButton;
- // Цвет превью:
- LabelPreview: TLabel;
- sPreviewColor: TShape;
- bPreview: TButton;
- // Масштаб миникарты:
- LabelMinimap: TLabel;
- cbScale: TComboBox;
- // Количество недавно открытых:
- LabelRecent: TLabel;
- eRecent: TEdit;
- UpDown3: TUpDown;
- LabelLanguage: TLabel;
LabelGridSize: TLabel;
- cbDotSize: TComboBox;
- // Map testing:
+ LabelLanguage: TLabel;
+ LabelMinimap: TLabel;
LabelPath: TLabel;
- edD2dexe: TEdit;
- bChooseD2d: TButton;
- FindD2dDialog: TOpenDialog;
- LabelArgs: TLabel;
- edD2DArgs: TEdit;
+ LabelPreview: TLabel;
+ LabelRecent: TLabel;
+ LabelScore: TLabel;
+ LabelSecs: TLabel;
+ LabelTime: TLabel;
+ PageControl: TPageControl;
rbCOOP: TRadioButton;
rbCTF: TRadioButton;
rbDM: TRadioButton;
rbTDM: TRadioButton;
- cbAllowExit: TCheckBox;
- cbMapOnce: TCheckBox;
- cbMonstersDM: TCheckBox;
- cbTeamDamage: TCheckBox;
- cbTwoPlayers: TCheckBox;
- cbWeaponStay: TCheckBox;
- LabelScore: TLabel;
- LabelSecs: TLabel;
- edScore: TEdit;
- LabelTime: TLabel;
- edTime: TEdit;
-
+ SpinEdit1: TSpinEdit;
+ SpinEdit2: TSpinEdit;
+ SpinEdit3: TSpinEdit;
+ SpinEdit4: TSpinEdit;
+ SpinEdit5: TSpinEdit;
+ TabFiles: TTabSheet;
+ TabGeneral: TTabSheet;
+ TabTesting: TTabSheet;
- procedure bGridClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure bOKClick(Sender: TObject);
procedure bCancelClick(Sender: TObject);
- procedure bBackClick(Sender: TObject);
- procedure bPreviewClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
- procedure bChooseD2dClick(Sender: TObject);
-
- private
- { Private declarations }
- public
- { Public declarations }
end;
var
end;
end;
-procedure TOptionsForm.bGridClick(Sender: TObject);
-begin
- if ColorDialog.Execute then
- sDotColor.Brush.Color := ColorDialog.Color;
-end;
-
-procedure TOptionsForm.bChooseD2dClick(Sender: TObject);
-begin
- if FindD2dDialog.Execute then
- edD2dExe.Text := FindD2dDialog.FileName;
-end;
-
procedure TOptionsForm.FormShow(Sender: TObject);
var list: TStringList;
begin
- sDotColor.Brush.Color := DotColor;
+ // General Tab:
+ ColorButton1.ButtonColor := DotColor;
+ ColorButton2.ButtonColor := BackColor;
+ ColorButton3.ButtonColor := PreviewColor;
+ SpinEdit1.Value := DotStepOne;
+ SpinEdit2.Value := DotStepTwo;
+
cbShowDots.Checked := DotEnable;
cbShowTexture.Checked := DrawTexturePanel;
cbShowSize.Checked := DrawPanelSize;
- eDotStepOne.Text := IntToStr(DotStepOne);
- eDotStepTwo.Text := IntToStr(DotStepTwo);
- sBackColor.Brush.Color := BackColor;
- sPreviewColor.Brush.Color := PreviewColor;
cbCheckerboard.Checked := UseCheckerboard;
- cbCompress.Checked := Compress;
- cbBackup.Checked := Backup;
- if Scale = 2 then
- cbScale.ItemIndex := 1
- else
- cbScale.ItemIndex := 0;
- if DotSize = 2 then
- cbDotSize.ItemIndex := 1
- else
- cbDotSize.ItemIndex := 0;
- eRecent.Text := IntToStr(RecentCount);
+
+ SpinEdit4.Value := DotSize;
+ SpinEdit5.Value := Scale;
try
cbLanguage.Items.BeginUpdate;
cbLanguage.Items.EndUpdate;
end;
- if TestGameMode = 'TDM' then
- rbTDM.Checked := True
- else if TestGameMode = 'CTF' then
- rbCTF.Checked := True
- else if TestGameMode = 'COOP' then
- rbCOOP.Checked := True
- else
- rbDM.Checked := True;
+ // Files Tab:
+ cbCompress.Checked := Compress;
+ cbBackup.Checked := Backup;
+ SpinEdit3.Value := RecentCount;
+
+ // Testing Tab:
+ ExeEdit.Text := TestD2dExe;
+ edD2DArgs.Text := TestD2DArgs;
+
+ rbDM.Checked := TestGameMode = 'DM';
+ rbTDM.Checked := TestGameMode = 'TDM';
+ rbCTF.Checked := TestGameMode = 'CTF';
+ rbCOOP.Checked := TestGameMode = 'COOP';
edTime.Text := TestLimTime;
edScore.Text := TestLimScore;
cbWeaponStay.Checked := TestOptionsWeaponStay;
cbMonstersDM.Checked := TestOptionsMonstersDM;
cbMapOnce.Checked := TestMapOnce;
- edD2dExe.Text := TestD2dExe;
- edD2DArgs.Text := TestD2DArgs;
end;
procedure TOptionsForm.bOKClick(Sender: TObject);
var
config: TConfig;
re, n: Integer;
- d1: Boolean;
str: String;
begin
- // General tab
-
+ // General tab:
if cbLanguage.ItemIndex >= 0 then
begin
if cbLanguage.ItemIndex = 0 then str := '' else str := cbLanguage.Items[cbLanguage.ItemIndex];
end;
end;
- DotColor := sDotColor.Brush.Color;
- DotEnable := cbShowDots.Checked;
+ DotColor := ColorButton1.ButtonColor;
+ BackColor := ColorButton2.ButtonColor;
+ PreviewColor := ColorButton3.ButtonColor;
- if DotStep = DotStepOne then
- d1 := True
- else
- d1 := False;
- DotStepOne := EnsureRange(StrToIntDef(eDotStepOne.Text, 16), 4, 2048);
- DotStepTwo := EnsureRange(StrToIntDef(eDotStepTwo.Text, 8), 4, 2048);
- if d1 then
- DotStep := DotStepOne
- else
- DotStep := DotStepTwo;
+ DotEnable := cbShowDots.Checked;
+ DotStep := IfThen(DotStep = DotStepOne, SpinEdit1.Value, SpinEdit2.Value);
+ DotStepOne := SpinEdit1.Value;
+ DotStepTwo := SpinEdit2.Value;
DrawTexturePanel := cbShowTexture.Checked;
DrawPanelSize := cbShowSize.Checked;
- BackColor := sBackColor.Brush.Color;
- PreviewColor := sPreviewColor.Brush.Color;
UseCheckerboard := cbCheckerboard.Checked;
+ DotSize := SpinEdit4.Value;
+ Scale := SpinEdit5.Value;
- if cbScale.ItemIndex = 1 then
- Scale := 2
- else
- Scale := 1;
-
- if cbDotSize.ItemIndex = 1 then
- DotSize := 2
- else
- DotSize := 1;
-
- // Files tab
-
- re := Min(Max(StrToIntDef(eRecent.Text, 5), 2), 10);
+ // Files tab:
+ re := SpinEdit3.Value;
Compress := cbCompress.Checked;
Backup := cbBackup.Checked;
- // Testing tab
+ // Testing tab:
+ TestD2DExe := ExeEdit.Text;
+ TestD2DArgs := edD2DArgs.Text;
- if rbTDM.Checked then
- TestGameMode := 'TDM'
- else if rbCTF.Checked then
- TestGameMode := 'CTF'
- else if rbCOOP.Checked then
- TestGameMode := 'COOP'
- else
- TestGameMode := 'DM';
+ TestGameMode := 'DM';
+ if rbTDM.Checked then TestGameMode := 'TDM';
+ if rbCTF.Checked then TestGameMode := 'CTF';
+ if rbCOOP.Checked then TestGameMode := 'COOP';
+ if rbDM.Checked then TestGameMode := 'DM';
TestLimTime := edTime.Text;
if (not TryStrToInt(TestLimTime, n)) then
TestOptionsTwoPlayers := cbTwoPlayers.Checked;
TestOptionsTeamDamage := cbTeamDamage.Checked;
- TestOptionsAllowExit := cbAllowExit.Checked;
+ TestOptionsAllowExit := cbAllowExit.Checked;
TestOptionsWeaponStay := cbWeaponStay.Checked;
TestOptionsMonstersDM := cbMonstersDM.Checked;
TestMapOnce := cbMapOnce.Checked;
- TestD2dExe := edD2dExe.Text;
- TestD2DArgs := edD2DArgs.Text;
-
// save into config
-
config := TConfig.CreateFile(CfgFileName);
config.WriteInt('Editor', 'DotColor', DotColor);
config.WriteInt('Editor', 'DotStepOne', DotStepOne);
config.WriteInt('Editor', 'DotStepTwo', DotStepTwo);
config.WriteInt('Editor', 'DotStep', DotStep);
- config.WriteInt('Editor', 'DotSize', cbDotSize.ItemIndex);
+ config.WriteInt('Editor', 'DotSize', SpinEdit4.Value);
config.WriteBool('Editor', 'DrawTexturePanel', DrawTexturePanel);
config.WriteBool('Editor', 'DrawPanelSize', DrawPanelSize);
config.WriteInt('Editor', 'BackColor', BackColor);
config.WriteInt('Editor', 'PreviewColor', PreviewColor);
config.WriteBool('Editor', 'UseCheckerboard', UseCheckerboard);
- config.WriteInt('Editor', 'Scale', cbScale.ItemIndex);
+ config.WriteInt('Editor', 'Scale', SpinEdit5.Value);
config.WriteStr('Editor', 'Language', gLanguage);
config.WriteInt('Editor', 'RecentCount', re);
Close();
end;
-procedure TOptionsForm.bBackClick(Sender: TObject);
-begin
- if ColorDialog.Execute then
- sBackColor.Brush.Color := ColorDialog.Color;
-end;
-
-procedure TOptionsForm.bPreviewClick(Sender: TObject);
-begin
- if ColorDialog.Execute then
- sPreviewColor.Brush.Color := ColorDialog.Color;
-end;
-
procedure TOptionsForm.FormCreate(Sender: TObject);
begin
{$IF DEFINED(DARWIN)}
- if LowerCase(ExtractFileExt(TestD2dExe)) = '.app' then
- FindD2dDialog.InitialDir := ExtractFileDir(TestD2dExe)
+ if LowerCase(ExtractFileExt(TestD2DExe)) = '.app' then
+ ExeEdit.InitialDir := ExtractFileDir(TestD2DExe)
else
- FindD2dDialog.InitialDir := TestD2dExe;
- FindD2dDialog.DefaultExt := '.app';
- FindD2dDialog.Filter := 'Doom 2D Forever.app|*.app|Doom 2D Forever (Unix Executable)|Doom2DF;*';
- {$ELSEIF DEFINED(WINDOWS)}
- FindD2dDialog.InitialDir := TestD2dExe;
- FindD2dDialog.DefaultExt := '.exe';
- FindD2dDialog.Filter := 'Doom2DF.exe|Doom2DF.exe;*.exe';
+ ExeEdit.InitialDir := TestD2DExe;
{$ELSE}
- FindD2dDialog.InitialDir := TestD2dExe;
- FindD2dDialog.DefaultExt := '';
- FindD2dDialog.Filter := 'Doom2DF|Doom2DF;*';
+ ExeEdit.InitialDir := TestD2DExe;
{$ENDIF}
end;
index 241660c4c2a72bb354e32a8517b2c94bf0ecd187..369176e6e1e0b51922e23fa529563ef0a82088a3 100644 (file)
MsgFileFilterAll = 'Doom 2D: Forever Maps (*.dfz, *.dfzip, *.zip, *.wad)|*.dfz;*.dfzip;*.zip;*.wad|Doom 2D: Forever 0.30 Maps (*.ini)|*.ini|All Files (*.*)|*.*';
MsgFileFilterWad = 'Doom 2D: Forever Maps (*.dfz)|*.dfz|Doom 2D: Forever Maps (*.dfzip)|*.dfzip|Doom 2D: Forever Maps (*.zip)|*.zip|Doom 2D: Forever Maps (*.wad)|*.wad|All Files (*.*)|*.*';
+ MsgFileFilterExeMac = 'Doom 2D Forever.app|*.app|Doom 2D Forever (Unix Executable)|Doom2DF;*';
+ MsgFileFilterExeWin = 'Doom2DF.exe|Doom2DF.exe;*.exe';
+ MsgFileFilterExeUnix = 'Doom2DF|Doom2DF;*';
MsgEditorTitle = 'Doom 2D: Forever Map Editor';
LabelScore.Caption := MsgLabLaunchScore;
{$IF DEFINED(DARWIN)}
LabelPath.Caption := MsgLabLaunchPathMac;
+ ExeEdit.DialogTitle := MsgCtrlLaunchOpen;
+ ExeEdit.Filter := MsgFileFilterExeMac;
{$ELSEIF DEFINED(WINDOWS)}
LabelPath.Caption := MsgLabLaunchPathWin;
+ ExeEdit.DialogTitle := MsgCtrlLaunchOpen;
+ ExeEdit.Filter := MsgFileFilterExeWin;
{$ELSE}
LabelPath.Caption := MsgLabLaunchPathUnix;
+ ExeEdit.DialogTitle := MsgCtrlLaunchOpen;
+ ExeEdit.Filter := MsgFileFilterExeUnix;
{$ENDIF}
- FindD2dDialog.Title := MsgCtrlLaunchOpen;
LabelArgs.Caption := MsgLabLaunchArgs;
end;