Hypotakt
Member
Hey guys,
is there a smart way for detecting any keypress on keyboard or GPad?
The reason for this: If an icon of the button you have to press for an action is shown up (Like press A-Button on GPad to continue), it should show the icon of which control the player is using at the moment.
I have a global.active_control variable, which keeps track of the active control, and an object which should do something like this:
For sure, I could hardcode any possibility of what you can press. But is there something smarter than this?
is there a smart way for detecting any keypress on keyboard or GPad?
The reason for this: If an icon of the button you have to press for an action is shown up (Like press A-Button on GPad to continue), it should show the icon of which control the player is using at the moment.
I have a global.active_control variable, which keeps track of the active control, and an object which should do something like this:
GML:
//DETECT ACTIVE CONTROLS
if( gamepad_button_check_pressed( device, ANY_BUTTON ) ){
global.active_control = "Gamepad";
}else if( keyboard_check_pressed( ANY_BUTTON ) ){
global.active_control = "Keyboard";
}