Merge branch 'claude/keen-pasteur'
This commit is contained in:
@@ -7,7 +7,8 @@ public sealed class CategoryRowView : MonoBehaviour
|
|||||||
{
|
{
|
||||||
[Header("UI Elements")]
|
[Header("UI Elements")]
|
||||||
[SerializeField] private TMP_Text categoryNameText;
|
[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 Button selectButton;
|
||||||
[SerializeField] private Image background;
|
[SerializeField] private Image background;
|
||||||
|
|
||||||
@@ -27,7 +28,8 @@ public sealed class CategoryRowView : MonoBehaviour
|
|||||||
category = cat;
|
category = cat;
|
||||||
isUsed = false;
|
isUsed = false;
|
||||||
categoryNameText.text = displayName;
|
categoryNameText.text = displayName;
|
||||||
scoreText.text = "";
|
previewText.text = "";
|
||||||
|
recordedScoreText.text = "-";
|
||||||
selectButton.onClick.AddListener(HandleClick);
|
selectButton.onClick.AddListener(HandleClick);
|
||||||
SetInteractable(false);
|
SetInteractable(false);
|
||||||
background.color = normalColor;
|
background.color = normalColor;
|
||||||
@@ -36,21 +38,22 @@ public sealed class CategoryRowView : MonoBehaviour
|
|||||||
public void ShowPreview(int previewScore)
|
public void ShowPreview(int previewScore)
|
||||||
{
|
{
|
||||||
if (isUsed) return;
|
if (isUsed) return;
|
||||||
scoreText.text = previewScore.ToString();
|
previewText.text = previewScore.ToString();
|
||||||
background.color = previewScore > 0 ? previewPositiveColor : previewZeroColor;
|
background.color = previewScore > 0 ? previewPositiveColor : previewZeroColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HidePreview()
|
public void HidePreview()
|
||||||
{
|
{
|
||||||
if (isUsed) return;
|
if (isUsed) return;
|
||||||
scoreText.text = "";
|
previewText.text = "";
|
||||||
background.color = normalColor;
|
background.color = normalColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetRecordedScore(int score)
|
public void SetRecordedScore(int score)
|
||||||
{
|
{
|
||||||
isUsed = true;
|
isUsed = true;
|
||||||
scoreText.text = score.ToString();
|
recordedScoreText.text = score.ToString();
|
||||||
|
previewText.text = "";
|
||||||
SetInteractable(false);
|
SetInteractable(false);
|
||||||
background.color = usedColor;
|
background.color = usedColor;
|
||||||
}
|
}
|
||||||
@@ -68,7 +71,8 @@ public sealed class CategoryRowView : MonoBehaviour
|
|||||||
public void ResetRow()
|
public void ResetRow()
|
||||||
{
|
{
|
||||||
isUsed = false;
|
isUsed = false;
|
||||||
scoreText.text = "";
|
previewText.text = "";
|
||||||
|
recordedScoreText.text = "-";
|
||||||
SetInteractable(false);
|
SetInteractable(false);
|
||||||
background.color = normalColor;
|
background.color = normalColor;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user