mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 10:07:38 +02:00
Small Fixes (#609)
* additive angle in rhythm rally * remove old keyboard controller compat * fix control style dropdowns * using mouse on title screen selects keyboard instead default to keyboard for invalid controllers * temporarily ditch discord RPC we need a new API key lol * remove this discord call too * certain editor shortcuts now exit fullscreen fix color hex input not locking editor shortcuts * increase max queued frames turns out this may not be an issue for audio rhythm games
This commit is contained in:
@ -131,6 +131,7 @@ namespace HeavenStudio.Editor
|
||||
|
||||
public void ShowQuitPopUp(bool show)
|
||||
{
|
||||
if (fullscreen) Fullscreen();
|
||||
_confirmQuitMain.SetActive(show);
|
||||
SetAuthoritiveMenu(show);
|
||||
}
|
||||
@ -167,12 +168,12 @@ namespace HeavenStudio.Editor
|
||||
Fullscreen();
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Delete) || Input.GetKeyDown(KeyCode.Backspace))
|
||||
if ((Input.GetKeyDown(KeyCode.Delete) || Input.GetKeyDown(KeyCode.Backspace)) && !fullscreen)
|
||||
{
|
||||
CommandManager.Instance.AddCommand(new Commands.Delete(Selections.instance.eventsSelected.Select(c => c.entity.guid).ToList()));
|
||||
}
|
||||
|
||||
if (Input.GetKey(KeyCode.LeftControl))
|
||||
if (Input.GetKey(KeyCode.LeftControl) && !fullscreen)
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Z))
|
||||
{
|
||||
@ -193,20 +194,13 @@ namespace HeavenStudio.Editor
|
||||
{
|
||||
Timeline.instance.Paste();
|
||||
}
|
||||
|
||||
if (Input.GetKey(KeyCode.LeftShift))
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.D))
|
||||
{
|
||||
ToggleDebugCam();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Input.GetKey(KeyCode.LeftControl))
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.N))
|
||||
{
|
||||
if (fullscreen) Fullscreen();
|
||||
NewBTN.onClick.Invoke();
|
||||
}
|
||||
else if (Input.GetKeyDown(KeyCode.O))
|
||||
@ -224,6 +218,14 @@ namespace HeavenStudio.Editor
|
||||
{
|
||||
SaveRemix(false);
|
||||
}
|
||||
|
||||
if (Input.GetKey(KeyCode.LeftShift))
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.D))
|
||||
{
|
||||
ToggleDebugCam();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@ -247,33 +249,6 @@ namespace HeavenStudio.Editor
|
||||
PasteBTN.transform.GetChild(0).GetComponent<Image>().color = Color.white;
|
||||
else
|
||||
PasteBTN.transform.GetChild(0).GetComponent<Image>().color = Color.gray;
|
||||
|
||||
|
||||
if (Timeline.instance.timelineState.selected && Editor.instance.canSelect)
|
||||
{
|
||||
/*
|
||||
if (Input.GetMouseButtonUp(0))
|
||||
{
|
||||
List<TimelineEventObj> selectedEvents = Timeline.instance.eventObjs.FindAll(c => c.selected == true && c.eligibleToMove == true);
|
||||
|
||||
if (selectedEvents.Count > 0)
|
||||
{
|
||||
List<TimelineEventObj> result = new List<TimelineEventObj>();
|
||||
|
||||
for (int i = 0; i < selectedEvents.Count; i++)
|
||||
{
|
||||
//TODO: this is in LateUpdate, so this will never run! change this to something that works properly
|
||||
if (!(selectedEvents[i].isCreating || selectedEvents[i].wasDuplicated))
|
||||
{
|
||||
result.Add(selectedEvents[i]);
|
||||
}
|
||||
selectedEvents[i].OnUp();
|
||||
}
|
||||
CommandManager.instance.Execute(new Commands.Move(result));
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
public static Sprite GameIcon(string name)
|
||||
@ -360,6 +335,7 @@ namespace HeavenStudio.Editor
|
||||
{
|
||||
if (dialog.GetType() == typeof(RemixPropertiesDialog))
|
||||
{
|
||||
if (fullscreen) Fullscreen();
|
||||
GlobalGameManager.ShowErrorMessage("Set Remix Properties", "Set remix properties before saving.");
|
||||
(dialog as RemixPropertiesDialog).SwitchPropertiesDialog();
|
||||
(dialog as RemixPropertiesDialog).SetSaveOnClose(true, saveAs);
|
||||
@ -431,6 +407,7 @@ namespace HeavenStudio.Editor
|
||||
|
||||
public void LoadRemix(bool create = false)
|
||||
{
|
||||
if (fullscreen) Fullscreen();
|
||||
if (create)
|
||||
{
|
||||
GameManager.instance.NewRemix();
|
||||
@ -446,6 +423,7 @@ namespace HeavenStudio.Editor
|
||||
|
||||
public void OpenRemix()
|
||||
{
|
||||
if (fullscreen) Fullscreen();
|
||||
var extensions = new[]
|
||||
{
|
||||
new ExtensionFilter("Heaven Studio Remix File ", new string[] { "riq" }),
|
||||
|
@ -20,6 +20,7 @@ namespace HeavenStudio.Editor
|
||||
public RectTransform ColorTable;
|
||||
public bool colorTableActive;
|
||||
public ColorPreview colorPreview;
|
||||
public TMP_InputField hex;
|
||||
|
||||
private Color _defaultColor;
|
||||
|
||||
@ -27,6 +28,17 @@ namespace HeavenStudio.Editor
|
||||
{
|
||||
InitProperties(propertyName, caption);
|
||||
|
||||
hex.onSelect.AddListener(
|
||||
_ =>
|
||||
Editor.instance.editingInputField = true
|
||||
);
|
||||
hex.onEndEdit.AddListener(
|
||||
_ =>
|
||||
{;
|
||||
Editor.instance.editingInputField = false;
|
||||
}
|
||||
);
|
||||
|
||||
colorPreview.colorPicker.onColorChanged += _ =>
|
||||
{
|
||||
parameterManager.entity[propertyName] = colorPreview.colorPicker.color;
|
||||
@ -78,6 +90,7 @@ namespace HeavenStudio.Editor
|
||||
{
|
||||
ColorTable.gameObject.SetActive(false);
|
||||
colorTableActive = false;
|
||||
Editor.instance.editingInputField = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,9 @@
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using TMPro;
|
||||
using Starpelly;
|
||||
|
||||
using HeavenStudio.Util;
|
||||
using HeavenStudio.Editor;
|
||||
|
||||
namespace HeavenStudio.Editor
|
||||
{
|
||||
@ -22,9 +17,9 @@ namespace HeavenStudio.Editor
|
||||
{
|
||||
InitProperties(diag, propertyName, caption);
|
||||
|
||||
var enumType = type.GetType();
|
||||
var enumVals = Enum.GetValues(enumType);
|
||||
var enumNames = Enum.GetNames(enumType).ToList();
|
||||
Type enumType = type.GetType();
|
||||
Array enumVals = Enum.GetValues(enumType);
|
||||
List<string> enumNames = Enum.GetNames(enumType).ToList();
|
||||
|
||||
// Can we assume non-holey enum?
|
||||
// If we can we can simplify to dropdown.value = (int) parameterManager.chart[propertyName]
|
||||
@ -38,7 +33,7 @@ namespace HeavenStudio.Editor
|
||||
dropdown.value = selected;
|
||||
|
||||
dropdown.onValueChanged.AddListener(_ =>
|
||||
parameterManager.chart[propertyName] = (int) enumVals.GetValue(dropdown.value)
|
||||
parameterManager.chart[propertyName] = Enum.ToObject(enumType, (int) enumVals.GetValue(dropdown.value))
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -25,10 +25,15 @@ namespace HeavenStudio.Editor
|
||||
|
||||
public void AddParam(RemixPropertiesDialog diag, string propertyName, object type, string caption, bool isReadOnly = false, string tooltip = "")
|
||||
{
|
||||
if (!Minigames.propertiesModel.ContainsKey(propertyName))
|
||||
{
|
||||
Debug.LogError("Property " + propertyName + " does not exist!");
|
||||
return;
|
||||
}
|
||||
GameObject prefab = diag.IntegerP;
|
||||
GameObject input;
|
||||
|
||||
var objType = type.GetType();
|
||||
var objType = Minigames.propertiesModel[propertyName].GetType();
|
||||
|
||||
if (objType == typeof(EntityTypes.Integer))
|
||||
{
|
||||
@ -83,13 +88,13 @@ namespace HeavenStudio.Editor
|
||||
property.SetProperties(diag, propertyName, type, caption);
|
||||
break;
|
||||
default:
|
||||
Debug.LogError("Can't make property interface of type: " + type.GetType());
|
||||
Debug.LogError("Can't make property interface of type: " + objType);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("Can't make property interface of type: " + type.GetType());
|
||||
Debug.LogError("Can't make property interface of type: " + objType);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user