mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 11:27:39 +02:00
add cursor toggle, master volume
This commit is contained in:
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using HeavenStudio.Editor.Track;
|
||||
using HeavenStudio.Util;
|
||||
using HeavenStudio.StudioDance;
|
||||
|
||||
using TMPro;
|
||||
|
||||
@ -11,8 +12,9 @@ namespace HeavenStudio.Editor
|
||||
public class CreditsLegalSettings : MonoBehaviour
|
||||
{
|
||||
private int SecretCounter = 0;
|
||||
private static bool SecretActive = false;
|
||||
private bool SecretActive = false;
|
||||
[SerializeField] private GameObject secretObject;
|
||||
[SerializeField] private StudioDanceManager secretContent;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
@ -37,6 +39,16 @@ namespace HeavenStudio.Editor
|
||||
SecretActive = true;
|
||||
Jukebox.PlayOneShot("applause");
|
||||
Debug.Log("Activating Studio Dance...");
|
||||
|
||||
secretContent.OpenDanceWindow();
|
||||
}
|
||||
|
||||
public void MakeSecretInactive()
|
||||
{
|
||||
SecretCounter = 0;
|
||||
secretObject.SetActive(false);
|
||||
SecretActive = false;
|
||||
secretContent.CloseDanceWindow();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using HeavenStudio.Editor.Track;
|
||||
using UnityEngine.UI;
|
||||
|
||||
using TMPro;
|
||||
|
||||
@ -13,6 +12,10 @@ namespace HeavenStudio.Editor
|
||||
public GameObject customSetter;
|
||||
public TMP_InputField widthInputField, heightInputField;
|
||||
|
||||
|
||||
public Slider volSlider;
|
||||
public TMP_InputField volLabel;
|
||||
|
||||
private void Start() {
|
||||
List<TMP_Dropdown.OptionData> dropDownData = new List<TMP_Dropdown.OptionData>();
|
||||
var vals = GlobalGameManager.DEFAULT_SCREEN_SIZES_STRING;
|
||||
@ -42,6 +45,9 @@ namespace HeavenStudio.Editor
|
||||
GlobalGameManager.CustomScreenHeight = System.Math.Max(int.Parse(heightInputField.text), 64);
|
||||
heightInputField.text = GlobalGameManager.CustomScreenHeight.ToString();
|
||||
});
|
||||
|
||||
volSlider.value = GlobalGameManager.MasterVolume;
|
||||
volLabel.text = System.Math.Round(volSlider.value * 100, 2).ToString();
|
||||
}
|
||||
|
||||
public void WindowFullScreen()
|
||||
@ -53,5 +59,17 @@ namespace HeavenStudio.Editor
|
||||
{
|
||||
GlobalGameManager.ChangeScreenSize();
|
||||
}
|
||||
|
||||
public void OnVolSliderChanged()
|
||||
{
|
||||
GlobalGameManager.ChangeMasterVolume(volSlider.value);
|
||||
volLabel.text = System.Math.Round(volSlider.value * 100, 2).ToString();
|
||||
}
|
||||
|
||||
public void OnVolLabelChanged()
|
||||
{
|
||||
volSlider.value = (float)System.Math.Round(System.Convert.ToSingle(volLabel.text), 2);
|
||||
GlobalGameManager.ChangeMasterVolume(volSlider.value);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using TMPro;
|
||||
|
||||
namespace HeavenStudio.Editor
|
||||
{
|
||||
public class EditorSettings : MonoBehaviour
|
||||
{
|
||||
public Toggle cursorCheckbox;
|
||||
|
||||
public void OnCursorCheckboxChanged()
|
||||
{
|
||||
Editor.instance.isCursorEnabled = cursorCheckbox.isOn;
|
||||
if (!Editor.instance.fullscreen)
|
||||
{
|
||||
GameManager.instance.CursorCam.enabled = Editor.instance.isCursorEnabled;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4dcd15958462e4e488a04ef094e7ffcb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user