2019-03-20 23:34:49

ok. this is the first thing I have coaded in bgt.
but, in the menu when I press enter, its exiting.
please help me with it.
dynamic_menu_pro m;
void setupmenu(bool music=false)
{
m.reset(false);
if(music==true)
{
m.add_music("menumusic.ogg");
}
m.click_sound="mclick.ogg";
m.enter_sound="menter.ogg";
m.enable_up_and_down=true;
m.wrap=false;
m.enable_home_and_end=true;
}
void mainmenu()
{
setupmenu(true);
m.add_item_tts("start game","gamemenu");
m.add_item_tts("game settings","settingsmenu");
m.add_item_tts("exit","exit");
int mres=m.run("wellcom use your up and down aro keys to navigate in the menu, and use enter to actovate.",true);
if (m.get_item_name(mres)=="play")
{
gamemenu();
}
else if (m.get_item_name(mres)=="settingsmenu")
{
m.fade_music(20);
settingsmenu;
}
else if (m.get_item_name(mres)=="exit")
{
m.fade_music(20);
exit();
}
}
void gamemenu()
{
setupmenu(true);
m.add_item_tts("play offline","offline");
m.add_item_tts("play online","online");
}
void settingsmenu()
{
setupmenu(true);
m.add_item_tts("exit","exit");
}

I am a divine being. I can be called a primordial deity, but that might be pushing it, a smidge. I am the only one of my kind to have ten tails, with others having nine. I don't mean to sound arrogant, but I have ascended my own race.

2019-03-20 23:53:39

Its rather obvious isn't it. Even if you press return so your game menu starts, it gets created, , but you never call the run() method, so no menu is shown either, hence the app exits due to nothing left to do.
Best Regards.
Hijacker

2019-03-21 07:22:47

as post 2 sed, you didn't rote anything to do when player press enter on eg offlyne or play onlyne

2019-03-21 13:15:05

you need to do the int mres=m.run("asdhafuiawhuifhawr",true"); thing for each menu.

----------
“Yes, sir. I am attempting to fill a silent moment with non-relevant conversation.”
“You don’t tell me how to behave; you’re not my mother!”
“Could you please continue the petty bickering? I find it most intriguing.” – Data (Star Trek: The Next Generation)

2019-03-21 23:32:21

look!
https://www.dropbox.com/s/0z24wo9bod3mk … e.exe?dl=0

I am a divine being. I can be called a primordial deity, but that might be pushing it, a smidge. I am the only one of my kind to have ten tails, with others having nine. I don't mean to sound arrogant, but I have ascended my own race.

2019-03-21 23:34:29

I am not downloading an exe file that you randomly posted a link to

----------
“Yes, sir. I am attempting to fill a silent moment with non-relevant conversation.”
“You don’t tell me how to behave; you’re not my mother!”
“Could you please continue the petty bickering? I find it most intriguing.” – Data (Star Trek: The Next Generation)