mirror of
https://github.com/JohnBreaux/Boat-Battle.git
synced 2025-02-04 12:28:35 +00:00
Improve menuing, and convert ships to RigidBody2D for accurate positioning.
This commit is contained in:
@@ -1,9 +1,4 @@
|
||||
extends LineEdit
|
||||
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
# var a = 2
|
||||
# var b = "text"
|
||||
|
||||
func _on_Debug_clear_in():
|
||||
clear()
|
||||
|
||||
@@ -3,7 +3,7 @@ extends TextEdit
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
var _errno = MessageBus.connect("print_console", self, "_on_Debug_print_text")
|
||||
pass # Replace with function body.
|
||||
grab_focus()
|
||||
|
||||
|
||||
func _on_Debug_print_text(text):
|
||||
|
||||
@@ -48,7 +48,7 @@ func _input(event):
|
||||
# open debug menu
|
||||
debug_active = !debug_active;
|
||||
# Hand the keyboard focus to the next valid focus
|
||||
if (!debug_active): find_next_valid_focus().grab_focus()
|
||||
if (!debug_active) && find_next_valid_focus(): find_next_valid_focus().grab_focus()
|
||||
|
||||
func _on_LineEdit_text_entered(line):
|
||||
emit_signal("clear_in")
|
||||
|
||||
Reference in New Issue
Block a user