Split project
This commit is contained in:
40
Manual/ModulePolymorphismTab.cs
Normal file
40
Manual/ModulePolymorphismTab.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using Godot;
|
||||
using Nocturnis.DataStructures;
|
||||
using Nocturnis.Enigmos.ModuleManuals;
|
||||
using Nocturnis.Enigmos.Modules;
|
||||
using TabulaSmaragdina;
|
||||
|
||||
namespace Enigmos.Manual;
|
||||
|
||||
public partial class ModulePolymorphismTab : Panel, IModuleManualTab
|
||||
{
|
||||
private bool InitFlag { get; set; }
|
||||
|
||||
public void Init(IPolymorphismModule module)
|
||||
{
|
||||
Module = module;
|
||||
InitFlag = true;
|
||||
}
|
||||
|
||||
public string FullName() => "Polymorphism";
|
||||
|
||||
private static readonly PackedScene PortTypeSelectorScene =
|
||||
GlobalProvider.SceneProvider.AssetMapper<PortTypeSelector>();
|
||||
public IPolymorphismModule Module { get; set; }
|
||||
private VBoxContainer PortGroups { get; set; }
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
if (!InitFlag)
|
||||
throw new Exception("TODO - INIT REQUIRED");
|
||||
PortGroups = GetNode<VBoxContainer>("ScrolledItems/PortGroups");
|
||||
foreach (IDataPortGroup group in Module.ConfigurablePortGroups)
|
||||
{
|
||||
PortTypeSelector selector = PortTypeSelectorScene.Instantiate<PortTypeSelector>();
|
||||
selector.Init(group);
|
||||
PortGroups.AddChild(selector);
|
||||
}
|
||||
Name = "Poly";
|
||||
base._Ready();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user