36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace Ichni.Editor
|
|
{
|
|
public abstract class StaticWindow : MonoBehaviour
|
|
{
|
|
public EnableButtonGroup enableButtonGroup;
|
|
|
|
protected virtual void Start()
|
|
{
|
|
if (enableButtonGroup != null)
|
|
{
|
|
enableButtonGroup.enableButton.onClick.AddListener(EnableWindow);
|
|
enableButtonGroup.disableButton.onClick.AddListener(DisableWindow);
|
|
}
|
|
}
|
|
|
|
public virtual void EnableWindow()
|
|
{
|
|
gameObject.SetActive(true);
|
|
enableButtonGroup.disableButton.gameObject.SetActive(true);
|
|
enableButtonGroup.enableButton.gameObject.SetActive(false);
|
|
}
|
|
|
|
public virtual void DisableWindow()
|
|
{
|
|
gameObject.SetActive(false);
|
|
enableButtonGroup.disableButton.gameObject.SetActive(false);
|
|
enableButtonGroup.enableButton.gameObject.SetActive(true);
|
|
}
|
|
}
|
|
}
|