Help making a quick access menu

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By jevisan

Hi, I want to make a quick menu that’s accessible during gameplay and can be enabled while holding a key, so the player can select an item with the arrows. Then on release, the item gets selected.

A little gif showing the intended result:

selectable items menu

Now, I’ve tried with ItemList, and with an HBoxContainer with buttons and adding focus logic, but it lead to unintended results.

I’m completely lost in what should I do, if someone can point me in the right direction, it’d be really appreciated.

If I get you rigth the player should push a certain key and a menu will show? like

var Item : String = ""
if Input.is_key_pressed(KEY_0):
  $PathToNode.show()
else:
   $PathToNode.hide()
if $PathToNode.visible:
  if Input.is_key_pressed(KEY_LEFT):
     $PathToNode.PathToItem.set_texture(ItemSelceted)
     Item = "Item01"
  else:
    $PathToNode.PathToItem.set_texture(NoItemSelceted)
    Item = "No Item"

Like this?

MrMrBlackDragon | 2020-01-23 01:14