Updated some captions
Updated the Autocomplete-Check function Prepared AMXX-Studio for release
This commit is contained in:
parent
fd7f4441fb
commit
73ba5d1644
@ -115,7 +115,7 @@ AutoIncBuild=1
|
||||
MajorVer=1
|
||||
MinorVer=4
|
||||
Release=0
|
||||
Build=8
|
||||
Build=12
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
@ -126,7 +126,7 @@ CodePage=1252
|
||||
[Version Info Keys]
|
||||
CompanyName=AMX Mod X Dev Team
|
||||
FileDescription=
|
||||
FileVersion=1.4.0.8
|
||||
FileVersion=1.4.0.12
|
||||
InternalName=gaben
|
||||
LegalCopyright=AMX Mod X Dev Team
|
||||
LegalTrademarks=
|
||||
|
@ -1,6 +1,11 @@
|
||||
program AMXX_Studio;
|
||||
|
||||
uses
|
||||
madExcept,
|
||||
madLinkDisAsm,
|
||||
madListHardware,
|
||||
madListProcesses,
|
||||
madListModules,
|
||||
Forms,
|
||||
Windows,
|
||||
Classes,
|
||||
|
Binary file not shown.
Binary file not shown.
@ -455,26 +455,69 @@ var eStr: String;
|
||||
i: integer;
|
||||
begin
|
||||
Result := 0;
|
||||
eStr := StringReplace(frmMain.sciEditor.Lines[frmMain.sciEditor.GetCurrentLineNumber], '^"', '', [rfReplaceAll]);
|
||||
eStr := Copy(eStr, 1, frmMain.sciEditor.GetCaretInLine);
|
||||
eStr := StringReplace(frmMain.sciEditor.Lines[frmMain.sciEditor.GetCurrentLineNumber], '^"', '', [rfReplaceAll]);
|
||||
if (Length(eStr) = 0) then exit;
|
||||
|
||||
while Between(eStr, '"', '"') <> '' do
|
||||
eStr := StringReplace(eStr, Between(eStr, '"', '"'), '', [rfReplaceAll]);
|
||||
while Between(eStr, '{', '}') <> '' do
|
||||
eStr := StringReplace(eStr, Between(eStr, '{', '}'), '', [rfReplaceAll]);
|
||||
for i := 0 to Length(eStr) -1 do begin
|
||||
for i := Length(eStr) -1 downto 1 do begin
|
||||
if eStr[i] = ',' then
|
||||
Result := Result +1;
|
||||
Result := Result +1
|
||||
else if eStr[i] = '(' then
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
function GetCurrFunc: String;
|
||||
var eStr: String;
|
||||
i: integer;
|
||||
eStart, eEnd: integer;
|
||||
eInString, eInArray: Boolean;
|
||||
begin
|
||||
Result := '';
|
||||
eStart := 1;
|
||||
eEnd := -1;
|
||||
eInString := False;
|
||||
eInArray := False;
|
||||
eStr := frmMain.sciEditor.Lines[frmMain.sciEditor.GetCurrentLineNumber];
|
||||
if Pos('(', eStr) = 0 then
|
||||
Result := ''
|
||||
eStr := StringReplace(eStr, '^"', 'AB', [rfReplaceAll]); // we don't need those
|
||||
|
||||
if (Length(eStr) = 0) then exit;
|
||||
|
||||
for i := frmMain.sciEditor.GetCaretInLine downto 1 do begin
|
||||
if eStr[i] = '"' then
|
||||
eInString := not eInString
|
||||
else if (eStr[i] = '{') and (not eInString) then
|
||||
eInArray := True
|
||||
else if (eStr[i] = '}') and (not eInString) then
|
||||
eInArray := False
|
||||
else if (not eInArray) and (not eInString) and (eStr[i] = '(') then begin
|
||||
eEnd := i-1;
|
||||
break;
|
||||
end;
|
||||
end;
|
||||
|
||||
if eEnd <> -1 then begin
|
||||
for i := eEnd downto 1 do begin
|
||||
if eStr[i] = '"' then
|
||||
eInString := not eInString
|
||||
else if (eStr[i] = '{') and (not eInString) then
|
||||
eInArray := True
|
||||
else if (eStr[i] = '}') and (not eInString) then
|
||||
eInArray := False
|
||||
else if (not eInArray) and (not eInString) and (eStr[i] = '(') then begin
|
||||
eStart := i+1;
|
||||
break;
|
||||
end;
|
||||
end;
|
||||
end
|
||||
else
|
||||
Result := Trim(Copy(eStr, 1, Pos('(', eStr) -1));
|
||||
exit;
|
||||
|
||||
Result := Trim(Copy(eStr, eStart, eEnd - eStart + 1));
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -1010,6 +1010,12 @@ begin
|
||||
frmMain.sciEditor.SelLength := Document.SelLength;
|
||||
frmMain.sciEditor.LineScroll(0, (0 - frmMain.sciEditor.GetFirstVisibleLine) + Document.TopLine);
|
||||
end;
|
||||
if frmMain.sciEditor.Caret.LineVisible <> frmSettings.chkShowCaret.Checked then
|
||||
frmMain.sciEditor.Caret.LineVisible := frmSettings.chkShowCaret.Checked;
|
||||
if frmMain.sciEditor.Caret.LineBackColor <> frmSettings.CaretBack then begin
|
||||
frmMain.sciEditor.Caret.LineBackColor := frmSettings.CaretBack;
|
||||
frmMain.sciEditor.Colors.SelBack := clHighlight;
|
||||
end;
|
||||
frmMain.mnuRestoreBackup.Enabled := (FileExists(Document.FileName + '.bak')) and (not Document.Untitled);
|
||||
Screen.Cursor := crDefault;
|
||||
Plugin_DocChange(Document.Index, Document.FileName, Document.Highlighter, RestoreCaret, False);
|
||||
|
Binary file not shown.
@ -8,10 +8,11 @@ uses
|
||||
|
||||
type
|
||||
TfrmAutoIndent = class(TForm)
|
||||
cmdClose: TFlatButton;
|
||||
pnlCheckboxes: TPanel;
|
||||
chkUnindentPressingClosingBrace: TFlatCheckBox;
|
||||
chkUnindentLine: TFlatCheckBox;
|
||||
chkIndentOpeningBrace: TFlatCheckBox;
|
||||
cmdClose: TFlatButton;
|
||||
end;
|
||||
|
||||
var
|
||||
|
@ -37,7 +37,7 @@ object frmMain: TfrmMain
|
||||
000000000000000380000000000000000000000000000000000000000000}
|
||||
KeyPreview = True
|
||||
OldCreateOrder = False
|
||||
Position = poDesktopCenter
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnConstrainedResize = FormConstrainedResize
|
||||
OnCreate = FormCreate
|
||||
@ -668,9 +668,9 @@ object frmMain: TfrmMain
|
||||
ThemeType = tttTBX
|
||||
OnActiveTabChange = tsMainActiveTabChange
|
||||
HiddenItems = <>
|
||||
object tiPAWN: TSpTBXTabItem
|
||||
object tiPawn: TSpTBXTabItem
|
||||
Checked = True
|
||||
OnClick = tiPAWNClick
|
||||
OnClick = tiPawnClick
|
||||
TabPosition = ttpBottom
|
||||
ThemeType = tttTBX
|
||||
CaptionW = 'Pawn Projects'
|
||||
@ -756,7 +756,6 @@ object frmMain: TfrmMain
|
||||
Align = alClient
|
||||
OnModified = sciEditorModified
|
||||
OnDblClick = sciEditorDblClick
|
||||
OnCallTipClick = sciEditorCallTipClick
|
||||
OnKeyUp = sciEditorKeyUp
|
||||
OnKeyDown = sciEditorKeyDown
|
||||
OnKeyPress = sciEditorKeyPress
|
||||
|
@ -1975,9 +1975,50 @@ end;
|
||||
procedure TfrmMain.sciAutoCompleteBeforeShow(Sender: TObject;
|
||||
const Position: Integer; ListToDisplay: TStrings;
|
||||
var CancelDisplay: Boolean);
|
||||
function Matchstrings(Source, pattern: string): Boolean;
|
||||
var pSource: array [0..255] of Char;
|
||||
pPattern: array [0..255] of Char;
|
||||
|
||||
function MatchPattern(element, pattern: PChar): Boolean;
|
||||
function IsPatternWild(pattern: PChar): Boolean;
|
||||
begin
|
||||
Result := StrScan(pattern, '*') <> nil;
|
||||
if not Result then Result := StrScan(pattern, '?') <> nil;
|
||||
end;
|
||||
begin
|
||||
if 0 = StrComp(pattern, '*') then
|
||||
Result := True
|
||||
else if (element^ = Chr(0)) and (pattern^ <> Chr(0)) then
|
||||
Result := False
|
||||
else if element^ = Chr(0) then
|
||||
Result := True
|
||||
else
|
||||
begin
|
||||
case pattern^ of
|
||||
'*': if MatchPattern(element, @pattern[1]) then
|
||||
Result := True
|
||||
else
|
||||
Result := MatchPattern(@element[1], pattern);
|
||||
'?': Result := MatchPattern(@element[1], @pattern[1]);
|
||||
else
|
||||
if element^ = pattern^ then
|
||||
Result := MatchPattern(@element[1], @pattern[1])
|
||||
else
|
||||
Result := False;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
StrPCopy(pSource, Source);
|
||||
StrPCopy(pPattern, pattern);
|
||||
Result := MatchPattern(pSource, pPattern);
|
||||
end;
|
||||
|
||||
var eCurrStyle: Integer;
|
||||
eFunction: String;
|
||||
i: integer;
|
||||
eCmpList: TStringList;
|
||||
i, k, j: integer;
|
||||
begin
|
||||
if not Plugin_AutoCompleteShow(ListToDisplay.GetText) then begin
|
||||
CancelDisplay := True;
|
||||
@ -1987,15 +2028,35 @@ begin
|
||||
if (Started) and (Assigned(GetStyleAt(sciEditor.SelStart))) then begin
|
||||
eCurrStyle := GetStyleAt(sciEditor.SelStart).StyleNumber;
|
||||
|
||||
if (ActiveDoc.Highlighter = 'Pawn') or (ActiveDoc.Highlighter = 'C++') then begin
|
||||
eFunction := GetCurrFunc;
|
||||
if (ActiveDoc.Highlighter = 'Pawn') then begin
|
||||
eFunction := LowerCase(GetCurrFunc);
|
||||
if eFunction <> '' then begin
|
||||
eFunction := LowerCase(eFunction);
|
||||
for i := 0 to eACList.Count -1 do begin
|
||||
if eFunction = LowerCase(Trim(TACFunction(eACList.Items[i]).Name)) then begin
|
||||
if TACFunction(eACList.Items[i]).Items.Count > GetFunctionPos then begin
|
||||
if Trim(TACFunction(eACList.Items[i]).Items[GetFunctionPos]) <> '' then
|
||||
ListToDisplay.Text := StringReplace(TACFunction(eACList.Items[i]).Items[GetFunctionPos], '; ', #13, [rfReplaceAll]);
|
||||
if (Trim(TACFunction(eACList.Items[i]).Items[GetFunctionPos]) <> '') then begin
|
||||
if (Pos('*', TACFunction(eACList.Items[i]).Items[GetFunctionPos]) = 0) and (Pos('?', TACFunction(eACList.Items[i]).Items[GetFunctionPos]) = 0) then
|
||||
ListToDisplay.Text := StringReplace(TACFunction(eACList.Items[i]).Items[GetFunctionPos], '; ', #13, [rfReplaceAll])
|
||||
else begin
|
||||
eCmpList := TStringList.Create;
|
||||
eCmpList.Text := StringReplace(TACFunction(eACList.Items[i]).Items[GetFunctionPos], '; ', #13, [rfReplaceAll]);
|
||||
for k := eCmpList.Count -1 downto 0 do begin
|
||||
if (Pos('*', eCmpList[k]) <> 0) or (Pos('?', eCmpList[k]) <> 0) then begin
|
||||
for j := 0 to ListToDisplay.Count -1 do begin
|
||||
if Trim(ListToDisplay[j]) <> '' then begin
|
||||
if (LowerCase(ListToDisplay[j][1]) = LowerCase(eCmpList[k][1])) then begin
|
||||
if (MatchStrings(LowerCase(ListToDisplay[j]), LowerCase(eCmpList[k]))) then
|
||||
eCmpList.Add(ListToDisplay[j]);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
eCmpList.Delete(k);
|
||||
end;
|
||||
end;
|
||||
ListToDisplay.Assign(eCmpList);
|
||||
eCmpList.Free;
|
||||
end;
|
||||
end;
|
||||
break;
|
||||
end;
|
||||
end;
|
||||
|
Binary file not shown.
@ -15,6 +15,7 @@ type
|
||||
lblFunction: TLabel;
|
||||
txtFunction: TSpTBXEdit;
|
||||
lblItems: TLabel;
|
||||
Label1: TLabel;
|
||||
end;
|
||||
|
||||
var
|
||||
|
@ -64,7 +64,7 @@ object frmSettings: TfrmSettings
|
||||
Top = 0
|
||||
Width = 351
|
||||
Height = 260
|
||||
ActivePage = jspCompiler
|
||||
ActivePage = jspAutocompleteCheck
|
||||
PropagateEnable = False
|
||||
Align = alClient
|
||||
OnChange = jplSettingsChange
|
||||
@ -1855,6 +1855,14 @@ object frmSettings: TfrmSettings
|
||||
Align = alTop
|
||||
Shape = bsTopLine
|
||||
end
|
||||
object lblACHint: TLabel
|
||||
Left = 2
|
||||
Top = 16
|
||||
Width = 312
|
||||
Height = 13
|
||||
Caption = 'This feature allows you to set your Autocomplete-Items manually'
|
||||
Visible = False
|
||||
end
|
||||
object cmdOK: TFlatButton
|
||||
Left = 416
|
||||
Top = 7
|
||||
|
@ -206,6 +206,7 @@ type
|
||||
cmdAddFunction: TFlatButton;
|
||||
cmdRemFunction: TFlatButton;
|
||||
chkAutoHideCT: TFlatCheckBox;
|
||||
lblACHint: TLabel;
|
||||
procedure jplSettingsChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
@ -308,6 +309,7 @@ begin
|
||||
else
|
||||
lblCurrSetting.Caption := (jplSettings.ActivePage as TJvStandardPage).Caption;
|
||||
|
||||
lblACHint.Visible := jplSettings.ActivePage = jspAutocompleteCheck;
|
||||
txtPAWNOutputExit(Sender);
|
||||
txtCPPOutputChange(Sender);
|
||||
end;
|
||||
@ -711,6 +713,8 @@ var eDir: String;
|
||||
begin
|
||||
if SelectDirectory(lSelectOutputPAWN, txtPAWNOutput.Text, eDir) then
|
||||
txtPAWNOutput.Text := eDir;
|
||||
txtPAWNOutput.OnEnter(Self);
|
||||
txtCPPOutput.OnEnter(Self);
|
||||
end;
|
||||
|
||||
procedure TfrmSettings.cmdBrowseOutputCPPClick(Sender: TObject);
|
||||
@ -718,6 +722,8 @@ var eDir: String;
|
||||
begin
|
||||
if SelectDirectory(lSelectOutputCPP, txtCPPOutput.Text, eDir) then
|
||||
txtCPPOutput.Text := eDir;
|
||||
txtPAWNOutput.OnEnter(Self);
|
||||
txtCPPOutput.OnEnter(Self);
|
||||
end;
|
||||
|
||||
procedure TfrmSettings.txtPAWNOutputExit(Sender: TObject);
|
||||
|
Loading…
Reference in New Issue
Block a user