Improved UI calls
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user