mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 08:47:37 +02:00
add tabs system to editor settings
This commit is contained in:
20
Assets/Scripts/LevelEditor/SettingsDialog/TabButton.cs
Normal file
20
Assets/Scripts/LevelEditor/SettingsDialog/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/SettingsDialog/TabButton.cs.meta
Normal file
11
Assets/Scripts/LevelEditor/SettingsDialog/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:
|
8
Assets/Scripts/LevelEditor/SettingsDialog/Tabs.meta
Normal file
8
Assets/Scripts/LevelEditor/SettingsDialog/Tabs.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f40824f5d4f2d0545ab42811c01c4470
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,42 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using HeavenStudio.Editor.Track;
|
||||
using HeavenStudio.Util;
|
||||
|
||||
using TMPro;
|
||||
|
||||
namespace HeavenStudio.Editor
|
||||
{
|
||||
public class CreditsLegalSettings : MonoBehaviour
|
||||
{
|
||||
private int SecretCounter = 0;
|
||||
private static bool SecretActive = false;
|
||||
[SerializeField] private GameObject secretObject;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
SecretCounter = 0;
|
||||
secretObject.SetActive(false);
|
||||
}
|
||||
|
||||
public void OnClickCountUp()
|
||||
{
|
||||
SecretCounter++;
|
||||
Debug.Log("SecretCounter: " + SecretCounter);
|
||||
if (SecretCounter == 10)
|
||||
{
|
||||
secretObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnClickSecret()
|
||||
{
|
||||
if (SecretActive) return;
|
||||
|
||||
SecretActive = true;
|
||||
Jukebox.PlayOneShot("applause");
|
||||
Debug.Log("Activating Studio Dance...");
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 406705ab8ec428e439d9138fd4984a9e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
24
Assets/Scripts/LevelEditor/SettingsDialog/TabsManager.cs
Normal file
24
Assets/Scripts/LevelEditor/SettingsDialog/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);
|
||||
}
|
||||
}
|
||||
}
|
@ -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