diff --git a/editor/studio/AMXX_Studio.dof b/editor/studio/AMXX_Studio.dof index 72a8b220..55d04833 100755 --- a/editor/studio/AMXX_Studio.dof +++ b/editor/studio/AMXX_Studio.dof @@ -114,8 +114,8 @@ IncludeVerInfo=1 AutoIncBuild=1 MajorVer=1 MinorVer=4 -Release=2 -Build=10 +Release=3 +Build=0 Debug=0 PreRelease=0 Special=0 @@ -126,8 +126,8 @@ CodePage=1252 [Version Info Keys] CompanyName=AMX Mod X Dev Team FileDescription= -FileVersion=1.4.2.10 -InternalName=gaben +FileVersion=1.4.3.0 +InternalName= LegalCopyright=AMX Mod X Dev Team LegalTrademarks= OriginalFilename= diff --git a/editor/studio/AMXX_Studio.exe b/editor/studio/AMXX_Studio.exe index 8e11a0d8..e5cb2560 100755 Binary files a/editor/studio/AMXX_Studio.exe and b/editor/studio/AMXX_Studio.exe differ diff --git a/editor/studio/AMXX_Studio.res b/editor/studio/AMXX_Studio.res index c582e807..73b9d20a 100755 Binary files a/editor/studio/AMXX_Studio.res and b/editor/studio/AMXX_Studio.res differ diff --git a/editor/studio/UnitMainTools.pas b/editor/studio/UnitMainTools.pas index 88038abe..e20dfdde 100755 --- a/editor/studio/UnitMainTools.pas +++ b/editor/studio/UnitMainTools.pas @@ -636,6 +636,12 @@ begin frmSettings.chkDontLoadFilesTwice.Checked := eConfig.ReadBool('Editor', 'DontLoadFilesTwice', True); frmSettings.chkAutoIndent.Checked := eConfig.ReadBool('Editor', 'Auto-Indent', True); frmAutoIndent.chkIndentOpeningBrace.Checked := eConfig.ReadBool('Editor', 'IndentOpeningBrace', True); + case eConfig.ReadInteger('Editor', 'IndentStyle', 0) of + 0: frmAutoIndent.optTabs.Checked := True; + 1: frmAutoIndent.optTwoSpaces.Checked := True; + 2: frmAutoIndent.optSomethingElse.Checked := True; + end; + frmAutoIndent.txtSomethingElse.Text := eConfig.ReadString('Editor', 'IndentSomethingElse', ''); frmAutoIndent.chkUnindentPressingClosingBrace.Checked := eConfig.ReadBool('Editor', 'UnindentClosingBrace', True); frmAutoIndent.chkUnindentLine.Checked := eConfig.ReadBool('Editor', 'UnindentEmptyLine', False); frmSettings.chkAUDisable.Checked := eConfig.ReadString('Editor', 'AutoDisable', '1500') <> '-1'; diff --git a/editor/studio/UnitfrmAutoIndent.dfm b/editor/studio/UnitfrmAutoIndent.dfm index 6282b11b..a2507bab 100755 Binary files a/editor/studio/UnitfrmAutoIndent.dfm and b/editor/studio/UnitfrmAutoIndent.dfm differ diff --git a/editor/studio/UnitfrmAutoIndent.pas b/editor/studio/UnitfrmAutoIndent.pas index ebc26786..f96f9a47 100755 --- a/editor/studio/UnitfrmAutoIndent.pas +++ b/editor/studio/UnitfrmAutoIndent.pas @@ -4,7 +4,8 @@ interface uses SysUtils, Windows, Messages, Classes, Graphics, Controls, - StdCtrls, ExtCtrls, Forms, TFlatCheckBoxUnit, TFlatButtonUnit; + StdCtrls, ExtCtrls, Forms, TFlatCheckBoxUnit, TFlatButtonUnit, + TFlatEditUnit, TFlatRadioButtonUnit; type TfrmAutoIndent = class(TForm) @@ -13,6 +14,12 @@ type chkUnindentPressingClosingBrace: TFlatCheckBox; chkUnindentLine: TFlatCheckBox; chkIndentOpeningBrace: TFlatCheckBox; + pnlIndentStyle: TPanel; + optTwoSpaces: TFlatRadioButton; + optTabs: TFlatRadioButton; + Label1: TLabel; + optSomethingElse: TFlatRadioButton; + txtSomethingElse: TFlatEdit; end; var diff --git a/editor/studio/UnitfrmIRCPaster.dfm b/editor/studio/UnitfrmIRCPaster.dfm index c69a2e1a..d2acc30e 100755 Binary files a/editor/studio/UnitfrmIRCPaster.dfm and b/editor/studio/UnitfrmIRCPaster.dfm differ diff --git a/editor/studio/UnitfrmInfo.dfm b/editor/studio/UnitfrmInfo.dfm index d2d789b9..f82faf39 100755 Binary files a/editor/studio/UnitfrmInfo.dfm and b/editor/studio/UnitfrmInfo.dfm differ diff --git a/editor/studio/UnitfrmMain.pas b/editor/studio/UnitfrmMain.pas index a5b86c5e..567f0499 100755 --- a/editor/studio/UnitfrmMain.pas +++ b/editor/studio/UnitfrmMain.pas @@ -563,6 +563,13 @@ begin eConfig.WriteBool('Editor', 'IndentOpeningBrace', frmAutoIndent.chkIndentOpeningBrace.Checked); eConfig.WriteBool('Editor', 'UnindentClosingBrace', frmAutoIndent.chkUnindentPressingClosingBrace.Checked); eConfig.WriteBool('Editor', 'UnindentEmptyLine', frmAutoIndent.chkUnindentLine.Checked); + if (frmAutoIndent.optTabs.Checked) then + eConfig.WriteInteger('Editor', 'IndentStyle', 0) + else if (frmAutoIndent.optTwoSpaces.Checked) then + eConfig.WriteInteger('Editor', 'IndentStyle', 1) + else + eConfig.WriteInteger('Editor', 'IndentStyle', 2); + eConfig.WriteString('Editor', 'IndentSomethingElse', frmAutoIndent.txtSomethingElse.Text); eConfig.WriteBool('Editor', 'Disable_AC', frmSettings.chkDisableAC.Checked); eConfig.WriteBool('Editor', 'Disable_CT', frmSettings.chkDisableCT.Checked); eConfig.WriteBool('Editor', 'AutoHideCT', frmSettings.chkAutoHideCT.Checked); @@ -570,6 +577,7 @@ begin eConfig.WriteString('Editor', 'AutoDisable', frmSettings.txtAUDisable.Text) else eConfig.WriteString('Editor', 'AutoDisable', '-1'); + { Editor } if FileExists(sciPropertyLoader.FileName) then sciPropertyLoader.Save; @@ -1006,8 +1014,14 @@ begin if (Key = 13) and (frmSettings.chkAutoIndent.Checked) and (Trim(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) = '') then begin if (sciEditor.LanguageManager.SelectedLanguage = 'Pawn') or (sciEditor.LanguageManager.SelectedLanguage = 'C++') then begin eStr := Trim(RemoveStringsAndComments(sciEditor.Lines[sciEditor.GetCurrentLineNumber - 1], True, True)); - if (Copy(eStr, Length(eStr), 1) = '{') and (frmAutoIndent.chkIndentOpeningBrace.Checked) then - sciEditor.SelText := #9; + if (Copy(eStr, Length(eStr), 1) = '{') and (frmAutoIndent.chkIndentOpeningBrace.Checked) then begin + if (frmAutoIndent.optTabs.Checked) then + sciEditor.SelText := #9 + else if (frmAutoIndent.optTwoSpaces.Checked) then + sciEditor.SelText := ' ' + else + sciEditor.SelText := frmAutoIndent.txtSomethingElse.Text; + end; if (eStr = '') and (frmAutoIndent.chkUnindentLine.Checked) then begin sciEditor.Lines[sciEditor.GetCurrentLineNumber] := Copy(sciEditor.Lines[sciEditor.GetCurrentLineNumber], 1, Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) - 1); // remove last indent.. sciEditor.SelStart := sciEditor.SelStart + Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]); // and jump to last position @@ -1291,7 +1305,13 @@ begin if (Key = '}') and (frmSettings.chkAutoIndent.Checked) then begin if (Trim(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) = '') and (frmAutoIndent.chkUnindentPressingClosingBrace.Checked) then begin if (sciEditor.LanguageManager.SelectedLanguage = 'Pawn') or (sciEditor.LanguageManager.SelectedLanguage = 'C++') then begin - sciEditor.Lines[sciEditor.GetCurrentLineNumber] := Copy(sciEditor.Lines[sciEditor.GetCurrentLineNumber], 1, Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) - 1); // remove last indent.. + // remove last indentation.. + if (frmAutoIndent.optTabs.Checked)then + sciEditor.Lines[sciEditor.GetCurrentLineNumber] := Copy(sciEditor.Lines[sciEditor.GetCurrentLineNumber], 1, Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) - 1) + else if (frmAutoIndent.optTwoSpaces.Checked) then + sciEditor.Lines[sciEditor.GetCurrentLineNumber] := Copy(sciEditor.Lines[sciEditor.GetCurrentLineNumber], 1, Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) - 2) + else + sciEditor.Lines[sciEditor.GetCurrentLineNumber] := Copy(sciEditor.Lines[sciEditor.GetCurrentLineNumber], 1, Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) - Length(frmAutoIndent.txtSomethingElse.Text)); sciEditor.SelStart := sciEditor.SelStart + Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]); // and jump to last position end; end; @@ -1519,7 +1539,7 @@ begin end; end; { C++ Projects } - if frmClose.trvFiles.Items[i].Text = stlIDEs.Items[1].Caption then begin + if frmClose.trvFiles.Items[i].Text = stlIDEs.Strings[1] then begin with frmClose.trvFiles.Items[i] do begin for k := 0 to Count - 1 do begin if frmClose.trvFiles.Checked[Item[k]] then begin diff --git a/editor/studio/UnitfrmParamEdit.dfm b/editor/studio/UnitfrmParamEdit.dfm index 028dcd26..3cfb25e2 100644 Binary files a/editor/studio/UnitfrmParamEdit.dfm and b/editor/studio/UnitfrmParamEdit.dfm differ