Skip to content

Commit

Permalink
fast FSM preview with ctrl+shift+f
Browse files Browse the repository at this point in the history
  • Loading branch information
kubecz3k committed Jun 19, 2017
1 parent f9bceb4 commit f27282d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions addons/net.kivano.fsm/content/FSMGraph/FSMGraphUI/FSMGraphUI.gd
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ func manualInit(inFsm):
graph.manualInit(inFsm);

func _input(event):

#fast preview with ctrl+shift+f
if(event.type==InputEvent.KEY):
if(event.is_pressed() && event.scancode==KEY_F && event.shift && event.control):
if(is_visible()):
hide();
else:
show();
get_tree().set_input_as_handled();

if(event.type==InputEvent.MOUSE_BUTTON):
if(event.global_pos.y<get_global_pos().y):
if(event.global_pos.x<(get_rect().size).x):
Expand Down

0 comments on commit f27282d

Please sign in to comment.