mirror of
https://github.com/moparisthebest/Simba
synced 2025-02-16 07:10:10 -05:00
Added goto dialog
This commit is contained in:
parent
ffe9fd2b2a
commit
2d530e0b4e
@ -1111,6 +1111,12 @@ object SimbaForm: TSimbaForm
|
|||||||
Action = ActionReplace
|
Action = ActionReplace
|
||||||
OnClick = ActionReplaceExecute
|
OnClick = ActionReplaceExecute
|
||||||
end
|
end
|
||||||
|
object MenuItemDivider50: TMenuItem
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object MenuItemGoto: TMenuItem
|
||||||
|
Action = ActionGoto
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object MenuItemScript: TMenuItem
|
object MenuItemScript: TMenuItem
|
||||||
Caption = '&Script'
|
Caption = '&Script'
|
||||||
@ -3007,6 +3013,11 @@ object SimbaForm: TSimbaForm
|
|||||||
Enabled = False
|
Enabled = False
|
||||||
OnExecute = ActionCPascalExecute
|
OnExecute = ActionCPascalExecute
|
||||||
end
|
end
|
||||||
|
object ActionGoto: TAction
|
||||||
|
Caption = 'Goto line'
|
||||||
|
OnExecute = ActionGotoExecute
|
||||||
|
ShortCut = 16455
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object DebugTimer: TTimer
|
object DebugTimer: TTimer
|
||||||
OnTimer = ProcessDebugStream
|
OnTimer = ProcessDebugStream
|
||||||
|
@ -70,6 +70,7 @@ type
|
|||||||
{ TSimbaForm }
|
{ TSimbaForm }
|
||||||
|
|
||||||
TSimbaForm = class(TForm)
|
TSimbaForm = class(TForm)
|
||||||
|
ActionGoto: TAction;
|
||||||
ActionCPascal: TAction;
|
ActionCPascal: TAction;
|
||||||
ActionRUTIS: TAction;
|
ActionRUTIS: TAction;
|
||||||
ActionPascalScript: TAction;
|
ActionPascalScript: TAction;
|
||||||
@ -114,6 +115,8 @@ type
|
|||||||
MenuHelp: TMenuItem;
|
MenuHelp: TMenuItem;
|
||||||
MenuDivider7: TMenuItem;
|
MenuDivider7: TMenuItem;
|
||||||
MenuInterpreters: TMenuItem;
|
MenuInterpreters: TMenuItem;
|
||||||
|
MenuItemGoto: TMenuItem;
|
||||||
|
MenuItemDivider50: TMenuItem;
|
||||||
MenuItemPascalScript: TMenuItem;
|
MenuItemPascalScript: TMenuItem;
|
||||||
MenuItemCPascal: TMenuItem;
|
MenuItemCPascal: TMenuItem;
|
||||||
MenuItemRUTIS: TMenuItem;
|
MenuItemRUTIS: TMenuItem;
|
||||||
@ -250,6 +253,7 @@ type
|
|||||||
procedure ActionExtensionsUpdate(Sender: TObject);
|
procedure ActionExtensionsUpdate(Sender: TObject);
|
||||||
procedure ActionFindNextExecute(Sender: TObject);
|
procedure ActionFindNextExecute(Sender: TObject);
|
||||||
procedure ActionFindstartExecute(Sender: TObject);
|
procedure ActionFindstartExecute(Sender: TObject);
|
||||||
|
procedure ActionGotoExecute(Sender: TObject);
|
||||||
procedure ActionNewExecute(Sender: TObject);
|
procedure ActionNewExecute(Sender: TObject);
|
||||||
procedure ActionNewTabExecute(Sender: TObject);
|
procedure ActionNewTabExecute(Sender: TObject);
|
||||||
procedure ActionNormalSizeExecute(Sender: TObject);
|
procedure ActionNormalSizeExecute(Sender: TObject);
|
||||||
@ -1701,6 +1705,22 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TSimbaForm.ActionGotoExecute(Sender: TObject);
|
||||||
|
var
|
||||||
|
Value : string;
|
||||||
|
P : TPoint;
|
||||||
|
begin
|
||||||
|
Value := '';
|
||||||
|
if InputQuery('Goto line','Goto line:',Value) then
|
||||||
|
begin
|
||||||
|
P.x := 1;
|
||||||
|
P.y := StrToIntDef(Value,-1);
|
||||||
|
if p.y < 1 then p.y :=1;
|
||||||
|
CurrScript.SynEdit.CaretXY := p;
|
||||||
|
CurrScript.SynEdit.TopLine:= max(P.y - (CurrScript.SynEdit.LinesInWindow div 2),1);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TSimbaForm.ActionClearDebugExecute(Sender: TObject);
|
procedure TSimbaForm.ActionClearDebugExecute(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Memo1.Clear;
|
Memo1.Clear;
|
||||||
|
Loading…
Reference in New Issue
Block a user