Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | idkgamedev |
Hey. I’m making a HBoxContainer and it’s children disappear in a tween node, but when i try, i get this.
Here’s all the necessary code
func _notification(what: int) -> void:
match what:
NOTIFICATION_WM_MOUSE_ENTER:
show_buttons()
NOTIFICATION_WM_MOUSE_EXIT:
hide_buttons()
func show_buttons() -> void:
$Buttons.show()
$Buttons.set_mouse_filter(Control.MOUSE_FILTER_PASS)
$Tween.interpolate_property(
$Buttons,
'modulate',
$Buttons.get_modulate(),
Color(255, 255, 255, 0),
0.75,
Tween.TRANS_SINE,
Tween.EASE_IN
)
$Tween.start()
func hide_buttons() -> void:
$Buttons.show()
$Buttons.set_mouse_filter(Control.MOUSE_FILTER_IGNORE)
$Tween.interpolate_property(
$Buttons,
'modulate',
$Buttons.get_modulate(),
Color(255, 255, 255, 255),
0.75,
Tween.TRANS_SINE,
Tween.EASE_OUT
)
$Tween.start()
$Buttons.hide()