diff --git a/.gitignore b/.gitignore index 6a7520a..ccea93b 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,4 @@ IRSequencer/IRSequencer/obj/Release/IRSequencer.csproj.FileListAbsolute.txt IRSequencer/IRSequencer/obj/Release/IRSequencer.csproj.FilesWrittenAbsolute.txt *.cache +IRSequencer/.vs/IRSequencer/IRSequencer.scgdat diff --git a/IRSequencer/.vs/IRSequencer/IRSequencer.scgdat b/IRSequencer/.vs/IRSequencer/IRSequencer.scgdat index 7bbfc81..968322d 100644 Binary files a/IRSequencer/.vs/IRSequencer/IRSequencer.scgdat and b/IRSequencer/.vs/IRSequencer/IRSequencer.scgdat differ diff --git a/IRSequencer/IRSequencer/Gui/SequencerGUI.cs b/IRSequencer/IRSequencer/Gui/SequencerGUI.cs index 44bc0cc..2abcf21 100644 --- a/IRSequencer/IRSequencer/Gui/SequencerGUI.cs +++ b/IRSequencer/IRSequencer/Gui/SequencerGUI.cs @@ -58,7 +58,9 @@ public class SequencerGUI : MonoBehaviour public bool GUIEnabled = false; public bool guiControlWindowEditMode = false; - + + public bool alwaysStartInEditMode = false; + private bool isReady = false; private bool firstUpdate = true; @@ -537,6 +539,8 @@ private void Awake() { LoadConfigXml(); + guiControlWindowEditMode = alwaysStartInEditMode; + GameEvents.onShowUI.Add(OnShowUI); GameEvents.onHideUI.Add(OnHideUI); @@ -665,6 +669,16 @@ private void InitSettingsWindow() _settingsWindow.GetComponent().alpha = 0f; + if (SequencerSettingsWindowPosition == Vector3.zero) + { + //get the default position from the prefab + SequencerSettingsWindowPosition = _settingsWindow.transform.position; + } + else + { + _settingsWindow.transform.position = SequencerSettingsWindowPosition; + } + var closeButton = _settingsWindow.GetChild("WindowTitle").GetChild("RightWindowButton"); if (closeButton != null) { @@ -704,7 +718,12 @@ private void InitSettingsWindow() scaleText.text = string.Format("{0:#0.00}", v); }); } - + + var startEditModeToggle = _settingsWindow.GetChild ("WindowContent").GetChild ("StartEditModeHLG").GetChild ("StartEditModeToggle").GetComponent (); + startEditModeToggle.isOn = alwaysStartInEditMode; + startEditModeToggle.onValueChanged.AddListener (v => alwaysStartInEditMode = v); + + var footerButtons = _settingsWindow.GetChild("WindowFooter").GetChild("WindowFooterButtonsHLG"); var cancelButton = footerButtons.GetChild("CancelButton").GetComponent