freeso/TSOClient/FSO.IDE/EditorComponent/Model/PrimitiveDescriptor.cs
riperiperi b57ebbd141 Cleanup: Remove most unused usings and MPL per-file licenses
MPL per-file was used in older project files, but should apply to the whole project, so having it there was redundant.
2023-11-25 03:45:29 +00:00

37 lines
1.1 KiB
C#

using FSO.Files.Formats.IFF.Chunks;
using FSO.IDE.EditorComponent.OperandForms;
using FSO.SimAntics.Engine;
using System;
using System.Windows.Forms;
namespace FSO.IDE.EditorComponent.Model
{
public abstract class PrimitiveDescriptor
{
public ushort PrimID;
public VMPrimitiveOperand Operand;
public abstract PrimitiveGroup Group { get; }
public abstract PrimitiveReturnTypes Returns { get; }
public abstract Type OperandType { get; }
public virtual string GetTitle(EditorScope scope) {
var primName = EditorScope.Behaviour.Get<STR>(139).GetString(PrimID);
return (primName == null)?"Primitive #"+PrimID:primName;
}
public abstract string GetBody(EditorScope scope);
public virtual void PopulateOperandView(BHAVEditor master, EditorScope escope, TableLayoutPanel panel)
{
panel.Controls.Add(new OpUnknownControl());
}
//TODO: modifiable operand models, special form controls for specific types.
}
public enum PrimitiveReturnTypes
{
TrueFalse,
Done,
}
}