1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-24 18:22:25 -05:00

Started on the function list. So far you can drag objects from it into the script, though it just inserts "will implement later" into the script for now...

git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@317 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
bullzeye95 2009-12-22 08:57:10 +00:00
parent fdf4b9ee35
commit 36d0cc2f9c
7 changed files with 2453 additions and 2393 deletions

View File

@ -22,6 +22,8 @@ object ScriptFrame: TScriptFrame
ParentFont = False
PopupMenu = Form1.ScriptPopup
TabOrder = 0
OnDragDrop = SynEditDragDrop
OnDragOver = SynEditDragOver
OnKeyDown = SynEditKeyDown
Gutter.Width = 57
Gutter.MouseActions = <
@ -712,7 +714,7 @@ object ScriptFrame: TScriptFrame
DirectiveAttri.Foreground = clRed
DirectiveAttri.Style = [fsBold]
CompilerMode = pcmObjFPC
NestedComments = False
NestedComments = True
left = 320
top = 16
end

View File

@ -7,8 +7,9 @@ LazarusResources.Add('TScriptFrame','FORMDATA',[
+'dit'#4'Left'#2#0#6'Height'#3'H'#1#3'Top'#2#0#5'Width'#3#141#1#5'Align'#7#8
+'alClient'#11'Font.Height'#2#243#9'Font.Name'#6#11'Courier New'#10'Font.Pitc'
+'h'#7#7'fpFixed'#12'Font.Quality'#7#16'fqNonAntialiased'#11'ParentColor'#8#10
+'ParentFont'#8#9'PopupMenu'#7#17'Form1.ScriptPopup'#8'TabOrder'#2#0#9'OnKeyD'
+'own'#7#14'SynEditKeyDown'#12'Gutter.Width'#2'9'#19'Gutter.MouseActions'#14#1
+'ParentFont'#8#9'PopupMenu'#7#17'Form1.ScriptPopup'#8'TabOrder'#2#0#10'OnDra'
+'gDrop'#7#15'SynEditDragDrop'#10'OnDragOver'#7#15'SynEditDragOver'#9'OnKeyDo'
+'wn'#7#14'SynEditKeyDown'#12'Gutter.Width'#2'9'#19'Gutter.MouseActions'#14#1
+#5'Shift'#11#0#9'ShiftMask'#11#0#6'Button'#7#6'mbLeft'#10'ClickCount'#7#5'cc'
+'Any'#8'ClickDir'#7#6'cdDown'#7'Command'#2#13#9'MoveCaret'#8#6'Option'#2#0#8
+'Priority'#2#0#0#1#5'Shift'#11#0#9'ShiftMask'#11#0#6'Button'#7#7'mbRight'#10
@ -64,8 +65,8 @@ LazarusResources.Add('TScriptFrame','FORMDATA',[
+'7`'#0#1#7'Command'#7#12'ecSetMarker8'#8'ShortCut'#3'8`'#0#1#7'Command'#7#12
+'ecSetMarker9'#8'ShortCut'#3'9`'#0#1#7'Command'#7#12'EcFoldLevel1'#8'ShortCu'
+'t'#4'1'#160#0#0#0#1#7'Command'#7#12'EcFoldLevel2'#8'ShortCut'#4'2'#160#0#0#0
+#1#7'Command'#7#12'EcFoldLevel1'#8'ShortCut'#4'3'#160#0#0#0#1#7'Command'#7#12
,'EcFoldLevel1'#8'ShortCut'#4'4'#160#0#0#0#1#7'Command'#7#12'EcFoldLevel1'#8
,#1#7'Command'#7#12'EcFoldLevel1'#8'ShortCut'#4'3'#160#0#0#0#1#7'Command'#7#12
+'EcFoldLevel1'#8'ShortCut'#4'4'#160#0#0#0#1#7'Command'#7#12'EcFoldLevel1'#8
+'ShortCut'#4'5'#160#0#0#0#1#7'Command'#7#12'EcFoldLevel6'#8'ShortCut'#4'6'
+#160#0#0#0#1#7'Command'#7#12'EcFoldLevel7'#8'ShortCut'#4'7'#160#0#0#0#1#7'Co'
+'mmand'#7#12'EcFoldLevel8'#8'ShortCut'#4'8'#160#0#0#0#1#7'Command'#7#12'EcFo'
@ -128,8 +129,8 @@ LazarusResources.Add('TScriptFrame','FORMDATA',[
+#8'ccSingle'#8'ClickDir'#7#4'cdUp'#7'Command'#2#16#9'MoveCaret'#8#6'Option'#2
+#0#8'Priority'#2#0#0#1#5'Shift'#11#0#9'ShiftMask'#11#7'ssShift'#0#6'Button'#7
+#8'mbMiddle'#10'ClickCount'#7#5'ccAny'#8'ClickDir'#7#6'cdDown'#7'Command'#2
+#14#9'MoveCaret'#8#6'Option'#2#0#8'Priority'#2#0#0#1#5'Shift'#11#7'ssShift'#0
,#9'ShiftMask'#11#7'ssShift'#0#6'Button'#7#8'mbMiddle'#10'ClickCount'#7#5'ccA'
,#14#9'MoveCaret'#8#6'Option'#2#0#8'Priority'#2#0#0#1#5'Shift'#11#7'ssShift'#0
+#9'ShiftMask'#11#7'ssShift'#0#6'Button'#7#8'mbMiddle'#10'ClickCount'#7#5'ccA'
+'ny'#8'ClickDir'#7#6'cdDown'#7'Command'#2#14#9'MoveCaret'#8#6'Option'#2#1#8
+'Priority'#2#0#0#1#5'Shift'#11#0#9'ShiftMask'#11#0#6'Button'#7#6'mbLeft'#10
+'ClickCount'#7#5'ccAny'#8'ClickDir'#7#6'cdDown'#7'Command'#2#0#9'MoveCaret'#8
@ -148,5 +149,5 @@ LazarusResources.Add('TScriptFrame','FORMDATA',[
+'.Foreground'#7#6'clNavy'#22'StringAttri.Foreground'#7#6'clBlue'#22'SymbolAt'
+'tri.Foreground'#7#5'clRed'#25'DirectiveAttri.Foreground'#7#5'clRed'#20'Dire'
+'ctiveAttri.Style'#11#6'fsBold'#0#12'CompilerMode'#7#9'pcmObjFPC'#14'NestedC'
+'omments'#8#4'left'#3'@'#1#3'top'#2#16#0#0#0
+'omments'#9#4'left'#3'@'#1#3'top'#2#16#0#0#0
]);

View File

@ -44,6 +44,9 @@ type
SynEdit: TSynEdit;
SynFreePascalSyn1: TSynFreePascalSyn;
procedure SynEditChange(Sender: TObject);
procedure SynEditDragDrop(Sender, Source: TObject; X, Y: Integer);
procedure SynEditDragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
procedure SynEditKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState
);
procedure SynEditProcessCommand(Sender: TObject;
@ -89,6 +92,22 @@ begin
end;
end;
procedure TScriptFrame.SynEditDragDrop(Sender, Source: TObject; X, Y: Integer);
begin
SynEdit.InsertTextAtCaret('will implement later');
end;
procedure TScriptFrame.SynEditDragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
begin
Accept := Source = Form1.TreeView1;
if(Accept)then
begin
SynEdit.CaretXY := SynEdit.PixelsToLogicalPos(point(x, y));
Form1.ActiveControl := SynEdit;
end;
end;
procedure TScriptFrame.SynEditKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
object Form1: TForm1
Left = 474
Left = 446
Height = 557
Top = 246
Top = 224
Width = 731
ActiveControl = ScriptPanel
Caption = 'THA FUKING MUFASA'
@ -167,7 +167,7 @@ object Form1: TForm1
object StatusBar: TStatusBar
Left = 0
Height = 21
Top = 536
Top = 511
Width = 731
Panels = <
item
@ -185,7 +185,7 @@ object Form1: TForm1
object PanelMemo: TPanel
Left = 0
Height = 154
Top = 382
Top = 357
Width = 731
Align = alBottom
ClientHeight = 154
@ -205,28 +205,29 @@ object Form1: TForm1
Cursor = crVSplit
Left = 0
Height = 5
Top = 377
Top = 352
Width = 731
Align = alBottom
ResizeAnchor = akBottom
end
object ScriptPanel: TPanel
Left = 0
Height = 353
Height = 328
Top = 24
Width = 731
Align = alClient
BevelOuter = bvNone
Caption = 'ScriptPanel'
ClientHeight = 353
ClientHeight = 328
ClientWidth = 731
TabOrder = 4
object PageControl1: TPageControl
Left = 0
Height = 318
Left = 144
Height = 293
Top = 0
Width = 731
Align = alClient
Width = 587
Align = alRight
Anchors = [akTop, akLeft, akRight, akBottom]
Images = Mufasa_Image_List
PopupMenu = TabPopup
TabOrder = 0
@ -242,7 +243,7 @@ object Form1: TForm1
object SearchPanel: TPanel
Left = 0
Height = 35
Top = 318
Top = 293
Width = 731
Align = alBottom
BevelOuter = bvSpace
@ -370,6 +371,25 @@ object Form1: TForm1
TabOrder = 1
end
end
object TreeView1: TTreeView
Left = 0
Height = 293
Top = 0
Width = 141
Align = alLeft
DefaultItemHeight = 19
ReadOnly = True
ScrollBars = ssAutoBoth
TabOrder = 2
OnMouseDown = TreeView1MouseDown
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips]
Items.Data = {
F9FFFFFF020001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF020000000000
00000005000000436F6C6F72FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000
00000000000900000046696E64436F6C6F72FFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFF00000000000000000008000000476574436F6C6F72
}
end
end
object MainMenu1: TMainMenu
left = 528

File diff suppressed because it is too large Load Diff

View File

@ -179,6 +179,7 @@ type
ToolButton8: TToolButton;
TB_Convert: TToolButton;
MTrayIcon: TTrayIcon;
TreeView1: TTreeView;
procedure ActionClearDebugExecute(Sender: TObject);
procedure ActionCloseTabExecute(Sender: TObject);
procedure ActionCopyExecute(Sender: TObject);
@ -246,6 +247,8 @@ type
procedure ProcessDebugStream(Sender: TObject);
procedure ScriptPopupPopup(Sender: TObject);
procedure SpeedButtonSearchClick(Sender: TObject);
procedure TreeView1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
private
PopupTab : integer;
SearchStart : TPoint;
@ -341,6 +344,13 @@ begin
CloseFindPanel;
end;
procedure TForm1.TreeView1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if(Button = mbLeft)then
TreeView1.BeginDrag(False, 10); //BeginDrag(False, 10);
end;
procedure formWriteln( S : String);
begin
writeln('formWriteln: ' + s);
@ -1172,11 +1182,7 @@ var
Pos: Integer;
begin
Pos := PageControl1.TabIndexAtClientPos(Point(x,y));
if (Pos <> PageControl1.TabIndex) and (Pos <> -1) then
PageControl1.DragCursor := crDrag
else
PageControl1.DragCursor := crNo;
Accept := PageControl1.DragCursor = crDrag;
Accept := (Pos <> PageControl1.TabIndex) and (Pos <> -1);
end;
procedure TForm1.PageControl1MouseDown(Sender: TObject; Button: TMouseButton;
@ -1378,7 +1384,6 @@ begin
ScriptFrame := TScriptFrame.Create(Tabsheet);
ScriptFrame.Parent := Tabsheet;
ScriptFrame.Align:= alClient;
end;
constructor TMufasaTab.Create(Page: TPageControl);