diff options
Diffstat (limited to 'scripts/GUI/SpellMenuEntry.cs')
| -rw-r--r-- | scripts/GUI/SpellMenuEntry.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/GUI/SpellMenuEntry.cs b/scripts/GUI/SpellMenuEntry.cs index 2be0fcc..de71f2a 100644 --- a/scripts/GUI/SpellMenuEntry.cs +++ b/scripts/GUI/SpellMenuEntry.cs @@ -33,6 +33,20 @@ public partial class SpellMenuEntry : HBoxContainer if (shortcut != null) { shortcutLabel.Text = $"{shortcut}"; + + int index = (int)shortcut - 'a'; + + InputEventKey activateEvent = new() + { + Keycode = Key.A + index + }; + + Shortcut shortie = new() + { + Events = [activateEvent] + }; + + castBtn.Shortcut = shortie; } else { |
