mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 14:37:37 +02:00
make all dialogs inherit one base class
- opening a new dialog closes the previous one
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user