Skip to content

Commit

Permalink
Cherry-picked commit e697231 from space-wizards/space-station-14/master
Browse files Browse the repository at this point in the history
  • Loading branch information
SimpleStation14 authored and wrexbe committed Mar 23, 2024
1 parent 3bf08c7 commit 3342f83
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ ActionButton MakeButton(int index)
{
var button = new ActionButton(_entity);

if (keys.TryGetValue(index, out var boundKey))
{
button.KeyBind = boundKey;
if (!keys.TryGetValue(index, out var boundKey))
return button;

var binding = _input.GetKeyBinding(boundKey);
button.KeyBind = boundKey;
if (_input.TryGetKeyBinding(boundKey, out var binding))
{
button.Label.Text = binding.GetKeyString();
}

Expand Down

0 comments on commit 3342f83

Please sign in to comment.