Is there a way I can cut down on the use of code in creating my
70 panels?
I have to put a code like this 70 tines:
// Panel #01
BMAP imageButtonFrame = "button_frame.pcx";
PANEL panelButtonFrame =
{
scale_x = 0.5;
scale_y = 0.5;
layer = 4;
bmap = imageButtonFrame;
flags = OVERLAY | VISIBLE;
}
and then I have to put a code for their position in here:
/*---------------MAIN----------------*/
// The main() function is started at game start
function main()
{
panelButtonFrame.pos_x = 5; //Position ButtonFrame
panelButtonFrame.pos_y = (screen_size.y)-115;
// load the level
level_load("test.WMB");
wait(2);
}
Is there a way to compress the code?
Also, if I wanted to use the same panel in many places, is there a way I can do so without creating another panel?
Thanks