2024-09-11 03:06:05 +00: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-11 06:06:32 +00:00
|
|
|
|
var box = PropertyDrawerUtility.CreateBox(property.displayName);
|
|
|
|
|
PropertyDrawerUtility.SetupItemsBoolProperty(box, property, "Override", "Using DungeonFlow's corresponding values");
|
2024-09-11 03:06:05 +00:00
|
|
|
|
container.Add(box);
|
|
|
|
|
|
|
|
|
|
return container;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|