add tabs system to editor settings

This commit is contained in:
minenice55
2022-07-09 23:22:59 -04:00
parent 2128d8ae9e
commit 7fd1617ea7
26 changed files with 38881 additions and 15 deletions

View File

@ -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...");
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 406705ab8ec428e439d9138fd4984a9e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,57 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using HeavenStudio.Editor.Track;
using TMPro;
namespace HeavenStudio.Editor
{
public class DispAudioSettings : MonoBehaviour
{
public TMP_Dropdown resolutionsDropdown;
public GameObject customSetter;
public TMP_InputField widthInputField, heightInputField;
private void Start() {
List<TMP_Dropdown.OptionData> dropDownData = new List<TMP_Dropdown.OptionData>();
var vals = GlobalGameManager.DEFAULT_SCREEN_SIZES_STRING;
for (int i = 0; i < vals.Length; i++)
{
TMP_Dropdown.OptionData optionData = new TMP_Dropdown.OptionData();
optionData.text = vals[i];
dropDownData.Add(optionData);
}
resolutionsDropdown.AddOptions(dropDownData);
resolutionsDropdown.value = GlobalGameManager.ScreenSizeIndex;
resolutionsDropdown.onValueChanged.AddListener(delegate
{
GlobalGameManager.ScreenSizeIndex = resolutionsDropdown.value;
customSetter.SetActive(resolutionsDropdown.value == GlobalGameManager.DEFAULT_SCREEN_SIZES_STRING.Length - 1);
});
widthInputField.onEndEdit.AddListener(delegate
{
GlobalGameManager.CustomScreenWidth = System.Math.Max(int.Parse(widthInputField.text), 64);
widthInputField.text = GlobalGameManager.CustomScreenWidth.ToString();
});
heightInputField.onEndEdit.AddListener(delegate
{
GlobalGameManager.CustomScreenHeight = System.Math.Max(int.Parse(heightInputField.text), 64);
heightInputField.text = GlobalGameManager.CustomScreenHeight.ToString();
});
}
public void WindowFullScreen()
{
GlobalGameManager.WindowFullScreen();
}
public void WindowConfirmSize()
{
GlobalGameManager.ChangeScreenSize();
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 752cb90567101a545ab1e2aeae732a9f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: