|
Start Panel
#82429
07/21/06 02:31
07/21/06 02:31
|
Joined: May 2005
Posts: 222
tek
OP
Member
|
OP
Member
Joined: May 2005
Posts: 222
|
I recently made a panel by following a tutorial, in this panel if I click on the "exit" button I exit the game, now what I want is to make a start button that when I click on it I go to the first level mynewgame.wmb. how would I do that I already created a bmap startgame.pcx but how do I implement that with the mouse if I click on it I go to the first level ? this is the code. Quote:
var video_mode = 7; // 800x600 pixels var video_depth = 32; // 32 bit mode
////////////////////////////////////////////////////////////////////
bmap mouse_pcx = <mouse.pcx>; // bitmap used for the mouse pointer bmap main_pcx = <main.pcx>; // main panel bmap quitclicked_pcx = <quitclicked.pcx>; bmap quitnormal_pcx = <quitnormal.pcx>; bmap quitover_pcx = <quitover.pcx>;
////////////////////////////////////////////////////////////////////
string work06_wmb = <work06.wmb>;
////////////////////////////////////////////////////////////////////
function main() { level_load (work06_wmb); mouse_map = mouse_pcx; mouse_mode = 2; while (1) { mouse_pos.x = pointer.x; mouse_pos.y = pointer.y; wait (1); } }
function quit_program() { sleep (3); exit; }
//////////////////////////////////////////////////////////////////////
panel main_pan { bmap = main_pcx; pos_x = 250; pos_y = 200; button = 250, 134, quitclicked_pcx, quitnormal_pcx, quitover_pcx, quit_program, null, null; flags = overlay, refresh, visible; }
|
|
|
Re: Start Panel
[Re: tek]
#82430
07/21/06 02:37
07/21/06 02:37
|
Joined: Aug 2004
Posts: 2,215
ISG
![](/ubb7/images/groups/mod.gif)
Expert
|
![](/ubb7/images/groups/mod.gif)
Expert
Joined: Aug 2004
Posts: 2,215
|
var video_mode = 7; // 800x600 pixels var video_depth = 32; // 32 bit mode
////////////////////////////////////////////////////////////////////
bmap mouse_pcx = <mouse.pcx>; // bitmap used for the mouse pointer bmap main_pcx = <main.pcx>; // main panel bmap quitclicked_pcx = <quitclicked.pcx>; bmap quitnormal_pcx = <quitnormal.pcx>; bmap quitover_pcx = <quitover.pcx>; bmap startgame_pcx = <startgame.pcx>; ////////////////////////////////////////////////////////////////////
string work06_wmb = <work06.wmb>; string mynewgame = <mynewgame.WMB>;
////////////////////////////////////////////////////////////////////
function main() { level_load (work06_wmb); mouse_map = mouse_pcx; mouse_mode = 2; while (1) { mouse_pos.x = pointer.x; mouse_pos.y = pointer.y; wait (1); } }
function quit_program() { sleep (3); exit; }
function startgame_function() { wait(1); level_load(mynewgame); }
//////////////////////////////////////////////////////////////////////
panel main_pan { bmap = main_pcx; pos_x = 250; pos_y = 200; button = 250, 134, quitclicked_pcx, quitnormal_pcx, quitover_pcx, quit_program, null, null; flags = overlay, refresh, visible; }
panel start_game { bmap = startgame_pcx; pos_x = 100; pos_y = 100; flags = overlay, visible; on_click = startgame_function(); }
|
|
|
Re: Start Panel
[Re: ISG]
#82437
07/21/06 05:33
07/21/06 05:33
|
Joined: May 2005
Posts: 222
tek
OP
Member
|
OP
Member
Joined: May 2005
Posts: 222
|
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|