make all dialogs inherit one base class

- opening a new dialog closes the previous one
This commit is contained in:
minenice55
2022-08-26 23:43:01 -04:00
parent 6c80073b12
commit 2b4b7f0a73
10 changed files with 345 additions and 51 deletions

View File

@ -7,9 +7,8 @@ using TMPro;
namespace HeavenStudio.Editor
{
public class SnapDialog : MonoBehaviour
public class SnapDialog : Dialog
{
[SerializeField] private GameObject snapSetter;
[SerializeField] private TMP_Text snapText;
private Timeline timeline;
@ -22,10 +21,11 @@ namespace HeavenStudio.Editor
public void SwitchSnapDialog()
{
if(snapSetter.activeSelf) {
snapSetter.SetActive(false);
if(dialog.activeSelf) {
dialog.SetActive(false);
} else {
snapSetter.SetActive(true);
ResetAllDialogs();
dialog.SetActive(true);
}
}