Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
7192f5216This file is pinned to the selected release. Download the original to open it in your design tool.
using Godot;
using OpenScadGraphEditor.Library;
using OpenScadGraphEditor.Utils;
namespace OpenScadGraphEditor.Widgets.ProjectTree
{
public class ScadInvokableTreeEntry : ProjectTreeEntry<InvokableDescription>
{
public override Texture Icon { get; }
public override string Id => Description.Id;
public override string Title => Description.Name;
public override InvokableDescription Description { get; }
public override bool TryGetDragData(out object data)
{
data = Description;
return true;
}
public ScadInvokableTreeEntry(InvokableDescription description)
{
Description = description;
if (description is FunctionDescription)
{
Icon = Resources.FunctionIcon;
}
if (description is ModuleDescription)
{
Icon = Resources.ModuleIcon;
}
}
}
}