mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-13 00:37:37 +02:00
prepare work for remix properties UI
This commit is contained in:
20
Assets/Scripts/LevelEditor/DialogHelpers/TabButton.cs
Normal file
20
Assets/Scripts/LevelEditor/DialogHelpers/TabButton.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using HeavenStudio.Editor.Track;
|
||||
|
||||
using TMPro;
|
||||
|
||||
namespace HeavenStudio.Editor
|
||||
{
|
||||
public class TabButton : MonoBehaviour
|
||||
{
|
||||
[SerializeField] GameObject Content;
|
||||
|
||||
public void OnClick()
|
||||
{
|
||||
var tabsManager = transform.parent.GetComponent<TabsManager>();
|
||||
tabsManager.SetActiveContent(Content);
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Scripts/LevelEditor/DialogHelpers/TabButton.cs.meta
Normal file
11
Assets/Scripts/LevelEditor/DialogHelpers/TabButton.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 72c5153eb89ce5d4eb324d72a9627670
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
24
Assets/Scripts/LevelEditor/DialogHelpers/TabsManager.cs
Normal file
24
Assets/Scripts/LevelEditor/DialogHelpers/TabsManager.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using HeavenStudio.Editor.Track;
|
||||
|
||||
using TMPro;
|
||||
|
||||
namespace HeavenStudio.Editor
|
||||
{
|
||||
public class TabsManager : MonoBehaviour
|
||||
{
|
||||
[SerializeField] GameObject activeContent;
|
||||
|
||||
public void SetActiveContent(GameObject content)
|
||||
{
|
||||
if (activeContent != null)
|
||||
{
|
||||
activeContent.SetActive(false);
|
||||
}
|
||||
activeContent = content;
|
||||
activeContent.SetActive(true);
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Scripts/LevelEditor/DialogHelpers/TabsManager.cs.meta
Normal file
11
Assets/Scripts/LevelEditor/DialogHelpers/TabsManager.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 113bf5aff4fe7ee408630b5e487451af
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user