Skip to content

Commit 22beb5a

Browse files
committed
tweak(input): skip the instructional button for a binding with no icon
1 parent 11aec67 commit 22beb5a

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

MenuAPI/MenuController.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,10 +1251,21 @@ private static void FillInstructionalButtonSlots(Menu menu)
12511251
{
12521252
Menu.KeyBindingHandler entry = menu.KeyBindingHandlers[i];
12531253

1254-
if (!string.IsNullOrEmpty(entry.ButtonText))
1254+
if (string.IsNullOrEmpty(entry.ButtonText))
12551255
{
1256-
SetInstructionalButtonSlot(slot++, entry.Binding.Icon, entry.ButtonText);
1256+
continue;
12571257
}
1258+
1259+
string icon = entry.Binding.Icon;
1260+
1261+
// A binding with no controller button has no icon to draw once the player picks up a pad,
1262+
// and a label floating on its own reads as a button the player cannot find.
1263+
if (string.IsNullOrEmpty(icon))
1264+
{
1265+
continue;
1266+
}
1267+
1268+
SetInstructionalButtonSlot(slot++, icon, entry.ButtonText);
12581269
}
12591270

12601271
for (int i = 0; i < menu.CustomInstructionalButtons.Count; i++)

0 commit comments

Comments
 (0)