From 4b65613f4437bf283ab06547e100cb50ff0731e7 Mon Sep 17 00:00:00 2001 From: minenice55 Date: Sun, 3 Dec 2023 14:02:49 -0500 Subject: [PATCH] settable (one-liner) rating screen text --- .../Editor/RemixProperties/RemixFlavour.prefab | 18 ++++++++++++++++-- .../Editor/RemixProperties/RemixInfo.prefab | 2 +- Assets/Scenes/Judgement.unity | 8 ++++---- Assets/Scripts/JudgementManager.cs | 17 ++++++++++++++--- Assets/Scripts/TitleManager.cs | 2 +- Assets/Scripts/UI/PauseMenu.cs | 2 +- 6 files changed, 37 insertions(+), 12 deletions(-) diff --git a/Assets/Resources/Prefabs/Editor/RemixProperties/RemixFlavour.prefab b/Assets/Resources/Prefabs/Editor/RemixProperties/RemixFlavour.prefab index c10c88f14..2cdcec20f 100644 --- a/Assets/Resources/Prefabs/Editor/RemixProperties/RemixFlavour.prefab +++ b/Assets/Resources/Prefabs/Editor/RemixProperties/RemixFlavour.prefab @@ -577,15 +577,17 @@ MonoBehaviour: m_lineSpacingMax: 0 m_paragraphSpacing: 0 m_charWidthMaxAdj: 0 - m_enableWordWrapping: 1 + m_TextWrappingMode: 1 m_wordWrappingRatios: 0.4 m_overflowMode: 0 m_linkedTextComponent: {fileID: 0} parentLinkedComponent: {fileID: 0} m_enableKerning: 1 + m_ActiveFontFeatures: 6e72656b m_enableExtraPadding: 0 checkPaddingRequired: 0 m_isRichText: 1 + m_EmojiFallbackSupport: 1 m_parseCtrlCharacters: 1 m_isOrthographic: 1 m_isCullingEnabled: 0 @@ -836,5 +838,17 @@ MonoBehaviour: label: Rating Screen Text isReadOnly: 0 - tag: subheader - label: Coming Soon! + label: Change the messages shown on the rating screen. + isReadOnly: 0 + - tag: resultcaption + label: Result Screen Header + isReadOnly: 0 + - tag: resultcommon_hi + label: Superb Message + isReadOnly: 0 + - tag: resultcommon_ok + label: OK Message + isReadOnly: 0 + - tag: resultcommon_ng + label: Try Again Message isReadOnly: 0 diff --git a/Assets/Resources/Prefabs/Editor/RemixProperties/RemixInfo.prefab b/Assets/Resources/Prefabs/Editor/RemixProperties/RemixInfo.prefab index e30a5960d..10ce832d5 100644 --- a/Assets/Resources/Prefabs/Editor/RemixProperties/RemixInfo.prefab +++ b/Assets/Resources/Prefabs/Editor/RemixProperties/RemixInfo.prefab @@ -762,7 +762,7 @@ MonoBehaviour: label: Remix Information isReadOnly: 0 - tag: subheader - label: Enter information about your remix here. + label: Enter information about your remix. isReadOnly: 0 - tag: remixtitle label: Remix Title diff --git a/Assets/Scenes/Judgement.unity b/Assets/Scenes/Judgement.unity index 678905dc4..b58cb7f30 100644 --- a/Assets/Scenes/Judgement.unity +++ b/Assets/Scenes/Judgement.unity @@ -11776,10 +11776,10 @@ RectTransform: m_Father: {fileID: 1475451633} 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: 611, y: -58.60666} - m_SizeDelta: {x: 1222, y: 117.21333} + 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!114 &1702256962 MonoBehaviour: diff --git a/Assets/Scripts/JudgementManager.cs b/Assets/Scripts/JudgementManager.cs index ec95b265a..970ef9b75 100644 --- a/Assets/Scripts/JudgementManager.cs +++ b/Assets/Scripts/JudgementManager.cs @@ -108,12 +108,12 @@ namespace HeavenStudio barSlider.fillRect.GetComponent().color = barColourNg; // temp - twoMessage = true; + twoMessage = false; // judgementInfo = new() // { // finalScore = 0.79, // }; - header.text = "Rhythm League Notes"; + header.text = playedBeatmap != null ? playedBeatmap["resultcaption"] : "Rhythm League Notes"; // end temp if (twoMessage) @@ -137,7 +137,18 @@ namespace HeavenStudio { if (twoMessage) return; audioSource.PlayOneShot(messageLast); - message0.text = "single line message"; + if (judgementInfo.finalScore < Minigame.rankOkThreshold) + { + message0.text = playedBeatmap != null ? playedBeatmap["resultcommon_ng"] : "Try harder next time."; + } + else if (judgementInfo.finalScore < Minigame.rankHiThreshold) + { + message0.text = playedBeatmap != null ? playedBeatmap["resultcommon_ok"] : "Eh. Passable."; + } + else + { + message0.text = playedBeatmap != null ? playedBeatmap["resultcommon_hi"] : "Good rhythm."; + } } public void ShowMessage1() diff --git a/Assets/Scripts/TitleManager.cs b/Assets/Scripts/TitleManager.cs index b5ddd9f4a..3d3135500 100644 --- a/Assets/Scripts/TitleManager.cs +++ b/Assets/Scripts/TitleManager.cs @@ -265,7 +265,7 @@ namespace HeavenStudio settingsPanel.SwitchSettingsDialog(); SoundByte.PlayOneShot("ui/UISelect"); // notes: - // gameplay settings currently don't work due to the overlay pereview requiring the screen composition setup from a gameplay prefab + // gameplay settings currently don't work due to the overlay preview requiring the screen composition setup from a gameplay prefab // adding the attract screen will fix this since we'd need to add that prefab for it anyways } diff --git a/Assets/Scripts/UI/PauseMenu.cs b/Assets/Scripts/UI/PauseMenu.cs index 8a944d450..eccbdf28f 100644 --- a/Assets/Scripts/UI/PauseMenu.cs +++ b/Assets/Scripts/UI/PauseMenu.cs @@ -133,8 +133,8 @@ namespace HeavenStudio.Common if (t.TryGetComponent(out Collider2D c) && c.OverlapPoint(PlayerInput.GetInputController(1).GetPointer())) { int idx = t.GetSiblingIndex(); - optionSelected = idx; ChooseOption((Options)idx, idx != optionSelected); + optionSelected = idx; break; } }