mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 15:39:49 +00:00
LineEdit release focus on Enter key pressed
This commit is contained in:
parent
096a81d61c
commit
54ed08357d
|
@ -990,7 +990,7 @@ script = ExtResource( 15 )
|
||||||
margin_left = 16.0
|
margin_left = 16.0
|
||||||
margin_right = 692.0
|
margin_right = 692.0
|
||||||
margin_bottom = 392.0
|
margin_bottom = 392.0
|
||||||
focus_mode = 1
|
focus_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
stretch = true
|
stretch = true
|
||||||
|
@ -1048,6 +1048,9 @@ rect_min_size = Vector2( 224, 0 )
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
margin_top = 16.0
|
margin_top = 16.0
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
[node name="CanvasPreview" type="ViewportContainer" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes"]
|
[node name="CanvasPreview" type="ViewportContainer" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes"]
|
||||||
margin_right = 224.0
|
margin_right = 224.0
|
||||||
|
|
|
@ -189,6 +189,11 @@ func _input(event : InputEvent) -> void:
|
||||||
Global.left_cursor.texture = Global.left_cursor_tool_texture
|
Global.left_cursor.texture = Global.left_cursor_tool_texture
|
||||||
Global.right_cursor.position = get_global_mouse_position() + Vector2(32, 32)
|
Global.right_cursor.position = get_global_mouse_position() + Vector2(32, 32)
|
||||||
Global.right_cursor.texture = Global.right_cursor_tool_texture
|
Global.right_cursor.texture = Global.right_cursor_tool_texture
|
||||||
|
|
||||||
|
if event is InputEventKey && (event.scancode == KEY_ENTER || event.scancode == KEY_KP_ENTER):
|
||||||
|
if get_focus_owner() is LineEdit:
|
||||||
|
get_focus_owner().release_focus()
|
||||||
|
|
||||||
if event.is_action_pressed("toggle_fullscreen"):
|
if event.is_action_pressed("toggle_fullscreen"):
|
||||||
OS.window_fullscreen = !OS.window_fullscreen
|
OS.window_fullscreen = !OS.window_fullscreen
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue