- Home /
Show GUI.Button press state by keyboard input?
Is it possible to for instance press a key and then put a repeatBtn/guibtn in the 'down/pressed' state while the user holds or taps the key? I want to add that extra touch of feedback while I'm reworking some UI in my project. I use the GUI buttons because I don't want to re-invent the wheel. Also they work great on mobile and I'm planning a dual platform release. Anybody have experience or theory on this one?
Thank you.
Answer by Joyrider · Aug 14, 2013 at 12:48 AM
You could change the used GUIStyle of a custom GUISkin for that button when a certain key is pressed down.
I'll try that out tomorrow after some re-working and planning. Are you sure that I can isolate a single GUI element? If I have to re-structure a bunch of GUI code then I probably wont take that approach. I'll let you know if it works.