2021-03-02 13:03:02 +01:00
|
|
|
tool
|
|
|
|
extends PanelContainer
|
|
|
|
|
2021-03-02 21:41:24 +01:00
|
|
|
var plugin
|
2021-03-02 13:03:02 +01:00
|
|
|
|
|
|
|
func _unhandled_key_input(event : InputEventKey) -> void:
|
2021-03-02 21:41:24 +01:00
|
|
|
if event.echo:
|
|
|
|
return
|
|
|
|
|
2021-03-02 13:03:02 +01:00
|
|
|
#if event.key
|
|
|
|
if event.scancode == KEY_G:
|
2021-03-02 21:41:24 +01:00
|
|
|
|
2021-03-02 13:03:02 +01:00
|
|
|
#translate
|
2021-03-02 21:41:24 +01:00
|
|
|
if plugin:
|
2021-03-15 15:02:25 +01:00
|
|
|
plugin.translate_key_pressed(event.pressed)
|
2021-03-02 13:03:02 +01:00
|
|
|
elif event.scancode == KEY_S:
|
|
|
|
#scale? probably needs a differrent key
|
2021-03-02 21:41:24 +01:00
|
|
|
if plugin:
|
2021-03-15 15:02:25 +01:00
|
|
|
plugin.scale_key_pressed(event.pressed)
|
2021-03-02 13:03:02 +01:00
|
|
|
elif event.scancode == KEY_R:
|
|
|
|
#rotate
|
2021-03-02 21:41:24 +01:00
|
|
|
if plugin:
|
2021-03-15 15:02:25 +01:00
|
|
|
plugin.rotate_key_pressed(event.pressed)
|
2021-03-02 21:41:24 +01:00
|
|
|
elif event.scancode == KEY_X:
|
|
|
|
if plugin:
|
|
|
|
plugin.axis_key_x(event.pressed)
|
|
|
|
elif event.scancode == KEY_Y:
|
|
|
|
if plugin:
|
|
|
|
plugin.axis_key_y(event.pressed)
|
|
|
|
elif event.scancode == KEY_Z:
|
|
|
|
if plugin:
|
|
|
|
plugin.axis_key_z(event.pressed)
|