Posted By: carla_mariz
splashscreen problem??! - 01/05/11 01:52
i'm creating a splashscreen for my game and my problem is after showing the splash screen, the buttons for the menu won't work. even the mouse over or click.
here is the code:
my another question, is there a way on how to make fade in and out for the splash???
pls help me..thanks a lot! ^_^
here is the code:
Code:
BMAP* splashmap = "SPLASH.jpg"; BMAP* men1 = "ITEMMENU.jpg"; ///////////////////////////////////////////////////////////////// PANEL* splashscreen = { bmap = splashmap; flags = OVERLAY | SHOW; } PANEL* logoscreen = { layer = 2; bmap = men1; pos_x = 0; pos_y = 0; button (110, 180, "singleot.tga", "singleot.tga", "singleov.tga", NULL, NULL, overmenuitem); button (410, 180, "lanot.tga", "lanot.tga", "lanov.tga", NULL, NULL, overmenuitem); button (20, 260, "optot.tga", "optot.tga", "optov.tga", NULL, NULL, overmenuitem); button (530, 260, "insot.tga", "insot.tga", "insov.tga", NULL, NULL, overmenuitem); button (50, 340, "abot.tga", "abot.tga", "abov.tga", NULL, NULL, overmenuitem); button (490, 340, "exot.tga", "exot.tga", "exov.tga", NULL, NULL, overmenuitem); flags = OVERLAY | SHOW; } ////////////////// function main() { freeze_mode = 1; screen_size.x = 800; screen_size.y = 600; mouse_mode = 0; wait(3); logoscreen.flags &= ~SHOW; splashscreen.pos_x = (screen_size.x - bmap_width(splashmap)) / 2; splashscreen.pos_y = (screen_size.y - bmap_height(splashmap)) / 2; splashscreen.flags = UNTOUCHABLE | SHOW; splashscreen.alpha =100; wait(-2); while (splashscreen.alpha >= 0) { splashscreen.alpha -= 2*time_step; wait(1); } freeze_mode = 0; splashscreen.flags &= ~SHOW; bmap_purge(splashmap); logoscreen.flags = SHOW | OVERLAY; }
my another question, is there a way on how to make fade in and out for the splash???
pls help me..thanks a lot! ^_^