mirror of
https://github.com/moparisthebest/Simba
synced 2025-01-10 21:28:00 -05:00
Added backwards searching for the functionlist (arrow up)
Added a lil bar for functionlist (easier to drag) and close button Made the updatetimer go to 30 mins, after first call Made the versioncheck have a different thread (made it pretty thread safe, afaik) Made about form show the version Fixed lil bug with FunctionList(where it would get big borders after selecint an item). git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@367 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
parent
49779bf2ed
commit
b8b8c5125c
@ -3,20 +3,18 @@ object AboutForm: TAboutForm
|
||||
Height = 300
|
||||
Top = 271
|
||||
Width = 400
|
||||
ActiveControl = Memo1
|
||||
ActiveControl = AboutMemo
|
||||
Caption = 'AboutForm'
|
||||
ClientHeight = 300
|
||||
ClientWidth = 400
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '0.9.29'
|
||||
object Memo1: TMemo
|
||||
object AboutMemo: TMemo
|
||||
Left = 0
|
||||
Height = 300
|
||||
Top = 0
|
||||
Width = 400
|
||||
Align = alClient
|
||||
Lines.Strings = (
|
||||
'Mufasa is, and always will be, sick.'
|
||||
)
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
|
@ -1,10 +1,10 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TAboutForm','FORMDATA',[
|
||||
'TPF0'#10'TAboutForm'#9'AboutForm'#4'Left'#3'n'#2#6'Height'#3','#1#3'Top'#3#15
|
||||
+#1#5'Width'#3#144#1#13'ActiveControl'#7#5'Memo1'#7'Caption'#6#9'AboutForm'#12
|
||||
+'ClientHeight'#3','#1#11'ClientWidth'#3#144#1#10'LCLVersion'#6#6'0.9.29'#0#5
|
||||
+'TMemo'#5'Memo1'#4'Left'#2#0#6'Height'#3','#1#3'Top'#2#0#5'Width'#3#144#1#5
|
||||
+'Align'#7#8'alClient'#13'Lines.Strings'#1#6'$Mufasa is, and always will be, '
|
||||
+'sick.'#0#8'TabOrder'#2#0#0#0#0
|
||||
]);
|
||||
|
||||
LazarusResources.Add('TAboutForm','FORMDATA',[
|
||||
'TPF0'#10'TAboutForm'#9'AboutForm'#4'Left'#3'n'#2#6'Height'#3','#1#3'Top'#3#15
|
||||
+#1#5'Width'#3#144#1#13'ActiveControl'#7#9'AboutMemo'#7'Caption'#6#9'AboutFor'
|
||||
+'m'#12'ClientHeight'#3','#1#11'ClientWidth'#3#144#1#8'OnCreate'#7#10'FormCre'
|
||||
+'ate'#10'LCLVersion'#6#6'0.9.29'#0#5'TMemo'#9'AboutMemo'#4'Left'#2#0#6'Heigh'
|
||||
+'t'#3','#1#3'Top'#2#0#5'Width'#3#144#1#5'Align'#7#8'alClient'#8'TabOrder'#2#0
|
||||
+#0#0#0
|
||||
]);
|
||||
|
@ -36,7 +36,8 @@ type
|
||||
{ TAboutForm }
|
||||
|
||||
TAboutForm = class(TForm)
|
||||
Memo1: TMemo;
|
||||
AboutMemo: TMemo;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
@ -47,6 +48,18 @@ var
|
||||
AboutForm: TAboutForm;
|
||||
|
||||
implementation
|
||||
uses
|
||||
TestUnit;
|
||||
{ TAboutForm }
|
||||
|
||||
procedure TAboutForm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
AboutMemo.Lines.Add('---Simba---');
|
||||
AboutMemo.Lines.Add('');
|
||||
AboutMemo.Lines.Add('');
|
||||
AboutMemo.Lines.Add('Simba is released under the GPL license.');
|
||||
AboutMemo.Lines.Add(format('You are currently using version: %d',[Testunit.SimbaVersion]));
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I about.lrs}
|
||||
|
@ -1,36 +1,138 @@
|
||||
object FunctionListFrame: TFunctionListFrame
|
||||
Left = 0
|
||||
Height = 327
|
||||
Height = 522
|
||||
Top = 0
|
||||
Width = 115
|
||||
Width = 182
|
||||
Align = alLeft
|
||||
ClientHeight = 327
|
||||
ClientWidth = 115
|
||||
ClientHeight = 522
|
||||
ClientWidth = 182
|
||||
OnEndDock = FrameEndDock
|
||||
TabOrder = 0
|
||||
DesignLeft = 401
|
||||
DesignTop = 219
|
||||
object FunctionList: TTreeView
|
||||
Left = 0
|
||||
Height = 306
|
||||
Top = 0
|
||||
Width = 115
|
||||
Height = 483
|
||||
Top = 18
|
||||
Width = 182
|
||||
Align = alClient
|
||||
DefaultItemHeight = 15
|
||||
ReadOnly = True
|
||||
ScrollBars = ssAutoBoth
|
||||
TabOrder = 0
|
||||
OnDblClick = FunctionListDblClick
|
||||
OnDeletion = FunctionListDeletion
|
||||
OnMouseDown = FunctionListMouseDown
|
||||
OnMouseUp = FunctionListMouseUp
|
||||
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips]
|
||||
end
|
||||
object editSearchList: TEdit
|
||||
Left = 0
|
||||
Height = 21
|
||||
Top = 306
|
||||
Width = 115
|
||||
Top = 501
|
||||
Width = 182
|
||||
Align = alBottom
|
||||
OnChange = editSearchListChange
|
||||
TabOrder = 1
|
||||
end
|
||||
object FunctionListLabel: TLabel
|
||||
Left = 2
|
||||
Height = 14
|
||||
Top = 2
|
||||
Width = 178
|
||||
Align = alTop
|
||||
Alignment = taCenter
|
||||
BorderSpacing.Around = 2
|
||||
Caption = 'Functionlist'
|
||||
Font.Style = [fsBold]
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
OnMouseDown = FunctionListLabelMouseDown
|
||||
end
|
||||
object CloseButton: TSpeedButton
|
||||
Left = 134
|
||||
Height = 16
|
||||
Top = 2
|
||||
Width = 16
|
||||
Anchors = [akTop, akRight]
|
||||
Color = clBtnFace
|
||||
Flat = True
|
||||
Glyph.Data = {
|
||||
36090000424D3609000000000000360000002800000018000000180000000100
|
||||
2000000000000009000064000000640000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00FF0000000000000000000000000000000000000000000000FF000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000FF0000
|
||||
00FF000000FF000000000000000000000000000000FF000000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00FF000000FF000000FF00000000000000FF000000FF000000FF000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000FF000000FF000000FF000000FF000000FF00000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000FF000000FF000000FF0000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000FF000000FF000000FF000000FF000000FF00000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00FF000000FF000000FF00000000000000FF000000FF000000FF000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000FF0000
|
||||
00FF000000FF000000000000000000000000000000FF000000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00FF0000000000000000000000000000000000000000000000FF000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000
|
||||
}
|
||||
NumGlyphs = 0
|
||||
OnClick = CloseButtonClick
|
||||
end
|
||||
end
|
||||
|
@ -1,16 +1,88 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TFunctionListFrame','FORMDATA',[
|
||||
'TPF0'#18'TFunctionListFrame'#17'FunctionListFrame'#4'Left'#2#0#6'Height'#3'G'
|
||||
+#1#3'Top'#2#0#5'Width'#2's'#5'Align'#7#6'alLeft'#12'ClientHeight'#3'G'#1#11
|
||||
+'ClientWidth'#2's'#8'TabOrder'#2#0#10'DesignLeft'#3#145#1#9'DesignTop'#3#219
|
||||
+#0#0#9'TTreeView'#12'FunctionList'#4'Left'#2#0#6'Height'#3'2'#1#3'Top'#2#0#5
|
||||
+'Width'#2's'#5'Align'#7#8'alClient'#17'DefaultItemHeight'#2#15#8'ReadOnly'#9
|
||||
+#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#0#10'OnDeletion'#7#20'Functio'
|
||||
+'nListDeletion'#11'OnMouseDown'#7#21'FunctionListMouseDown'#9'OnMouseUp'#7#19
|
||||
+'FunctionListMouseUp'#7'Options'#11#17'tvoAutoItemHeight'#16'tvoHideSelectio'
|
||||
+'n'#21'tvoKeepCollapsedNodes'#11'tvoReadOnly'#14'tvoShowButtons'#12'tvoShowL'
|
||||
+'ines'#11'tvoShowRoot'#11'tvoToolTips'#0#0#0#5'TEdit'#14'editSearchList'#4'L'
|
||||
+'eft'#2#0#6'Height'#2#21#3'Top'#3'2'#1#5'Width'#2's'#5'Align'#7#8'alBottom'#8
|
||||
+'OnChange'#7#20'editSearchListChange'#8'TabOrder'#2#1#0#0#0
|
||||
'TPF0'#18'TFunctionListFrame'#17'FunctionListFrame'#4'Left'#2#0#6'Height'#3#10
|
||||
+#2#3'Top'#2#0#5'Width'#3#182#0#5'Align'#7#6'alLeft'#12'ClientHeight'#3#10#2
|
||||
+#11'ClientWidth'#3#182#0#9'OnEndDock'#7#12'FrameEndDock'#8'TabOrder'#2#0#10
|
||||
+'DesignLeft'#3#145#1#9'DesignTop'#3#219#0#0#9'TTreeView'#12'FunctionList'#4
|
||||
+'Left'#2#0#6'Height'#3#227#1#3'Top'#2#18#5'Width'#3#182#0#5'Align'#7#8'alCli'
|
||||
+'ent'#17'DefaultItemHeight'#2#15#8'ReadOnly'#9#10'ScrollBars'#7#10'ssAutoBot'
|
||||
+'h'#8'TabOrder'#2#0#10'OnDblClick'#7#20'FunctionListDblClick'#10'OnDeletion'
|
||||
+#7#20'FunctionListDeletion'#11'OnMouseDown'#7#21'FunctionListMouseDown'#7'Op'
|
||||
+'tions'#11#17'tvoAutoItemHeight'#16'tvoHideSelection'#21'tvoKeepCollapsedNod'
|
||||
+'es'#11'tvoReadOnly'#14'tvoShowButtons'#12'tvoShowLines'#11'tvoShowRoot'#11
|
||||
+'tvoToolTips'#0#0#0#5'TEdit'#14'editSearchList'#4'Left'#2#0#6'Height'#2#21#3
|
||||
+'Top'#3#245#1#5'Width'#3#182#0#5'Align'#7#8'alBottom'#8'OnChange'#7#20'editS'
|
||||
+'earchListChange'#8'TabOrder'#2#1#0#0#6'TLabel'#17'FunctionListLabel'#4'Left'
|
||||
+#2#2#6'Height'#2#14#3'Top'#2#2#5'Width'#3#178#0#5'Align'#7#5'alTop'#9'Alignm'
|
||||
+'ent'#7#8'taCenter'#20'BorderSpacing.Around'#2#2#7'Caption'#6#12'Functionlis'
|
||||
+'t'#10'Font.Style'#11#6'fsBold'#0#11'ParentColor'#8#10'ParentFont'#8#11'OnMo'
|
||||
+'useDown'#7#26'FunctionListLabelMouseDown'#0#0#12'TSpeedButton'#11'CloseButt'
|
||||
+'on'#4'Left'#3#134#0#6'Height'#2#16#3'Top'#2#2#5'Width'#2#16#7'Anchors'#11#5
|
||||
+'akTop'#7'akRight'#0#5'Color'#7#9'clBtnFace'#4'Flat'#9#10'Glyph.Data'#10':'#9
|
||||
+#0#0'6'#9#0#0'BM6'#9#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0' '#0
|
||||
+#0#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ButtonC'
|
||||
+'lick'#0#0#0
|
||||
]);
|
||||
|
@ -5,7 +5,8 @@ unit framefunctionlist;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, ComCtrls, StdCtrls, Controls;
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, ComCtrls, StdCtrls, Controls,
|
||||
ExtCtrls, Buttons;
|
||||
|
||||
type
|
||||
|
||||
@ -14,13 +15,18 @@ type
|
||||
TFunctionListFrame = class(TFrame)
|
||||
editSearchList: TEdit;
|
||||
FunctionList: TTreeView;
|
||||
FunctionListLabel: TLabel;
|
||||
CloseButton: TSpeedButton;
|
||||
procedure editSearchListChange(Sender: TObject);
|
||||
procedure FrameEndDock(Sender, Target: TObject; X, Y: Integer);
|
||||
procedure FunctionListDblClick(Sender: TObject);
|
||||
procedure FunctionListDeletion(Sender: TObject; Node: TTreeNode);
|
||||
procedure FunctionListLabelMouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure FunctionListMouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure FunctionListMouseUp(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure DockFormOnClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure CloseButtonClick(Sender: TObject);
|
||||
private
|
||||
FFilterTree : TTreeView;
|
||||
procedure FilterTreeVis(Vis : boolean);
|
||||
@ -36,7 +42,7 @@ type
|
||||
CompletionStart : string;
|
||||
property FilterTree : TTreeView read GetFilterTree;
|
||||
procedure LoadScriptTree( Script : String);
|
||||
function Find(Next : boolean) : boolean;
|
||||
function Find(Next : boolean; backwards : boolean = false) : boolean;
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
@ -52,6 +58,38 @@ begin
|
||||
Find(false);
|
||||
end;
|
||||
|
||||
procedure TFunctionListFrame.FrameEndDock(Sender, Target: TObject; X, Y: Integer
|
||||
);
|
||||
begin
|
||||
if Target is TPanel then
|
||||
FunctionListLabel.Visible := True
|
||||
else if Target is TCustomDockForm then
|
||||
begin
|
||||
TCustomDockForm(Target).Caption := 'Function List';
|
||||
TCustomDockForm(Target).OnClose := @DockFormOnClose;
|
||||
Form1.SplitterFunctionList.Visible:= false;
|
||||
FunctionListLabel.Visible := false;
|
||||
// TCustomDockForm(frmFunctionList.Parent).BorderStyle:= bsNone;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFunctionListFrame.FunctionListDblClick(Sender: TObject);
|
||||
var
|
||||
Node : TTreeNode;
|
||||
begin
|
||||
if FilterTree.Visible then
|
||||
Node := FilterTree.Selected
|
||||
else
|
||||
node := FunctionList.Selected;
|
||||
if node<> nil then
|
||||
if node.Level > 0 then
|
||||
if node.Data <> nil then
|
||||
begin;
|
||||
Form1.CurrScript.SynEdit.InsertTextAtCaret( GetMethodName(PChar(node.Data),true));
|
||||
Form1.RefreshTab;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFunctionListFrame.FunctionListDeletion(Sender: TObject;
|
||||
Node: TTreeNode);
|
||||
begin
|
||||
@ -59,12 +97,24 @@ begin
|
||||
StrDispose(PChar(Node.Data));
|
||||
end;
|
||||
|
||||
procedure TFunctionListFrame.FunctionListLabelMouseDown(Sender: TObject;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
Self.DragKind := dkDock;
|
||||
Self.BeginDrag(false, 40);
|
||||
end;
|
||||
|
||||
procedure TFunctionListFrame.DockFormOnClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
begin
|
||||
CloseAction := caHide;
|
||||
Form1.MenuItemFunctionList.Checked := False;
|
||||
end;
|
||||
|
||||
procedure TFunctionListFrame.CloseButtonClick(Sender: TObject);
|
||||
begin
|
||||
self.Hide;
|
||||
Form1.MenuItemFunctionList.Checked := False;
|
||||
end;
|
||||
|
||||
procedure TFunctionListFrame.FilterTreeVis(Vis: boolean);
|
||||
begin
|
||||
@ -88,6 +138,7 @@ begin
|
||||
FFilterTree.OnMouseUp:= FunctionList.OnMouseUp;
|
||||
FFilterTree.OnChange:= FunctionList.OnChange;
|
||||
FFilterTree.OnExit := FunctionList.OnExit;
|
||||
FFilterTree.OnDblClick:= FunctionList.OnDblClick;
|
||||
Result := FFilterTree;
|
||||
//We do not want to delete the data from the FilterTree
|
||||
// FilterTree.OnDeletion:= FunctionList.OnDeletion;
|
||||
@ -115,9 +166,9 @@ begin
|
||||
ScriptNode.Expand(true);
|
||||
end;
|
||||
|
||||
function TFunctionListFrame.Find(Next : boolean) : boolean;
|
||||
function TFunctionListFrame.Find(Next : boolean; backwards : boolean = false) : boolean;
|
||||
var
|
||||
Start,Len,i,index,posi: Integer;
|
||||
Start,Len,i,index,posi,c: Integer;
|
||||
FoundFunction : boolean;
|
||||
LastSection : string;
|
||||
str : string;
|
||||
@ -151,11 +202,24 @@ begin
|
||||
exit;
|
||||
end;
|
||||
if FilterTree.Selected <> nil then
|
||||
Start := FilterTree.Selected.AbsoluteIndex + 1
|
||||
begin;
|
||||
if backwards then
|
||||
start := FilterTree.Selected.AbsoluteIndex - 1
|
||||
else
|
||||
Start := FilterTree.Selected.AbsoluteIndex + 1;
|
||||
end
|
||||
else
|
||||
Start := 0;
|
||||
begin
|
||||
if backwards then
|
||||
Start := FilterTree.Items.Count - 1
|
||||
else
|
||||
Start := 0;
|
||||
end;
|
||||
Len := FilterTree.Items.Count;
|
||||
for i := start to start + len - 1 do
|
||||
i := start + len; //This is for the backwards compatibily, we do mod anways.. it just makes sure -1 isn't negative.
|
||||
c := 0;
|
||||
while c < (len - 1) do
|
||||
begin;
|
||||
if FilterTree.Items[i mod len].Level = 1 then
|
||||
begin
|
||||
FilterTree.Items[i mod len].Selected:= true;
|
||||
@ -163,6 +227,12 @@ begin
|
||||
Result := true;
|
||||
break;
|
||||
end;
|
||||
if backwards then
|
||||
dec(i)
|
||||
else
|
||||
inc(i);
|
||||
inc(c);
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
FilterTree.Items.Clear;
|
||||
@ -267,20 +337,6 @@ begin
|
||||
DraggingNode := N;
|
||||
end;
|
||||
|
||||
procedure TFunctionListFrame.FunctionListMouseUp(Sender: TObject;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
var
|
||||
F: ^TCustomDockForm;
|
||||
begin
|
||||
if(Self.Parent is TCustomDockForm)then
|
||||
begin
|
||||
F := @Self.Parent; //can't typecast parent as a TCustomDockForm
|
||||
F^.Caption := 'Function List';
|
||||
F^.BorderStyle := bsSizeable;
|
||||
F^.OnClose := @DockFormOnClose;
|
||||
Form1.Splitter1.Hide;
|
||||
end;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I framefunctionlist.lrs}
|
||||
|
@ -1,5 +1,3 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TScriptFrame','FORMDATA',[
|
||||
'TPF0'#12'TScriptFrame'#11'ScriptFrame'#4'Left'#2#0#6'Height'#3'H'#1#3'Top'#2
|
||||
+#0#5'Width'#3#141#1#12'ClientHeight'#3'H'#1#11'ClientWidth'#3#141#1#8'TabOrd'
|
||||
|
@ -1,7 +1,7 @@
|
||||
object Form1: TForm1
|
||||
Left = 443
|
||||
Left = 273
|
||||
Height = 557
|
||||
Top = 303
|
||||
Top = 233
|
||||
Width = 734
|
||||
ActiveControl = ScriptPanel
|
||||
Caption = 'THA FUKING MUFASA'
|
||||
@ -381,12 +381,12 @@ object Form1: TForm1
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object Splitter1: TSplitter
|
||||
object SplitterFunctionList: TSplitter
|
||||
Left = 150
|
||||
Height = 296
|
||||
Top = 0
|
||||
Width = 5
|
||||
OnCanResize = Splitter1CanResize
|
||||
OnCanResize = SplitterFunctionListCanResize
|
||||
Visible = False
|
||||
end
|
||||
inline frmFunctionList: TFunctionListFrame
|
||||
@ -394,9 +394,10 @@ object Form1: TForm1
|
||||
Width = 150
|
||||
ClientHeight = 296
|
||||
ClientWidth = 150
|
||||
OnEndDock = nil
|
||||
TabOrder = 3
|
||||
inherited FunctionList: TTreeView
|
||||
Height = 275
|
||||
Height = 257
|
||||
Width = 150
|
||||
OnChange = FunctionListChange
|
||||
OnDeletion = nil
|
||||
@ -407,8 +408,12 @@ object Form1: TForm1
|
||||
Top = 275
|
||||
Width = 150
|
||||
OnExit = editSearchListExit
|
||||
OnKeyDown = editSearchListKeyDown
|
||||
OnKeyPress = editSearchListKeyPress
|
||||
end
|
||||
inherited FunctionListLabel: TLabel
|
||||
Width = 146
|
||||
end
|
||||
end
|
||||
end
|
||||
object MainMenu1: TMainMenu
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -41,9 +41,6 @@ uses
|
||||
SynEditMiscClasses, LMessages, Buttons, PairSplitter,about, framefunctionlist,
|
||||
ocr, updateform;
|
||||
|
||||
const
|
||||
SimbaVersion = 365;
|
||||
|
||||
type
|
||||
|
||||
{ TMufasaTab }
|
||||
@ -147,7 +144,7 @@ type
|
||||
SearchPanel: TPanel;
|
||||
ScriptPanel: TPanel;
|
||||
SpeedButtonSearch: TSpeedButton;
|
||||
Splitter1: TSplitter;
|
||||
SplitterFunctionList: TSplitter;
|
||||
TabPopup: TPopupMenu;
|
||||
TB_SaveAll: TToolButton;
|
||||
DebugTimer: TTimer;
|
||||
@ -221,6 +218,8 @@ type
|
||||
procedure CheckBoxMatchCaseClick(Sender: TObject);
|
||||
procedure CloseFindPanel;
|
||||
procedure editSearchListExit(Sender: TObject);
|
||||
procedure editSearchListKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
procedure editSearchListKeyPress(Sender: TObject; var Key: char);
|
||||
procedure FunctionListChange(Sender: TObject; Node: TTreeNode);
|
||||
procedure FunctionListEnter(Sender: TObject);
|
||||
@ -273,7 +272,7 @@ type
|
||||
Y: Integer; State: TDragState; var Accept: Boolean);
|
||||
procedure ScriptPopupPopup(Sender: TObject);
|
||||
procedure SpeedButtonSearchClick(Sender: TObject);
|
||||
procedure Splitter1CanResize(Sender: TObject; var NewSize: Integer;
|
||||
procedure SplitterFunctionListCanResize(Sender: TObject; var NewSize: Integer;
|
||||
var Accept: Boolean);
|
||||
procedure UpdateButtonClick(Sender: TObject);
|
||||
procedure UpdateMenuButtonClick(Sender: TObject);
|
||||
@ -323,6 +322,7 @@ const
|
||||
// Rip Mufasa -> Simba ftw
|
||||
//WindowTitle = 'Mufasa v2 - %s';//Title, where %s = the place of the filename.
|
||||
WindowTitle = 'Simba - %s';//Title, where %s = the place of the filename.
|
||||
SimbaVersion = 365;
|
||||
Panel_State = 0;
|
||||
Panel_ScriptName = 1;
|
||||
Panel_ScriptPath = 2;
|
||||
@ -374,20 +374,20 @@ begin
|
||||
begin
|
||||
frmFunctionList.Align := alLeft;
|
||||
PageControl1.Align := alRight;
|
||||
Splitter1.ResizeAnchor := akLeft;
|
||||
Splitter1.Align := alLeft;
|
||||
Splitter1.Left := frmFunctionList.Left + frmFunctionList.Width;
|
||||
SplitterFunctionList.ResizeAnchor := akLeft;
|
||||
SplitterFunctionList.Align := alLeft;
|
||||
SplitterFunctionList.Left := frmFunctionList.Left + frmFunctionList.Width;
|
||||
end else begin
|
||||
frmFunctionList.Align := alRight;
|
||||
PageControl1.Align := alLeft;
|
||||
Splitter1.ResizeAnchor := akRight;
|
||||
Splitter1.Align := alRight;
|
||||
Splitter1.Left := frmFunctionList.Left;
|
||||
SplitterFunctionList.ResizeAnchor := akRight;
|
||||
SplitterFunctionList.Align := alRight;
|
||||
SplitterFunctionList.Left := frmFunctionList.Left;
|
||||
end;
|
||||
PageControl1.Width := ScriptPanel.Width - (Source.DockRect.Right - Source.DockRect.Left);
|
||||
frmFunctionList.Width := ScriptPanel.Width - PageControl1.Width;
|
||||
PageControl1.Align := alClient;
|
||||
Splitter1.Show;
|
||||
SplitterFunctionList.Show;
|
||||
end;
|
||||
|
||||
procedure TForm1.ScriptPanelDockOver(Sender: TObject; Source: TDragDockObject; //is there a better way to do all of this?
|
||||
@ -416,7 +416,7 @@ begin
|
||||
CloseFindPanel;
|
||||
end;
|
||||
|
||||
procedure TForm1.Splitter1CanResize(Sender: TObject; var NewSize: Integer;
|
||||
procedure TForm1.SplitterFunctionListCanResize(Sender: TObject; var NewSize: Integer;
|
||||
var Accept: Boolean);
|
||||
begin
|
||||
if(NewSize > ScriptPanel.Width div 2)then
|
||||
@ -437,7 +437,8 @@ begin
|
||||
formWriteln('A new update of Simba is available!');
|
||||
end;
|
||||
{ Only check once, at startup }
|
||||
UpdateTimer.Enabled:=False;
|
||||
UpdateTimer.Interval:= 30 {mins} * 60 {secs} * 1000 {ms};//Every half hour
|
||||
// UpdateTimer.Enabled:=False;
|
||||
end;
|
||||
|
||||
procedure TForm1.UpdateMenuButtonClick(Sender: TObject);
|
||||
@ -818,10 +819,9 @@ begin
|
||||
if CurrScript.SynEdit.Focused or ScriptPopup.HandleAllocated then
|
||||
CurrScript.SynEdit.CopyToClipboard
|
||||
else if Memo1.Focused then
|
||||
begin;
|
||||
Writeln('WOT');
|
||||
Memo1.CopyToClipboard;
|
||||
end;
|
||||
Memo1.CopyToClipboard
|
||||
else
|
||||
Writeln(Sender.ToString);
|
||||
end;
|
||||
|
||||
procedure TForm1.ActionCutExecute(Sender: TObject);
|
||||
@ -1005,6 +1005,13 @@ begin
|
||||
frmFunctionList.editSearchList.Color := clWhite;
|
||||
if frmFunctionList.InCodeCompletion then
|
||||
begin;
|
||||
if frmFunctionList.FilterTree.Focused then
|
||||
begin;
|
||||
Writeln('This is currently not supported');
|
||||
CurrScript.SynEdit.Lines[frmFunctionList.CompletionCaret.y - 1] := frmFunctionList.CompletionStart;
|
||||
CurrScript.SynEdit.LogicalCaretXY:= point(frmFunctionList.CompletionCaret.x,frmFunctionList.CompletionCaret.y);
|
||||
CurrScript.SynEdit.SelEnd:= CurrScript.SynEdit.SelStart;
|
||||
end;
|
||||
frmFunctionList.InCodeCompletion:= false;
|
||||
CurrScript.SynEdit.SelectedColor.Style:= [];
|
||||
CurrScript.SynEdit.SelectedColor.Foreground:= clHighlightText;
|
||||
@ -1013,6 +1020,21 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.editSearchListKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
begin
|
||||
if key = vk_up then
|
||||
begin
|
||||
frmFunctionList.Find(True,true);
|
||||
key := 0;
|
||||
end else
|
||||
if key = vk_down then
|
||||
begin
|
||||
frmFunctionList.Find(true);
|
||||
key := 0;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.editSearchListKeyPress(Sender: TObject; var Key: char);
|
||||
var
|
||||
linetext : string;
|
||||
@ -1021,6 +1043,11 @@ begin
|
||||
begin;
|
||||
key := #0;
|
||||
frmFunctionList.Find(True);
|
||||
//See OnKeyUp
|
||||
{ end else if key = Chr(VK_UP) then //Up, go one up!
|
||||
begin;
|
||||
Writeln('hai');
|
||||
frmFunctionList.Find(false,true);}
|
||||
end else
|
||||
if frmFunctionList.InCodeCompletion then
|
||||
begin;
|
||||
@ -1068,7 +1095,6 @@ begin
|
||||
StatusBar.Panels[2].Text:= '';
|
||||
end;
|
||||
|
||||
|
||||
procedure TForm1.MenuItemColourHistoryClick(Sender: TObject);
|
||||
begin
|
||||
MenuItemColourHistory.Checked := not ColourHistoryForm.Visible;
|
||||
@ -1169,6 +1195,7 @@ begin
|
||||
Writeln(format('Sucesfully deleted the file? %s',[BoolToStr(DeleteFile(Application.ExeName + '_old_'),true)]));
|
||||
end;
|
||||
{$endif}
|
||||
frmFunctionList.OnEndDock:= @frmFunctionList.FrameEndDock;
|
||||
// Ed
|
||||
end;
|
||||
|
||||
@ -1541,10 +1568,10 @@ begin
|
||||
begin
|
||||
if FunctionList.Items.Count = 0 then
|
||||
MenuitemFillFunctionListClick(nil);
|
||||
|
||||
FrameEndDock(frmFunctionList,frmFunctionList.Parent,0,0);//Set the label correctly
|
||||
if(frmFunctionList.Parent is TPanel)then
|
||||
begin
|
||||
Splitter1.Show;
|
||||
SplitterFunctionList.Show;
|
||||
frmFunctionList.Show;
|
||||
end else frmFunctionList.Parent.Show;
|
||||
if Self.Visible then
|
||||
@ -1557,7 +1584,7 @@ begin
|
||||
frmFunctionList.Hide
|
||||
else
|
||||
frmFunctionList.Parent.Hide;
|
||||
Splitter1.Hide;
|
||||
SplitterFunctionList.Hide;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -12,6 +12,15 @@ type
|
||||
|
||||
{ TSimbaUpdateForm }
|
||||
|
||||
{ TSimbaVersionThread }
|
||||
|
||||
TSimbaVersionThread = class(TThread)
|
||||
public
|
||||
ResultStr : string;
|
||||
InputURL : string;
|
||||
Done : boolean;
|
||||
procedure Execute; override;
|
||||
end;
|
||||
TSimbaUpdateForm = class(TForm)
|
||||
UpdateLog: TMemo;
|
||||
UpdateButton: TButton;
|
||||
@ -30,7 +39,7 @@ type
|
||||
Updater: TMMLFileDownloader;
|
||||
FCancelling: Boolean;
|
||||
FSimbaVersion: Integer;
|
||||
|
||||
SimbaVersionThread : TSimbaVersionThread;
|
||||
private
|
||||
function OnUpdateBeat: Boolean;
|
||||
function GetLatestSimbaVersion: Integer;
|
||||
@ -41,6 +50,7 @@ type
|
||||
FCancelled: Boolean;
|
||||
end;
|
||||
|
||||
|
||||
var
|
||||
SimbaUpdateForm: TSimbaUpdateForm;
|
||||
|
||||
@ -59,7 +69,25 @@ end;
|
||||
|
||||
function TSimbaUpdateForm.GetLatestSimbaVersion: Integer;
|
||||
begin
|
||||
FSimbaVersion := StrToIntDef(Trim(GetPage('http://old.villavu.com/merlijn/Simba'{$IFDEF WINDOWS} +'.exe'{$ENDIF} + '.version')), -1);
|
||||
if SimbaVersionThread = nil then//Create thread (only if no-other one is already running)
|
||||
begin
|
||||
SimbaVersionThread := TSimbaVersionThread.Create(true);
|
||||
SimbaVersionThread.InputURL:= 'http://old.villavu.com/merlijn/Simba'{$IFDEF WINDOWS} +'.exe'{$ENDIF} + '.version';
|
||||
SimbaVersionThread.Resume;
|
||||
while SimbaVersionThread.Done = false do//Wait till thread is done
|
||||
begin
|
||||
Application.ProcessMessages;
|
||||
Sleep(50);
|
||||
end;
|
||||
FSimbaVersion := StrToIntDef(Trim(SimbaVersionThread.ResultStr), -1);//Read output
|
||||
FreeAndNil(SimbaVersionThread);//Free the thread
|
||||
end else
|
||||
//Another thread is already running, lets wait for it! (When it's nil, it means that the result is written!)
|
||||
while SimbaVersionThread = nil do
|
||||
begin;
|
||||
Application.ProcessMessages;
|
||||
Sleep(50);
|
||||
end;
|
||||
Exit(FSimbaVersion);
|
||||
end;
|
||||
|
||||
@ -144,6 +172,14 @@ begin
|
||||
Self.UpdateLog.Lines.Add('Please restart all currently running Simba binaries.');
|
||||
end;
|
||||
|
||||
{ TSimbaVersionThread }
|
||||
|
||||
procedure TSimbaVersionThread.Execute;
|
||||
begin
|
||||
ResultStr:= GetPage(InputURL);
|
||||
done := true;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I updateform.lrs}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user