mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-21 08:45:06 -05:00
Added goto dialog
This commit is contained in:
parent
ffe9fd2b2a
commit
2d530e0b4e
@ -1111,6 +1111,12 @@ object SimbaForm: TSimbaForm
|
||||
Action = ActionReplace
|
||||
OnClick = ActionReplaceExecute
|
||||
end
|
||||
object MenuItemDivider50: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
object MenuItemGoto: TMenuItem
|
||||
Action = ActionGoto
|
||||
end
|
||||
end
|
||||
object MenuItemScript: TMenuItem
|
||||
Caption = '&Script'
|
||||
@ -3007,6 +3013,11 @@ object SimbaForm: TSimbaForm
|
||||
Enabled = False
|
||||
OnExecute = ActionCPascalExecute
|
||||
end
|
||||
object ActionGoto: TAction
|
||||
Caption = 'Goto line'
|
||||
OnExecute = ActionGotoExecute
|
||||
ShortCut = 16455
|
||||
end
|
||||
end
|
||||
object DebugTimer: TTimer
|
||||
OnTimer = ProcessDebugStream
|
||||
|
@ -70,6 +70,7 @@ type
|
||||
{ TSimbaForm }
|
||||
|
||||
TSimbaForm = class(TForm)
|
||||
ActionGoto: TAction;
|
||||
ActionCPascal: TAction;
|
||||
ActionRUTIS: TAction;
|
||||
ActionPascalScript: TAction;
|
||||
@ -114,6 +115,8 @@ type
|
||||
MenuHelp: TMenuItem;
|
||||
MenuDivider7: TMenuItem;
|
||||
MenuInterpreters: TMenuItem;
|
||||
MenuItemGoto: TMenuItem;
|
||||
MenuItemDivider50: TMenuItem;
|
||||
MenuItemPascalScript: TMenuItem;
|
||||
MenuItemCPascal: TMenuItem;
|
||||
MenuItemRUTIS: TMenuItem;
|
||||
@ -250,6 +253,7 @@ type
|
||||
procedure ActionExtensionsUpdate(Sender: TObject);
|
||||
procedure ActionFindNextExecute(Sender: TObject);
|
||||
procedure ActionFindstartExecute(Sender: TObject);
|
||||
procedure ActionGotoExecute(Sender: TObject);
|
||||
procedure ActionNewExecute(Sender: TObject);
|
||||
procedure ActionNewTabExecute(Sender: TObject);
|
||||
procedure ActionNormalSizeExecute(Sender: TObject);
|
||||
@ -1701,6 +1705,22 @@ begin
|
||||
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);
|
||||
begin
|
||||
Memo1.Clear;
|
||||
|
Loading…
Reference in New Issue
Block a user