mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-10 11:45:09 +00:00
copy entities, prep settings menu
This commit is contained in:
parent
21c175d025
commit
fb39a7c5fe
7 changed files with 115 additions and 13 deletions
|
@ -205,7 +205,19 @@ MonoBehaviour:
|
||||||
m_TargetGraphic: {fileID: 3236233}
|
m_TargetGraphic: {fileID: 3236233}
|
||||||
m_OnClick:
|
m_OnClick:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls:
|
||||||
|
- m_Target: {fileID: 1946344932}
|
||||||
|
m_TargetAssemblyTypeName: HeavenStudio.Editor.SettingsDialog, Assembly-CSharp
|
||||||
|
m_MethodName: SwitchSettingsDialog
|
||||||
|
m_Mode: 1
|
||||||
|
m_Arguments:
|
||||||
|
m_ObjectArgument: {fileID: 0}
|
||||||
|
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||||
|
m_IntArgument: 0
|
||||||
|
m_FloatArgument: 0
|
||||||
|
m_StringArgument:
|
||||||
|
m_BoolArgument: 0
|
||||||
|
m_CallState: 2
|
||||||
--- !u!114 &3236233
|
--- !u!114 &3236233
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -12476,8 +12488,8 @@ MonoBehaviour:
|
||||||
m_TargetGraphic: {fileID: 1589389272}
|
m_TargetGraphic: {fileID: 1589389272}
|
||||||
m_HandleRect: {fileID: 1589389271}
|
m_HandleRect: {fileID: 1589389271}
|
||||||
m_Direction: 2
|
m_Direction: 2
|
||||||
m_Value: -0.0000011884493
|
m_Value: 1
|
||||||
m_Size: 0.5289384
|
m_Size: 0.5293149
|
||||||
m_NumberOfSteps: 0
|
m_NumberOfSteps: 0
|
||||||
m_OnValueChanged:
|
m_OnValueChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
|
@ -14021,7 +14033,7 @@ RectTransform:
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 1, y: 0}
|
m_AnchorMax: {x: 1, y: 0}
|
||||||
m_AnchoredPosition: {x: -0, y: 28.925}
|
m_AnchoredPosition: {x: 0, y: 28.924988}
|
||||||
m_SizeDelta: {x: 0, y: 28.927}
|
m_SizeDelta: {x: 0, y: 28.927}
|
||||||
m_Pivot: {x: 0, y: 1}
|
m_Pivot: {x: 0, y: 1}
|
||||||
--- !u!114 &1037563075
|
--- !u!114 &1037563075
|
||||||
|
@ -15595,7 +15607,7 @@ RectTransform:
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0.5}
|
m_AnchorMin: {x: 0, y: 0.5}
|
||||||
m_AnchorMax: {x: 1, y: 0.5}
|
m_AnchorMax: {x: 1, y: 0.5}
|
||||||
m_AnchoredPosition: {x: 0, y: 361.05347}
|
m_AnchoredPosition: {x: 0, y: 129.94681}
|
||||||
m_SizeDelta: {x: 0, y: 491}
|
m_SizeDelta: {x: 0, y: 491}
|
||||||
m_Pivot: {x: 0.5, y: 1}
|
m_Pivot: {x: 0.5, y: 1}
|
||||||
--- !u!114 &1154875944
|
--- !u!114 &1154875944
|
||||||
|
@ -18122,11 +18134,11 @@ MonoBehaviour:
|
||||||
UndoBTN: {fileID: 1747099763}
|
UndoBTN: {fileID: 1747099763}
|
||||||
RedoBTN: {fileID: 2131880462}
|
RedoBTN: {fileID: 2131880462}
|
||||||
MusicSelectBTN: {fileID: 1055877579}
|
MusicSelectBTN: {fileID: 1055877579}
|
||||||
EditorSettingsBTN: {fileID: 3236232}
|
|
||||||
EditorThemeBTN: {fileID: 528192061}
|
|
||||||
FullScreenBTN: {fileID: 151246938}
|
FullScreenBTN: {fileID: 151246938}
|
||||||
TempoFinderBTN: {fileID: 1478799966}
|
TempoFinderBTN: {fileID: 1478799966}
|
||||||
SnapDiagBTN: {fileID: 1201441977}
|
SnapDiagBTN: {fileID: 1201441977}
|
||||||
|
EditorThemeBTN: {fileID: 528192061}
|
||||||
|
EditorSettingsBTN: {fileID: 3236232}
|
||||||
tooltipText: {fileID: 1196204504}
|
tooltipText: {fileID: 1196204504}
|
||||||
discordDuringTesting: 0
|
discordDuringTesting: 0
|
||||||
canSelect: 1
|
canSelect: 1
|
||||||
|
@ -19752,7 +19764,7 @@ RectTransform:
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
m_AnchoredPosition: {x: 0, y: -27.594}
|
m_AnchoredPosition: {x: 0, y: -27.593994}
|
||||||
m_SizeDelta: {x: 1440.022, y: -113.04}
|
m_SizeDelta: {x: 1440.022, y: -113.04}
|
||||||
m_Pivot: {x: 0, y: 0.5}
|
m_Pivot: {x: 0, y: 0.5}
|
||||||
--- !u!114 &1527251881
|
--- !u!114 &1527251881
|
||||||
|
@ -23422,7 +23434,7 @@ RectTransform:
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
m_AnchoredPosition: {x: -0, y: -84.09494}
|
m_AnchoredPosition: {x: 0, y: -84.09494}
|
||||||
m_SizeDelta: {x: 320, y: -113.02}
|
m_SizeDelta: {x: 320, y: -113.02}
|
||||||
m_Pivot: {x: 0, y: 1}
|
m_Pivot: {x: 0, y: 1}
|
||||||
--- !u!1 &1852819572
|
--- !u!1 &1852819572
|
||||||
|
@ -24277,6 +24289,7 @@ GameObject:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 1946344931}
|
- component: {fileID: 1946344931}
|
||||||
|
- component: {fileID: 1946344932}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: SettingsMenu
|
m_Name: SettingsMenu
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
@ -24306,6 +24319,19 @@ RectTransform:
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 0, y: 0}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &1946344932
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1946344930}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: d82cc04699de2e54483ca0e0468d9ed2, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
settingsMenu: {fileID: 1946344930}
|
||||||
--- !u!1 &1946352456
|
--- !u!1 &1946352456
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -24388,7 +24414,19 @@ MonoBehaviour:
|
||||||
m_TargetGraphic: {fileID: 1946352459}
|
m_TargetGraphic: {fileID: 1946352459}
|
||||||
m_OnClick:
|
m_OnClick:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls:
|
||||||
|
- m_Target: {fileID: 1946344932}
|
||||||
|
m_TargetAssemblyTypeName: HeavenStudio.Editor.SettingsDialog, Assembly-CSharp
|
||||||
|
m_MethodName: SwitchSettingsDialog
|
||||||
|
m_Mode: 1
|
||||||
|
m_Arguments:
|
||||||
|
m_ObjectArgument: {fileID: 0}
|
||||||
|
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||||
|
m_IntArgument: 0
|
||||||
|
m_FloatArgument: 0
|
||||||
|
m_StringArgument:
|
||||||
|
m_BoolArgument: 0
|
||||||
|
m_CallState: 2
|
||||||
--- !u!114 &1946352459
|
--- !u!114 &1946352459
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -48,12 +48,13 @@ namespace HeavenStudio.Editor
|
||||||
[SerializeField] private Button UndoBTN;
|
[SerializeField] private Button UndoBTN;
|
||||||
[SerializeField] private Button RedoBTN;
|
[SerializeField] private Button RedoBTN;
|
||||||
[SerializeField] private Button MusicSelectBTN;
|
[SerializeField] private Button MusicSelectBTN;
|
||||||
[SerializeField] private Button EditorSettingsBTN;
|
|
||||||
[SerializeField] private Button EditorThemeBTN;
|
|
||||||
[SerializeField] private Button FullScreenBTN;
|
[SerializeField] private Button FullScreenBTN;
|
||||||
[SerializeField] private Button TempoFinderBTN;
|
[SerializeField] private Button TempoFinderBTN;
|
||||||
[SerializeField] private Button SnapDiagBTN;
|
[SerializeField] private Button SnapDiagBTN;
|
||||||
|
|
||||||
|
[SerializeField] private Button EditorThemeBTN;
|
||||||
|
[SerializeField] private Button EditorSettingsBTN;
|
||||||
|
|
||||||
[Header("Tooltip")]
|
[Header("Tooltip")]
|
||||||
public TMP_Text tooltipText;
|
public TMP_Text tooltipText;
|
||||||
|
|
||||||
|
@ -102,12 +103,12 @@ namespace HeavenStudio.Editor
|
||||||
Tooltip.AddTooltip(UndoBTN.gameObject, "Undo <color=#adadad>[Ctrl+Z]</color>");
|
Tooltip.AddTooltip(UndoBTN.gameObject, "Undo <color=#adadad>[Ctrl+Z]</color>");
|
||||||
Tooltip.AddTooltip(RedoBTN.gameObject, "Redo <color=#adadad>[Ctrl+Y or Ctrl+Shift+Z]</color>");
|
Tooltip.AddTooltip(RedoBTN.gameObject, "Redo <color=#adadad>[Ctrl+Y or Ctrl+Shift+Z]</color>");
|
||||||
Tooltip.AddTooltip(MusicSelectBTN.gameObject, "Music Select");
|
Tooltip.AddTooltip(MusicSelectBTN.gameObject, "Music Select");
|
||||||
Tooltip.AddTooltip(EditorSettingsBTN.gameObject, "Editor Settings <color=#adadad>[Ctrl+Shift+O]</color>");
|
|
||||||
Tooltip.AddTooltip(EditorThemeBTN.gameObject, "Editor Theme");
|
Tooltip.AddTooltip(EditorThemeBTN.gameObject, "Editor Theme");
|
||||||
Tooltip.AddTooltip(FullScreenBTN.gameObject, "Preview <color=#adadad>[Tab]</color>");
|
Tooltip.AddTooltip(FullScreenBTN.gameObject, "Preview <color=#adadad>[Tab]</color>");
|
||||||
Tooltip.AddTooltip(TempoFinderBTN.gameObject, "Tempo Finder");
|
Tooltip.AddTooltip(TempoFinderBTN.gameObject, "Tempo Finder");
|
||||||
Tooltip.AddTooltip(SnapDiagBTN.gameObject, "Snap Settings");
|
Tooltip.AddTooltip(SnapDiagBTN.gameObject, "Snap Settings");
|
||||||
|
|
||||||
|
Tooltip.AddTooltip(EditorSettingsBTN.gameObject, "Editor Settings <color=#adadad>[Ctrl+Shift+O]</color>");
|
||||||
UpdateEditorStatus(true);
|
UpdateEditorStatus(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
8
Assets/Scripts/LevelEditor/SettingsDialog.meta
Normal file
8
Assets/Scripts/LevelEditor/SettingsDialog.meta
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 907f7d1eb5d90af408aa531ea366e63e
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
27
Assets/Scripts/LevelEditor/SettingsDialog/SettingsDialog.cs
Normal file
27
Assets/Scripts/LevelEditor/SettingsDialog/SettingsDialog.cs
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using HeavenStudio.Editor.Track;
|
||||||
|
|
||||||
|
using TMPro;
|
||||||
|
|
||||||
|
namespace HeavenStudio.Editor
|
||||||
|
{
|
||||||
|
public class SettingsDialog : MonoBehaviour
|
||||||
|
{
|
||||||
|
[SerializeField] private GameObject settingsMenu;
|
||||||
|
|
||||||
|
private void Start() {}
|
||||||
|
|
||||||
|
public void SwitchSettingsDialog()
|
||||||
|
{
|
||||||
|
if(settingsMenu.activeSelf) {
|
||||||
|
settingsMenu.SetActive(false);
|
||||||
|
} else {
|
||||||
|
settingsMenu.SetActive(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Update() {}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d82cc04699de2e54483ca0e0468d9ed2
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -611,6 +611,14 @@ namespace HeavenStudio.Editor.Track
|
||||||
return eventObj;
|
return eventObj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public TimelineEventObj CopyEventObject(Beatmap.Entity e)
|
||||||
|
{
|
||||||
|
Beatmap.Entity clone = (Beatmap.Entity) e.Clone();
|
||||||
|
TimelineEventObj dup = AddEventObject(clone.datamodel, false, new Vector3(clone.beat, -clone.track * Timeline.instance.LayerHeight()), clone, true, RandomID());
|
||||||
|
|
||||||
|
return dup;
|
||||||
|
}
|
||||||
|
|
||||||
public void DestroyEventObject(Beatmap.Entity entity)
|
public void DestroyEventObject(Beatmap.Entity entity)
|
||||||
{
|
{
|
||||||
if (EventParameterManager.instance.entity == entity)
|
if (EventParameterManager.instance.entity == entity)
|
||||||
|
|
|
@ -41,6 +41,7 @@ namespace HeavenStudio.Editor.Track
|
||||||
private bool resizingLeft;
|
private bool resizingLeft;
|
||||||
private bool resizingRight;
|
private bool resizingRight;
|
||||||
private bool inResizeRegion;
|
private bool inResizeRegion;
|
||||||
|
private bool wasDuplicated;
|
||||||
public Vector2 lastMovePos;
|
public Vector2 lastMovePos;
|
||||||
public bool isCreating;
|
public bool isCreating;
|
||||||
public string eventObjID;
|
public string eventObjID;
|
||||||
|
@ -167,6 +168,13 @@ namespace HeavenStudio.Editor.Track
|
||||||
|
|
||||||
if (Timeline.instance.eventObjs.FindAll(c => c.moving).Count > 0 && selected)
|
if (Timeline.instance.eventObjs.FindAll(c => c.moving).Count > 0 && selected)
|
||||||
{
|
{
|
||||||
|
//duplicate the entity if holding alt or r-click
|
||||||
|
if ((!wasDuplicated) && (Input.GetKey(KeyCode.LeftAlt) || Input.GetMouseButton(1)))
|
||||||
|
{
|
||||||
|
wasDuplicated = true;
|
||||||
|
var te = Timeline.instance.CopyEventObject(entity);
|
||||||
|
}
|
||||||
|
|
||||||
Vector3 mousePos = Editor.instance.EditorCamera.ScreenToWorldPoint(Input.mousePosition);
|
Vector3 mousePos = Editor.instance.EditorCamera.ScreenToWorldPoint(Input.mousePosition);
|
||||||
|
|
||||||
lastPos_ = transform.localPosition;
|
lastPos_ = transform.localPosition;
|
||||||
|
@ -291,6 +299,7 @@ namespace HeavenStudio.Editor.Track
|
||||||
}
|
}
|
||||||
|
|
||||||
moving = false;
|
moving = false;
|
||||||
|
wasDuplicated = false;
|
||||||
|
|
||||||
Cancel();
|
Cancel();
|
||||||
if (isCreating == true)
|
if (isCreating == true)
|
||||||
|
|
Loading…
Reference in a new issue