I need to set flag = SHOW later when panel already defined?.
and how to insert button in panel when created this way?.
function call_MainMenu() { PANEL* MainMenu = pan_create("flags=SHOW",999); //create a panel at 0,0 at runtime BMAP* bmpMainMenu = "mainmenu.pcx"; //Set the bitmap
MainMenu.bmap = bmpMainMenu; // NOW add the bmap to the Panel MainMenu.pos_x = (screen_size.x - bmap_width(bmpMainMenu)) / 2;
For inserting buttons, take a look at the pan_setbutton command (in the manual)
I don't think you need to set flag=SHOW later; you can just set it directly, as you do now.
I don't know if you want to do this, but additionally, you can also set other settings (such as the bmap) instantly at creation: PANEL* MainMenu = pan_create("bmap = bmpMainMenu.pcx; flags = SHOW;", 999);
But yes if iam showing video/intro and after want to Show panel(mainMenu) i could change flag to flag=SHOW or something when intro is done. Maybe its me that are thinking Object Oriented. Like
Main { // Here 2 panels and changing visible states SplashScreen.Show = true;
Wait(-10);
SplashScreen.Dispose();
MainMenu.Show = true; }
and i will look into pan_setbutton command (in the manual) to night.