提交更新

This commit is contained in:
CortexCore
2023-07-12 15:27:27 +08:00
parent 4af7cec47b
commit 498b0617f8
13 changed files with 294 additions and 154 deletions

View File

@@ -27,9 +27,9 @@ public partial class IDIS_TemplateService : Node
[Export] private Button createButton;
[Export] private Button newFormatButton;
[Export] private NodeBuilder templateIndexBuilder;
[Export] private NodeBuilder templateFormatBuilder;
[Export] private LineEdit templateNameEdit;
[Export] private LineEdit templateDescriptionEdit;
[Export] private Control container;
[Export] private Label templateCreateTimeLabel;
[Export] private Label templateUpdateTimeLabel;
[ExportCategory("Template")]
@@ -56,9 +56,6 @@ public partial class IDIS_TemplateService : Node
templateNameEdit.TextChanged += OnTemplateNameChanged;
templateDescriptionEdit.TextChanged += OnTemplateDescriptionChanged;
MathNode.ClearChild(container);
EnsureConfigure();
}
@@ -108,9 +105,8 @@ public partial class IDIS_TemplateService : Node
private void EnsureConfigure()
{
MathNode.ClearChild(container);
templateIndexBuilder.Clear();
templateFormatBuilder.Clear();
foreach (var x in templates)
{
@@ -133,7 +129,7 @@ public partial class IDIS_TemplateService : Node
for (var i = 0; i < _selectedTemplate.Formats.Count; i++)
{
var x = _selectedTemplate.Formats[i];
var _container = templateContainer.Instantiate<UXContainer>();
var _container = templateFormatBuilder.Build<UXContainer>();
_container.lineEdits[0].Text = x.format;
_container.lineEdits[1].Text = x.hint;
@@ -165,8 +161,6 @@ public partial class IDIS_TemplateService : Node
_selectedTemplate.Formats.RemoveAt(index);
EnsureConfigure();
};
container.AddChild(_container);
}
}
}