- Home /
How to make a menu controled from Keyboard and using buttons?
Hello! I'm working on a Turn Based Game like Final Fantasy Tactics, Disgaea or Xcom, and right now i'm trying to do the "actions menu". The game it's meant to be played with a controler using the arrows/joystick to move around the grid and the menus. These are my problems right now:
I need to highlight the pre-selected button, so the player knows what button it's going to be activated when he hits "Space" in the keyboard
I don't know how to activate my selected (and highlighted) buttons through the keyboard (the OnClick() function works when i click it with the mouse.. and i'm not playing with the mouse); How can i do this?.
this is the hyerarchy of my canvas: http://gyazo.com/715083dbe07f8a93ba72e16023ace6b5
And to manage the UI, I'm using a Script called Hudmanager that it's in charge of all the changes applied to the buttons, the panel and all the UI elements.
Thanks for all the help!
Your answer
![](https://koobas.hobune.stream/wayback/20220613190422im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
if button is highlighted run script (non-mouse) 0 Answers
Menu Animation 2 Answers
Is the 'highlighted state' the same as the 'selected state'? 2 Answers
In game right click menu 1 Answer