mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
ScriptCore: Added LabelAttribute
This commit is contained in:
@@ -852,7 +852,18 @@ internal class EntityEditor
|
||||
|
||||
IEnumerable<Attribute> attributes = field.GetCustomAttributes();
|
||||
|
||||
string prettyName = field.Name.ToPrettyName();
|
||||
LabelAttribute? label = GetAttribute<LabelAttribute>(attributes);
|
||||
|
||||
string prettyName;
|
||||
|
||||
if (label != null)
|
||||
{
|
||||
prettyName = label.Label ?? field.Name;
|
||||
}
|
||||
else
|
||||
{
|
||||
prettyName = field.Name.ToPrettyName();
|
||||
}
|
||||
|
||||
object? newValue = ShowFieldEditor(value, value?.GetType() ?? field.FieldType, prettyName, attributes);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user