certain editor shortcuts now exit fullscreen
fix color hex input not locking editor shortcuts
This commit is contained in:
parent
7f0b747c6c
commit
80bcbfbd98
|
|
@ -26851,7 +26851,7 @@ MonoBehaviour:
|
|||
m_HandleRect: {fileID: 1589389271}
|
||||
m_Direction: 2
|
||||
m_Value: 1
|
||||
m_Size: 0.9989085
|
||||
m_Size: 0.9999814
|
||||
m_NumberOfSteps: 0
|
||||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
|
|
@ -32707,7 +32707,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 1, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 173.14249}
|
||||
m_AnchoredPosition: {x: 0, y: 171.91833}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!222 &1154875945
|
||||
|
|
@ -39097,8 +39097,8 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 459.58514, y: -25}
|
||||
m_SizeDelta: {x: 879.1703, y: 30}
|
||||
m_AnchoredPosition: {x: 391.79788, y: -25}
|
||||
m_SizeDelta: {x: 743.59576, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1443721748
|
||||
MonoBehaviour:
|
||||
|
|
@ -39119,6 +39119,7 @@ MonoBehaviour:
|
|||
ColorTable: {fileID: 723094753}
|
||||
colorTableActive: 0
|
||||
colorPreview: {fileID: 1535224921}
|
||||
hex: {fileID: 426555699}
|
||||
--- !u!1 &1443971064
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue