Improved UI calls

This commit is contained in:
=
2026-05-05 20:21:05 +02:00
parent 5882f3865d
commit abeb8c0902
5 changed files with 88 additions and 57 deletions
+6 -7
View File
@@ -16,16 +16,15 @@ public partial class RobotList : PanelContainer
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta)
{
if (Input.IsActionJustPressed("robot_list"))
{
ShowList();
}
}
public void ShowList()
public override void _Notification(int id)
{
Visible = !Visible;
if (Visible) ReloadRobots();
if (id == NotificationVisibilityChanged)
{
if (Visible) ReloadRobots();
}
}
public void ReloadRobots()