S
Sunny78
Guest
I'm trying to build a menu where when a user selects an option, a sub menu appears to the right of the first set of options. Attached is a picture of what I have so far.
The problem I'm having right now is that when use the following code to draw the next section of the menu -
switch(mpos)
{
case 0:
{
drawParty();
}
(which leads to the drawParty script that simply does the following)
draw_sprite(sunnyMenuBorder,0,10,20);
draw_text(11,13,"words")
When I select the first option (party) the sprite I want to appear only does so for a second after the keyboard check I have finishes and then promptly disappears.
globalvar push;
push = max(keyboard_check_pressed(vk_enter),0);
I've also tried using keyboard_pressed which made the sprite appear only for as long as enter was pressed. I also tried adding some logic that said while some variable was true, draw the sprite which also didn't work. I also tried making an if statement that said if(keyboard_check_pressed(vk_enter)) draw the sprite, and that didn't work correctly either.
What's the correct method for drawing a sprite and making sure it doesn't disappear after it's key check ends?
The problem I'm having right now is that when use the following code to draw the next section of the menu -
switch(mpos)
{
case 0:
{
drawParty();
}
(which leads to the drawParty script that simply does the following)
draw_sprite(sunnyMenuBorder,0,10,20);
draw_text(11,13,"words")
When I select the first option (party) the sprite I want to appear only does so for a second after the keyboard check I have finishes and then promptly disappears.
globalvar push;
push = max(keyboard_check_pressed(vk_enter),0);
I've also tried using keyboard_pressed which made the sprite appear only for as long as enter was pressed. I also tried adding some logic that said while some variable was true, draw the sprite which also didn't work. I also tried making an if statement that said if(keyboard_check_pressed(vk_enter)) draw the sprite, and that didn't work correctly either.
What's the correct method for drawing a sprite and making sure it doesn't disappear after it's key check ends?
Attachments
-
42.6 KB Views: 5