* May 18th, 2005: Starting to develop AMXX-Edit v2 as a kind of open source

* May 19th, 2005: Added debug dialog (only for developing)
This commit is contained in:
Christian Hammacher 2005-05-19 11:03:42 +00:00
parent ba245458de
commit c1552aacd6
4 changed files with 19 additions and 9 deletions

View File

@ -13,12 +13,15 @@ program AMXX_Edit_v2;
GlyFX Icons: www.glyfx.com (using GlyFX Icon Pack of Delphi 2005 PE)
Modified CorelButton (see CorelButton.pas, original by ConquerWare)
Indy 9 Socket Components: www.indyproject.org
[JEDI component library, only necersarry for Exception Dialog (jvcl.sourceforge.net)]
AMXX-Edit v2 is published under GNU General Public License and comes
with ABSOLUTELY NO WARRANTY (see GPL.txt for more information)
}
//{$DEFINE EXCEPTION_DEBUG} // Remove comments only when you want to trace exceptions
uses
Forms,
Windows,
@ -38,7 +41,8 @@ uses
UnitHowToMakePlayerMenu in 'UnitHowToMakePlayerMenu.pas' {frmHowToMakePlayerMenu},
UnitfrmSockets in 'UnitfrmSockets.pas' {frmSocketTerminal},
UnitReadThread in 'UnitReadThread.pas',
UnitfrmLoopGenerator in 'UnitfrmLoopGenerator.pas' {frmLoopGenerator};
UnitfrmLoopGenerator in 'UnitfrmLoopGenerator.pas' {frmLoopGenerator},
UnitfrmExceptionHandler in 'UnitfrmExceptionHandler.pas' {ExceptionDialog};
{$R *.res}

Binary file not shown.

View File

@ -1,6 +1,6 @@
object frmMain: TfrmMain
Left = 198
Top = 203
Left = 222
Top = 277
Width = 870
Height = 640
Color = clBtnFace

View File

@ -430,11 +430,10 @@ begin
eStr := Trim(sciEditor.Lines[sciEditor.GetCurrentLineNumber -1]);
Delete(eStr, 1, Length(eStr) -1);
if eStr = '{' then
sciEditor.SelText := ' ';
if sciEditor.GetCurrentLineNumber <> 0 then begin // if we are on line 0 we would access line -1 otherwise
if (Trim(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) <> '') and (Trim(sciEditor.Lines[sciEditor.GetCurrentLineNumber -1]) = '') and (frmSettings.chkAutoIndent.Checked) then // if the prevorious line isn't empty, the line contains only spaces and the auto-identer is enabled then...
sciEditor.Lines[sciEditor.GetCurrentLineNumber] := Copy(sciEditor.Lines[sciEditor.GetCurrentLineNumber -1], 1, Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber -1]) -2); // remove the last char
sciEditor.SelText := ' '
else if (Trim(sciEditor.Lines[sciEditor.GetCurrentLineNumber -1]) = '') and (frmSettings.chkAutoIndent.Checked) then begin // if the prevorious line isn't empty, the line contains only spaces and the auto-identer is enabled then...
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
end;
end;
end;
@ -650,7 +649,14 @@ begin
else if (Key = 9) and (not (ssCtrl in Shift)) then // Tab
SetModified
else if (Key >= 65) and (Key <= 90) and (not (ssCtrl in Shift)) then // a..z
SetModified;
SetModified
else if Chr(Key) = '}' then begin
if sciEditor.GetCurrentLineNumber <> 0 then begin // if we are on line 0 we would access line -1 otherwise
if (Trim(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) = '') and (frmSettings.chkAutoIndent.Checked) then // if the prevorious line isn't empty, the line contains only spaces and the auto-identer is enabled then...
sciEditor.Lines[sciEditor.GetCurrentLineNumber] := Copy(sciEditor.Lines[sciEditor.GetCurrentLineNumber], 1, Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) -1); // remove the last char
end;
end;
if (sciEditor.GetCurrentLineNumber <> eCurrentLine) or (RemoveSpaces(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) = '') then begin
UpdateList(sciEditor.Lines.Text);