mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2025-02-16 19:35:39 +00:00
Rekku says description on mouse hover
This commit is contained in:
parent
f0b3b2ccd8
commit
210c9bdc4b
|
@ -2,7 +2,21 @@ extends Control
|
|||
|
||||
func _ready():
|
||||
$MarginContainer/TabContainer/System/ScrollContainer/VBoxContainer/game_control_container/GridContainer/resume.grab_focus() #Required to enable controller focusing
|
||||
var children = findElements(self, "Control")
|
||||
#print(children)
|
||||
for n: Control in children:
|
||||
n.mouse_entered.connect(_on_control_mouse_entered.bind(n))
|
||||
|
||||
func _input(event):
|
||||
if event.is_action_pressed("quit"):
|
||||
get_tree().quit()
|
||||
|
||||
func findElements(node: Node, className: String, result: Array = []) -> Array:
|
||||
if node.is_class(className):
|
||||
result.push_back(node)
|
||||
for child in node.get_children():
|
||||
result = findElements(child, className, result)
|
||||
return result
|
||||
|
||||
func _on_control_mouse_entered(control: Node):
|
||||
control.grab_focus()
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue