Files
Temp.BattleRoyale.Map.Unity/Assets/GSpawn - Level Designer/Scripts/Prefabs/IntRangePrefabProfileDbWindow.cs
CortexCore a379dc5cd3 1
2024-05-13 01:28:33 +08:00

21 lines
850 B
C#

#if UNITY_EDITOR
namespace GSpawn
{
public class IntRangePrefabProfileDbWindow : PluginWindow
{
protected override void onBuildUI()
{
_header = new UIHeader(rootVisualElement, TexturePool.instance.prefab, UIValues.smallHeaderIconSize);
IntRangePrefabProfileDbUI.instance.build(rootVisualElement, this);
}
protected override void onGUI()
{
bool plural = IntRangePrefabProfileDb.instance.activeProfile.numPrefabs != 1;
_header.title = IntRangePrefabProfileDb.instance.activeProfile.numPrefabs + (plural ? " prefabs" : " prefab");
_header.backgroundColor = focusedWindow == this ? UIValues.focusedHeaderColor : UIValues.unfocusedHeaderColor;
IntRangePrefabProfileDbUI.instance.onGUI();
}
}
}
#endif