From ceb76f9d7d3990d9747011f9b77e77387bc307d9 Mon Sep 17 00:00:00 2001 From: minenice55 Date: Sun, 21 Jan 2024 20:38:56 -0500 Subject: [PATCH] settable flashing effects warning --- .../Editor/RemixProperties/RemixInfo.prefab | 3 + Assets/Scenes/Editor.unity | 48 +++--- Assets/Scenes/Title.unity | 155 +++++++++++++++++- Assets/Scripts/Minigames.cs | 1 + Assets/Scripts/TitleManager.cs | 8 +- 5 files changed, 180 insertions(+), 35 deletions(-) diff --git a/Assets/Resources/Prefabs/Editor/RemixProperties/RemixInfo.prefab b/Assets/Resources/Prefabs/Editor/RemixProperties/RemixInfo.prefab index 3cad290ca..ba11321fc 100644 --- a/Assets/Resources/Prefabs/Editor/RemixProperties/RemixInfo.prefab +++ b/Assets/Resources/Prefabs/Editor/RemixProperties/RemixInfo.prefab @@ -767,6 +767,9 @@ MonoBehaviour: - tag: playstyle label: Recommended Control Style isReadOnly: 0 + - tag: accessiblewarning + label: Flashing Effects Warning + isReadOnly: 0 - tag: remixtags label: Tags isReadOnly: 0 diff --git a/Assets/Scenes/Editor.unity b/Assets/Scenes/Editor.unity index aeb81e05b..de023a8d8 100644 --- a/Assets/Scenes/Editor.unity +++ b/Assets/Scenes/Editor.unity @@ -551,9 +551,9 @@ RectTransform: m_Father: {fileID: 574002313} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: -21} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 32, y: 32} m_Pivot: {x: 0, y: 0.5} --- !u!114 &9435782 @@ -4172,9 +4172,9 @@ RectTransform: m_Father: {fileID: 539838476} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 32, y: -21} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 32, y: 32} m_Pivot: {x: 1, y: 0.5} --- !u!114 &121871281 @@ -4396,9 +4396,9 @@ RectTransform: m_Father: {fileID: 539838476} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 72, y: -21} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 32, y: 32} m_Pivot: {x: 1, y: 0.5} --- !u!114 &129013734 @@ -4532,9 +4532,9 @@ RectTransform: m_Father: {fileID: 539838476} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 112, y: -21} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 32, y: 32} m_Pivot: {x: 1, y: 0.5} --- !u!114 &151246938 @@ -24283,7 +24283,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: -20} + m_AnchoredPosition: {x: 0, y: -25} m_SizeDelta: {x: 134, y: 40} m_Pivot: {x: 0, y: 0.5} --- !u!114 &798238755 @@ -24355,7 +24355,7 @@ MonoBehaviour: m_linkedTextComponent: {fileID: 0} parentLinkedComponent: {fileID: 0} m_enableKerning: 1 - m_ActiveFontFeatures: 00000000 + m_ActiveFontFeatures: 6e72656b m_enableExtraPadding: 0 checkPaddingRequired: 0 m_isRichText: 1 @@ -26850,7 +26850,7 @@ MonoBehaviour: m_TargetGraphic: {fileID: 1589389272} m_HandleRect: {fileID: 1589389271} m_Direction: 2 - m_Value: 0 + m_Value: 1 m_Size: 1 m_NumberOfSteps: 0 m_OnValueChanged: @@ -37250,9 +37250,9 @@ RectTransform: m_Father: {fileID: 574002313} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 40, y: -21} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 32, y: 32} m_Pivot: {x: 0, y: 0.5} --- !u!114 &1345846031 @@ -46876,9 +46876,9 @@ RectTransform: m_Father: {fileID: 574002313} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 80, y: -21} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 32, y: 32} m_Pivot: {x: 0, y: 0.5} --- !u!114 &1783491359 @@ -54474,8 +54474,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: -31.000061, y: 66.784744} - m_SizeDelta: {x: 1000, y: 40} + m_AnchoredPosition: {x: 41.5, y: -25.215256} + m_SizeDelta: {x: 1165, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &2083473859 MonoBehaviour: @@ -54630,7 +54630,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 158, y: -20} + m_AnchoredPosition: {x: 158, y: -25} m_SizeDelta: {x: 40, y: 40} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &2086758092 diff --git a/Assets/Scenes/Title.unity b/Assets/Scenes/Title.unity index d544c7350..fd0ed7db2 100644 --- a/Assets/Scenes/Title.unity +++ b/Assets/Scenes/Title.unity @@ -1667,7 +1667,7 @@ RectTransform: - {fileID: 1592423196} - {fileID: 1923523151} m_Father: {fileID: 1012016923} - m_RootOrder: 3 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 0} @@ -2144,6 +2144,143 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 594751224} m_CullTransparentMesh: 1 +--- !u!1 &611030140 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 611030141} + - component: {fileID: 611030143} + - component: {fileID: 611030142} + m_Layer: 0 + m_Name: FlashWarning + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &611030141 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 611030140} + 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: 1012016923} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 50} + m_SizeDelta: {x: 0, y: 50} + m_Pivot: {x: 0.5, y: 0} +--- !u!114 &611030142 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 611030140} + 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: Chart has Flashing Effects + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: e5f3069ff426f2546b8168857ad6e0d4, type: 2} + m_sharedMaterial: {fileID: 1618155055176292627, guid: e5f3069ff426f2546b8168857ad6e0d4, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 2332033279 + m_fontColor: {r: 1, g: 0, b: 0, a: 0.54509807} + 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: 20 + m_fontSizeBase: 20 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + 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_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 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!222 &611030143 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 611030140} + m_CullTransparentMesh: 1 --- !u!1 &637834697 GameObject: m_ObjectHideFlags: 0 @@ -2453,7 +2590,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 444.5, y: -139.9575} + m_AnchoredPosition: {x: 444.5, y: -139.95752} m_SizeDelta: {x: 1136, y: 372.6375} m_Pivot: {x: 0.5, y: 1} --- !u!114 &684958158 @@ -2906,7 +3043,7 @@ RectTransform: m_Children: - {fileID: 700351696} m_Father: {fileID: 1012016923} - m_RootOrder: 4 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 0} @@ -4532,6 +4669,7 @@ RectTransform: - {fileID: 720687239} - {fileID: 177207010} - {fileID: 1959183876} + - {fileID: 611030141} - {fileID: 429465179} - {fileID: 745132517} m_Father: {fileID: 1925566737} @@ -7078,7 +7216,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 272.036, y: -64} + m_AnchoredPosition: {x: 272.07483, y: -64} m_SizeDelta: {x: 256, y: 128} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1592423197 @@ -7892,6 +8030,7 @@ MonoBehaviour: chartMapperText: {fileID: 128923927} chartIdolText: {fileID: 1570836018} chartDescText: {fileID: 177207008} + flashWarning: {fileID: 611030140} chartStyleText: {fileID: 1959183877} campaignOption: {fileID: 700351697} campaignOn: {fileID: 5181778189044111492, guid: d25eab4740f92b74087acaa572d8a1c4, type: 3} @@ -8447,7 +8586,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 816.10803, y: -64} + m_AnchoredPosition: {x: 816.2245, y: -64} m_SizeDelta: {x: 256, y: 128} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1923523152 @@ -8981,7 +9120,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: 0, y: 60} + m_AnchoredPosition: {x: 0, y: 80} m_SizeDelta: {x: 0, y: 50} m_Pivot: {x: 0.5, y: 0} --- !u!114 &1959183877 @@ -9031,8 +9170,8 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 18 - m_fontSizeBase: 18 + m_fontSize: 20 + m_fontSizeBase: 20 m_fontWeight: 400 m_enableAutoSizing: 0 m_fontSizeMin: 18 diff --git a/Assets/Scripts/Minigames.cs b/Assets/Scripts/Minigames.cs index 74f9caf99..63e6d0988 100644 --- a/Assets/Scripts/Minigames.cs +++ b/Assets/Scripts/Minigames.cs @@ -54,6 +54,7 @@ namespace HeavenStudio {"icontype", 0}, // chart icon (presets, custom - future) {"iconres", new EntityTypes.Resource(EntityTypes.Resource.ResourceType.Image, "Images/Select/", "Icon")}, // custom icon location (future) {"challengetype", 0}, // perfect challenge type + {"accessiblewarning", false}, // epilepsy warning {"playstyle", RecommendedControlStyle.Any}, // recommended control style // chart song info diff --git a/Assets/Scripts/TitleManager.cs b/Assets/Scripts/TitleManager.cs index 590e83245..0ed9dc952 100644 --- a/Assets/Scripts/TitleManager.cs +++ b/Assets/Scripts/TitleManager.cs @@ -46,6 +46,7 @@ namespace HeavenStudio [SerializeField] private TMP_Text chartMapperText; [SerializeField] private TMP_Text chartIdolText; [SerializeField] private TMP_Text chartDescText; + [SerializeField] private GameObject flashWarning; [SerializeField] private TMP_Text chartStyleText; [SerializeField] private Image campaignOption; [SerializeField] private Sprite campaignOn; @@ -242,7 +243,7 @@ namespace HeavenStudio } var controller = PlayerInput.GetInputController(1); - if (menuMode && !(exiting || GlobalGameManager.IsShowingDialog || firstPress || waitingForButtonUp)) + if (menuMode && !(exiting || GlobalGameManager.IsShowingDialog || waitingForButtonUp)) { if (playMenuRevealed) { @@ -282,7 +283,7 @@ namespace HeavenStudio } } } - else + else if (!firstPress) { UpdateSelectable(controller); } @@ -556,6 +557,7 @@ namespace HeavenStudio chartDescText.text = beatmap["remixdesc"]; chartIdolText.text = "♪ " + beatmap["idolcredit"]; chartStyleText.text = $"Recommended Control Style: {beatmap["playstyle"].ToString()}"; + flashWarning.SetActive(beatmap["accessiblewarning"]); if (PersistentDataManager.gameSettings.perfectChallengeType == PersistentDataManager.PerfectChallengeType.On) { @@ -566,7 +568,6 @@ namespace HeavenStudio campaignOption.sprite = campaignOff; } - firstPress = true; waitingForButtonUp = true; playPanel.SetActive(true); playMenuRevealed = true; @@ -599,6 +600,7 @@ namespace HeavenStudio PersistentDataManager.SaveSettings(); playPanel.SetActive(false); playMenuRevealed = false; + waitingForButtonUp = false; } public void ToggleCampaign()