Passion & UI

This commit is contained in:
SoulliesOfficial
2026-06-12 17:11:39 -04:00
parent 7bc1e1722c
commit 6d7ebc5825
3444 changed files with 865284 additions and 463132 deletions

View File

@@ -0,0 +1,43 @@
using UnityEngine;
using TMPro;
namespace Michsky.UI.Shift
{
[ExecuteInEditMode]
public class ShortcutButton : MonoBehaviour
{
[Header("Resources")]
public string keyText = "A";
public string buttonText = "My Title";
[Header("Settings")]
public bool useCustomText = false;
public bool isGamepad = false;
[Header("Resources")]
public TextMeshProUGUI normalText;
public TextMeshProUGUI highlightedText;
public TextMeshProUGUI normalKeyText;
public TextMeshProUGUI highlightedKeyText;
void OnEnable()
{
if (useCustomText == false)
{
if (isGamepad == false)
{
if (normalText != null) { normalText.text = buttonText; }
if (highlightedText != null) { highlightedText.text = buttonText; }
if (normalKeyText != null) { normalKeyText.text = keyText; }
if (highlightedKeyText != null) { highlightedKeyText.text = keyText; }
}
else
{
if (normalText != null) { normalText.text = buttonText; }
if (normalKeyText != null) { normalKeyText.text = keyText; }
}
}
}
}
}