B
BlakeNBitz
Guest
Ok this is hard for me to explain but please bear with me as I am still a noob.....here's the situation:
I successfully am able to navigate my main menu one key press at a time (using up or down arrows). I try to add gamepad controls for the menu navigation as well, but it just goes crazy. If I hold the JS up or down it blazes through the selections w/o stopping until there is zero JS input. I want to move the joystick up or down for each selection each time. I dont want to be able to just hold the joystick down.
Is there a way to easily enable and then disable the JS input in order to navigate the menu one at a time? Any suggestions are greatly appreciated.
IDK if this is needed info, but heres my code for the arrow navigation
I successfully am able to navigate my main menu one key press at a time (using up or down arrows). I try to add gamepad controls for the menu navigation as well, but it just goes crazy. If I hold the JS up or down it blazes through the selections w/o stopping until there is zero JS input. I want to move the joystick up or down for each selection each time. I dont want to be able to just hold the joystick down.
Is there a way to easily enable and then disable the JS input in order to navigate the menu one at a time? Any suggestions are greatly appreciated.
IDK if this is needed info, but heres my code for the arrow navigation
Code:
//event press enter
//Action:
switch (selection)
{
case 0:
audio_stop_sound(snd_Lvl2);
room_goto_next();
break;
case 1:
script_execute(scr_loadgame);
audio_stop_sound(snd_Lvl2);
break;
case 2:
room_goto(rm_Level10);
break;
case 3:
game_end();
break;
}
//Event: press up
//action:
if (selection > 0 )
{
selection --;
}
else {
selection = array_length_1d(menu) -1
}
//Event: press down
//action:
if (selection <array_length_1d(menu)-1)
{
selection ++;
} else {
selection = 0;
}