2024-09-10 20:06:05 -07:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using UnityEditor;
|
|
|
|
|
using UnityEditor.UIElements;
|
|
|
|
|
using UnityEngine.UIElements;
|
|
|
|
|
using DunGenPlus;
|
|
|
|
|
|
|
|
|
|
namespace DunGenPlusEditor {
|
|
|
|
|
[CustomPropertyDrawer(typeof(PropertyOverride<>), true)]
|
|
|
|
|
public class PropertyOverridePropertyDrawer : PropertyDrawer {
|
|
|
|
|
|
|
|
|
|
public override VisualElement CreatePropertyGUI(SerializedProperty property) {
|
|
|
|
|
|
|
|
|
|
var container = new VisualElement();
|
|
|
|
|
|
2024-09-10 23:06:32 -07:00
|
|
|
|
var box = PropertyDrawerUtility.CreateBox(property.displayName);
|
|
|
|
|
PropertyDrawerUtility.SetupItemsBoolProperty(box, property, "Override", "Using DungeonFlow's corresponding values");
|
2024-09-10 20:06:05 -07:00
|
|
|
|
container.Add(box);
|
|
|
|
|
|
|
|
|
|
return container;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|