From c56d14571457257395680c469e44289fe7a6b6ac Mon Sep 17 00:00:00 2001 From: Konstantin Dyachenko Date: Fri, 27 Feb 2026 19:15:44 +0700 Subject: [PATCH] [Update] Split CategoryRowView scoreText into preview and recorded fields MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Separate the single scoreText into previewText (potential score) and recordedScoreText (committed value) so both are visible simultaneously. Public API preserved — no changes needed in ScoreCardView or GameController. Co-Authored-By: Claude Opus 4.6 --- Assets/Scripts/UI/CategoryRowView.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Assets/Scripts/UI/CategoryRowView.cs b/Assets/Scripts/UI/CategoryRowView.cs index 42e612c..fefda2b 100644 --- a/Assets/Scripts/UI/CategoryRowView.cs +++ b/Assets/Scripts/UI/CategoryRowView.cs @@ -7,7 +7,8 @@ public sealed class CategoryRowView : MonoBehaviour { [Header("UI Elements")] [SerializeField] private TMP_Text categoryNameText; - [SerializeField] private TMP_Text scoreText; + [SerializeField] private TMP_Text previewText; + [SerializeField] private TMP_Text recordedScoreText; [SerializeField] private Button selectButton; [SerializeField] private Image background; @@ -27,7 +28,8 @@ public sealed class CategoryRowView : MonoBehaviour category = cat; isUsed = false; categoryNameText.text = displayName; - scoreText.text = ""; + previewText.text = ""; + recordedScoreText.text = "-"; selectButton.onClick.AddListener(HandleClick); SetInteractable(false); background.color = normalColor; @@ -36,21 +38,22 @@ public sealed class CategoryRowView : MonoBehaviour public void ShowPreview(int previewScore) { if (isUsed) return; - scoreText.text = previewScore.ToString(); + previewText.text = previewScore.ToString(); background.color = previewScore > 0 ? previewPositiveColor : previewZeroColor; } public void HidePreview() { if (isUsed) return; - scoreText.text = ""; + previewText.text = ""; background.color = normalColor; } public void SetRecordedScore(int score) { isUsed = true; - scoreText.text = score.ToString(); + recordedScoreText.text = score.ToString(); + previewText.text = ""; SetInteractable(false); background.color = usedColor; } @@ -68,7 +71,8 @@ public sealed class CategoryRowView : MonoBehaviour public void ResetRow() { isUsed = false; - scoreText.text = ""; + previewText.text = ""; + recordedScoreText.text = "-"; SetInteractable(false); background.color = normalColor; }