[Rem] Upper sum Text & upper bonus text | previewText & recordedScoreText (move to scoreText)

This commit is contained in:
2026-03-08 00:34:45 +07:00
parent dc82e93322
commit 9236d66022
43 changed files with 1418 additions and 596 deletions
+6 -10
View File
@@ -10,8 +10,7 @@ namespace YachtDice.UI
{
[Header("UI Elements")]
[SerializeField] private TMP_Text categoryNameText;
[SerializeField] private TMP_Text previewText;
[SerializeField] private TMP_Text recordedScoreText;
[SerializeField] private TMP_Text scoreText;
[SerializeField] private Button selectButton;
[SerializeField] private Image background;
@@ -31,8 +30,7 @@ namespace YachtDice.UI
_category = categoryDef;
_isUsed = false;
categoryNameText.text = categoryDef.DisplayName;
previewText.text = "";
recordedScoreText.text = "-";
scoreText.text = "-";
selectButton.onClick.AddListener(HandleClick);
SetInteractable(false);
background.color = normalColor;
@@ -41,22 +39,21 @@ namespace YachtDice.UI
public void ShowPreview(int previewScore)
{
if (_isUsed) return;
previewText.text = previewScore.ToString();
scoreText.text = previewScore.ToString();
background.color = previewScore > 0 ? previewPositiveColor : previewZeroColor;
}
public void HidePreview()
{
if (_isUsed) return;
previewText.text = "";
scoreText.text = "-";
background.color = normalColor;
}
public void SetRecordedScore(int score)
{
_isUsed = true;
recordedScoreText.text = score.ToString();
previewText.text = "";
scoreText.text = score.ToString();
SetInteractable(false);
background.color = usedColor;
}
@@ -74,8 +71,7 @@ namespace YachtDice.UI
public void ResetRow()
{
_isUsed = false;
previewText.text = "";
recordedScoreText.text = "-";
scoreText.text = "-";
SetInteractable(false);
background.color = normalColor;
}