Cleaned up project with better structure.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using Godot;
|
||||
|
||||
public partial class RobotDisplay : PanelContainer
|
||||
{
|
||||
[Export] public RichTextLabel listItem;
|
||||
[Export] public RichTextLabel currentScript;
|
||||
[Signal]
|
||||
public delegate void OnRobotJumpToEventHandler(Robot robot);
|
||||
public Robot robot;
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
string programName = robot.currentProgram ?? "";
|
||||
if (programName != currentScript.Text)
|
||||
{
|
||||
currentScript.Text = programName;
|
||||
}
|
||||
}
|
||||
|
||||
public void OnJumpToClicked()
|
||||
{
|
||||
EmitSignal(SignalName.OnRobotJumpTo, robot);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user