mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 11:17:39 +02:00
Camera flashes (bug associated with fullscreen)
This commit is contained in:
@ -16,6 +16,7 @@ namespace RhythmHeavenMania.Editor
|
||||
[SerializeField] private GameObject IntegerP;
|
||||
[SerializeField] private GameObject FloatP;
|
||||
[SerializeField] private GameObject DropdownP;
|
||||
[SerializeField] private GameObject ColorP;
|
||||
|
||||
public Beatmap.Entity entity;
|
||||
|
||||
@ -23,6 +24,8 @@ namespace RhythmHeavenMania.Editor
|
||||
|
||||
private int childCountAtStart;
|
||||
|
||||
public bool canDisable = true;
|
||||
|
||||
public static EventParameterManager instance { get; set; }
|
||||
|
||||
private void Awake()
|
||||
@ -39,7 +42,7 @@ namespace RhythmHeavenMania.Editor
|
||||
{
|
||||
if (Input.GetMouseButtonDown(0))
|
||||
{
|
||||
if (!Timeline.instance.MouseInRectTransform(Editor.instance.eventSelectorBG) && active)
|
||||
if (canDisable && active)
|
||||
{
|
||||
Disable();
|
||||
}
|
||||
@ -107,6 +110,10 @@ namespace RhythmHeavenMania.Editor
|
||||
{
|
||||
prefab = DropdownP;
|
||||
}
|
||||
else if (objType == typeof(Color))
|
||||
{
|
||||
prefab = ColorP;
|
||||
}
|
||||
|
||||
GameObject input = Instantiate(prefab);
|
||||
input.transform.SetParent(this.gameObject.transform);
|
||||
|
@ -4,6 +4,7 @@ using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
using TMPro;
|
||||
using Starpelly;
|
||||
|
||||
using RhythmHeavenMania.Util;
|
||||
|
||||
@ -23,8 +24,14 @@ namespace RhythmHeavenMania.Editor
|
||||
[Space(10)]
|
||||
public TMP_Dropdown dropdown;
|
||||
|
||||
private string propertyName;
|
||||
[Header("Color")]
|
||||
[Space(10)]
|
||||
public Button ColorBTN;
|
||||
public RectTransform ColorTable;
|
||||
public bool colorTableActive;
|
||||
public ColorPreview colorPreview;
|
||||
|
||||
private string propertyName;
|
||||
|
||||
public void SetProperties(string propertyName, object type, string caption)
|
||||
{
|
||||
@ -97,6 +104,40 @@ namespace RhythmHeavenMania.Editor
|
||||
parameterManager.entity[propertyName] = (EasingFunction.Ease)dropdown.value;
|
||||
});
|
||||
}
|
||||
else if (objType == typeof(Color))
|
||||
{
|
||||
colorPreview.colorPicker.onColorChanged += delegate
|
||||
{
|
||||
parameterManager.entity[propertyName] = (Color)colorPreview.colorPicker.color;
|
||||
};
|
||||
|
||||
Color paramCol = (Color)parameterManager.entity[propertyName];
|
||||
|
||||
ColorBTN.onClick.AddListener(delegate
|
||||
{
|
||||
ColorTable.gameObject.SetActive(true);
|
||||
colorTableActive = true;
|
||||
colorPreview.ChangeColor(paramCol);
|
||||
});
|
||||
|
||||
colorPreview.ChangeColor(paramCol);
|
||||
ColorTable.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (colorTableActive)
|
||||
{
|
||||
if (!Editor.MouseInRectTransform(ColorTable))
|
||||
{
|
||||
if (Input.GetMouseButtonDown(0))
|
||||
{
|
||||
ColorTable.gameObject.SetActive(false);
|
||||
colorTableActive = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user