1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-03-12 22:35:18 +00:00

Merge pull request #172 from Gaarco/master

Fix LineEdit holding focus when it's not required
This commit is contained in:
Manolis Papadeas 2020-03-14 13:56:32 +02:00 committed by GitHub
commit f9ee251b01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 6 deletions

View file

@ -116,6 +116,9 @@ __meta__ = {
anchor_right = 1.0
anchor_bottom = 1.0
custom_constants/separation = 0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TopMenuContainer" type="Panel" parent="MenuAndUI"]
margin_right = 1152.0
@ -987,6 +990,7 @@ script = ExtResource( 15 )
margin_left = 16.0
margin_right = 692.0
margin_bottom = 392.0
focus_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
stretch = true
@ -1044,6 +1048,9 @@ rect_min_size = Vector2( 224, 0 )
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = 16.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="CanvasPreview" type="ViewportContainer" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes"]
margin_right = 224.0
@ -1222,6 +1229,7 @@ columns = 5
[node name="SplashDialog" parent="." instance=ExtResource( 27 )]
[node name="CreateNewImage" parent="." instance=ExtResource( 28 )]
window_title = "Please Confirm..."
[node name="OpenSprite" type="FileDialog" parent="."]
margin_right = 515.0
@ -1231,8 +1239,8 @@ resizable = true
mode = 0
access = 2
filters = PoolStringArray( "*.pxo ; Pixelorama Project" )
current_dir = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama"
current_path = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama/"
current_dir = "/home/marco/Pixelorama"
current_path = "/home/marco/Pixelorama/"
[node name="SaveSprite" type="FileDialog" parent="."]
anchor_left = 0.5
@ -1247,27 +1255,35 @@ window_title = "Save Sprite as .pxo"
resizable = true
access = 2
filters = PoolStringArray( "*.pxo ; Pixelorama Project" )
current_dir = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama"
current_path = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama/"
current_dir = "/home/marco/Pixelorama"
current_path = "/home/marco/Pixelorama/"
[node name="ImportSprites" parent="." instance=ExtResource( 29 )]
current_dir = "/home/marco/Pixelorama"
current_path = "/home/marco/Pixelorama/"
[node name="ExportSprites" parent="." instance=ExtResource( 30 )]
current_dir = "/home/marco/Pixelorama"
current_path = "/home/marco/Pixelorama/"
[node name="ScaleImage" parent="." instance=ExtResource( 31 )]
window_title = "Please Confirm..."
[node name="PreferencesDialog" parent="." instance=ExtResource( 32 )]
[node name="RotateImage" parent="." instance=ExtResource( 38 )]
window_title = "Please Confirm..."
[node name="OutlineDialog" parent="." instance=ExtResource( 33 )]
visible = false
window_title = "Please Confirm..."
[node name="AboutDialog" parent="." instance=ExtResource( 34 )]
[node name="QuitDialog" type="ConfirmationDialog" parent="."]
margin_right = 200.0
margin_bottom = 70.0
window_title = "Please Confirm..."
resizable = true
dialog_text = "Are you sure you want to exit Pixelorama?"
@ -1293,8 +1309,8 @@ dialog_text = "This is an error message!"
[node name="PaletteImportFileDialog" parent="." instance=ExtResource( 37 )]
filters = PoolStringArray( "*.json ; JavaScript Object Notation", "*.gpl ; Gimp Palette Library", "*.png; Portable Network Graphics" )
current_dir = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama"
current_path = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama/"
current_dir = "/home/marco/Pixelorama"
current_path = "/home/marco/Pixelorama/"
[node name="LeftCursor" type="Sprite" parent="."]
visible = false

View file

@ -189,6 +189,11 @@ func _input(event : InputEvent) -> void:
Global.left_cursor.texture = Global.left_cursor_tool_texture
Global.right_cursor.position = get_global_mouse_position() + Vector2(32, 32)
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"):
OS.window_fullscreen = !OS.window_fullscreen