From d15f2305fb607fe52585d38fbf0b7a784556d501 Mon Sep 17 00:00:00 2001 From: Firerise9402 <90978630+Firerise9402@users.noreply.github.com> Date: Wed, 16 Aug 2023 11:35:14 -0400 Subject: [PATCH] Toggle added to game settings --- .../Editor/SettingsMenu/GameSettings.prefab | 397 +++++++++++++++++- Assets/Scripts/AppInfo.cs | 4 +- Assets/Scripts/PersistentDataManager.cs | 6 +- .../UI/SettingsDialog/Tabs/GameSettings.cs | 7 + Assets/Scripts/WindowController.cs | 28 +- ProjectSettings/ProjectSettings.asset | 6 +- 6 files changed, 428 insertions(+), 20 deletions(-) diff --git a/Assets/Resources/Prefabs/Editor/SettingsMenu/GameSettings.prefab b/Assets/Resources/Prefabs/Editor/SettingsMenu/GameSettings.prefab index 967562451..d7a9192cb 100644 --- a/Assets/Resources/Prefabs/Editor/SettingsMenu/GameSettings.prefab +++ b/Assets/Resources/Prefabs/Editor/SettingsMenu/GameSettings.prefab @@ -408,7 +408,7 @@ RectTransform: - {fileID: 3114553210599439120} - {fileID: 3361920161722488605} m_Father: {fileID: 6414734252487272423} - m_RootOrder: 4 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -2561,8 +2561,8 @@ MonoBehaviour: m_TargetGraphic: {fileID: 5724386541704624271} m_HandleRect: {fileID: 1751651485190533021} m_Direction: 2 - m_Value: 0 - m_Size: 1 + m_Value: 1 + m_Size: 0.92075473 m_NumberOfSteps: 0 m_OnValueChanged: m_PersistentCalls: @@ -3960,6 +3960,7 @@ RectTransform: - {fileID: 8800668829680167042} - {fileID: 7445086984111591383} - {fileID: 7199445264310719903} + - {fileID: 3335478948268195989} - {fileID: 352916495994336378} - {fileID: 1074170538819331136} m_Father: {fileID: 4476710119336366620} @@ -11151,6 +11152,142 @@ MonoBehaviour: m_ChildScaleWidth: 1 m_ChildScaleHeight: 0 m_ReverseArrangement: 0 +--- !u!1 &7121635722953185395 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3335478948268195989} + - component: {fileID: 2324031694345916984} + - component: {fileID: 4182686963326507293} + m_Layer: 5 + m_Name: WindowDanceToggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3335478948268195989 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7121635722953185395} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1.0000798, y: 1.0000798, z: 1.0000798} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4384156169143710584} + m_Father: {fileID: 6414734252487272423} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 1165, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2324031694345916984 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7121635722953185395} + m_CullTransparentMesh: 1 +--- !u!114 &4182686963326507293 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7121635722953185395} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Window Dancing + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8597c35f18a008c428fc5870aec75766, type: 2} + m_sharedMaterial: {fileID: -6562250930271150993, guid: 8597c35f18a008c428fc5870aec75766, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 32 + m_fontSizeBase: 32 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} --- !u!1 &7123263382392519494 GameObject: m_ObjectHideFlags: 0 @@ -11286,6 +11423,83 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &7140186355433932929 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 207348126910743797} + - component: {fileID: 205630935931843557} + - component: {fileID: 3232221203156598093} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &207348126910743797 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7140186355433932929} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4790349822366902495} + m_Father: {fileID: 4384156169143710584} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &205630935931843557 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7140186355433932929} + m_CullTransparentMesh: 1 +--- !u!114 &3232221203156598093 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7140186355433932929} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!1 &7150267262384080733 GameObject: m_ObjectHideFlags: 0 @@ -11672,6 +11886,7 @@ MonoBehaviour: timingDispMinModeToggle: {fileID: 4906402620624022633} letterboxBgEnable: {fileID: 4396709347257482799} letterboxFxEnable: {fileID: 2017189606605254942} + windowDanceEnable: {fileID: 1850206126763094766} LytEditBg: {fileID: 2373156634136147033} LytEditBgAmbi: {fileID: 6790269430476297747} LytEditBgAmbiGO: {fileID: 7150267262384080733} @@ -13369,7 +13584,7 @@ RectTransform: - {fileID: 6333297351521765582} - {fileID: 5761262922024577280} m_Father: {fileID: 6414734252487272423} - m_RootOrder: 5 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -13619,6 +13834,104 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 306.69, y: 30} m_Pivot: {x: 1, y: 0.5} +--- !u!1 &8911481200621928624 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4384156169143710584} + - component: {fileID: 1850206126763094766} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4384156169143710584 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8911481200621928624} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 207348126910743797} + m_Father: {fileID: 3335478948268195989} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -132, y: -0.0000030994} + m_SizeDelta: {x: 30, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1850206126763094766 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8911481200621928624} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 3232221203156598093} + toggleTransition: 1 + graphic: {fileID: 8789903610445910835} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 3551660278321604313} + m_TargetAssemblyTypeName: HeavenStudio.Editor.GameSettings, Assembly-CSharp + m_MethodName: OnWindowDanceToggleChanged + 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 + m_IsOn: 1 --- !u!1 &8916896168442358637 GameObject: m_ObjectHideFlags: 0 @@ -14345,3 +14658,79 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 +--- !u!1 &9209781191443767413 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4790349822366902495} + - component: {fileID: 8862159153762629161} + - component: {fileID: 8789903610445910835} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4790349822366902495 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9209781191443767413} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 207348126910743797} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8862159153762629161 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9209781191443767413} + m_CullTransparentMesh: 1 +--- !u!114 &8789903610445910835 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9209781191443767413} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 diff --git a/Assets/Scripts/AppInfo.cs b/Assets/Scripts/AppInfo.cs index 9b8d250e7..21cd91762 100644 --- a/Assets/Scripts/AppInfo.cs +++ b/Assets/Scripts/AppInfo.cs @@ -1,8 +1,8 @@ using System; public static class AppInfo { - public const string Version = "0.0.1042"; - public static readonly DateTime Date = new DateTime(2023, 08, 14, 20, 40, 09, 178, DateTimeKind.Utc); + public const string Version = "0.0.1043"; + public static readonly DateTime Date = new DateTime(2023, 08, 16, 15, 30, 08, 305, DateTimeKind.Utc); } diff --git a/Assets/Scripts/PersistentDataManager.cs b/Assets/Scripts/PersistentDataManager.cs index fcbe18db0..96fd07bd3 100644 --- a/Assets/Scripts/PersistentDataManager.cs +++ b/Assets/Scripts/PersistentDataManager.cs @@ -37,6 +37,7 @@ namespace HeavenStudio.Common true, false, true, + true, true ); @@ -113,7 +114,8 @@ namespace HeavenStudio.Common bool timingDisplayMinMode = false, bool overlaysInEditor = true, bool letterboxBgEnable = true, - bool letterboxFxEnable = true + bool letterboxFxEnable = true, + bool windowDanceEnable = true ) { this.showSplash = showSplash; @@ -139,6 +141,7 @@ namespace HeavenStudio.Common this.overlaysInEditor = overlaysInEditor; this.letterboxBgEnable = true; this.letterboxFxEnable = true; + this.windowDanceEnable = true; this.timingDisplayComponents = new List() { @@ -177,6 +180,7 @@ namespace HeavenStudio.Common public bool overlaysInEditor; public bool letterboxBgEnable; public bool letterboxFxEnable; + public bool windowDanceEnable; public List timingDisplayComponents; public List skillStarComponents; public List sectionComponents; diff --git a/Assets/Scripts/UI/SettingsDialog/Tabs/GameSettings.cs b/Assets/Scripts/UI/SettingsDialog/Tabs/GameSettings.cs index 7f94a16c7..b157c2d73 100644 --- a/Assets/Scripts/UI/SettingsDialog/Tabs/GameSettings.cs +++ b/Assets/Scripts/UI/SettingsDialog/Tabs/GameSettings.cs @@ -22,6 +22,7 @@ namespace HeavenStudio.Editor [SerializeField] Toggle timingDispMinModeToggle; [SerializeField] Toggle letterboxBgEnable; [SerializeField] Toggle letterboxFxEnable; + [SerializeField] Toggle windowDanceEnable; [SerializeField] Image LytEditBg; [SerializeField] Image LytEditBgAmbi; @@ -128,6 +129,11 @@ namespace HeavenStudio.Editor LytEditBgAmbiGO.SetActive(PersistentDataManager.gameSettings.letterboxFxEnable); } + public void OnWindowDanceToggleChanged() + { + PersistentDataManager.gameSettings.windowDanceEnable = windowDanceEnable.isOn; + } + public override void OnOpenTab() { TimingDispTypeDropdown.ClearOptions(); @@ -139,6 +145,7 @@ namespace HeavenStudio.Editor timingDispMinModeToggle.isOn = PersistentDataManager.gameSettings.timingDisplayMinMode; letterboxBgEnable.isOn = PersistentDataManager.gameSettings.letterboxBgEnable; letterboxFxEnable.isOn = PersistentDataManager.gameSettings.letterboxFxEnable; + windowDanceEnable.isOn = PersistentDataManager.gameSettings.windowDanceEnable; if (PersistentDataManager.gameSettings.timingDisplayComponents.Count == 0 && PersistentDataManager.gameSettings.skillStarComponents.Count == 0 && diff --git a/Assets/Scripts/WindowController.cs b/Assets/Scripts/WindowController.cs index f3b269d58..b1bca1247 100644 --- a/Assets/Scripts/WindowController.cs +++ b/Assets/Scripts/WindowController.cs @@ -102,9 +102,12 @@ namespace HeavenStudio { if(!Application.isEditor && !Editor.Editor.instance.fullscreen && (pan != defaultPan | scale != defaultScale)) Reset(); if(Application.isEditor || !Editor.Editor.instance.fullscreen) return; - #if UNITY_STANDALONE_WIN - SetWindowPos(ptr, HWND_NOTOPMOST, x, y, resX, resY, SWP_SHOWWINDOW); - #endif + if(PersistentDataManager.gameSettings.windowDanceEnable) + { + #if UNITY_STANDALONE_WIN + SetWindowPos(ptr, HWND_NOTOPMOST, x, y, resX, resY, SWP_SHOWWINDOW); + #endif + } } private void Awake() @@ -162,10 +165,12 @@ namespace HeavenStudio UpdateScale(); UpdatePan(); //SetShakeIntensity(); - - #if UNITY_STANDALONE_WIN - SetPosition(hWnd, Convert.ToInt16(pan.x), Convert.ToInt16(pan.y), Convert.ToInt16(scale.x), Convert.ToInt16(scale.y)); - #endif + if(PersistentDataManager.gameSettings.windowDanceEnable) + { + #if UNITY_STANDALONE_WIN + SetPosition(hWnd, Convert.ToInt16(pan.x), Convert.ToInt16(pan.y), Convert.ToInt16(scale.x), Convert.ToInt16(scale.y)); + #endif + } } private void UpdatePan() @@ -275,9 +280,12 @@ namespace HeavenStudio scale = defaultScale; shakeResult = defaultShake; if(Application.isEditor) return; - #if UNITY_STANDALONE_WIN - SetWindowPos(hWnd, HWND_NOTOPMOST, Convert.ToInt16(pan.x), Convert.ToInt16(pan.y), Convert.ToInt16(scale.x), Convert.ToInt16(scale.y), SWP_SHOWWINDOW); - #endif + if(PersistentDataManager.gameSettings.windowDanceEnable) + { + #if UNITY_STANDALONE_WIN + SetWindowPos(hWnd, HWND_NOTOPMOST, Convert.ToInt16(pan.x), Convert.ToInt16(pan.y), Convert.ToInt16(scale.x), Convert.ToInt16(scale.y), SWP_SHOWWINDOW); + #endif + } } } } \ No newline at end of file diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index a762db3e9..531db4a1a 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -134,7 +134,7 @@ PlayerSettings: 16:10: 1 16:9: 1 Others: 1 - bundleVersion: 0.0.1042 + bundleVersion: 0.0.1043 preloadedAssets: - {fileID: 102900000, guid: 5348c08b82446e0478cee8bda6c02cfc, type: 3} metroInputSource: 0 @@ -158,11 +158,11 @@ PlayerSettings: applicationIdentifier: Standalone: com.RHeavenStudio.Heaven-Studio buildNumber: - Standalone: 1042 + Standalone: 1043 iPhone: 0 tvOS: 0 overrideDefaultApplicationIdentifier: 0 - AndroidBundleVersionCode: 1042 + AndroidBundleVersionCode: 1043 AndroidMinSdkVersion: 22 AndroidTargetSdkVersion: 0 AndroidPreferredInstallLocation: 1