Here is a code i wrote myself that makes your picture when u create it in your screensize so that it matches to every screensize
var width;
var height;
PANEL*mypan=
{
bmap="example.bmp";
flags=VISIBLE|SHOW;
}
function main()
{
level_load("");
while(1)
{
width=screen_size.x;
height=screen_size.y;
mypan.scale_x=1/(1440/width);//where the 1440 stands u must put ur screen_size.x;
mypan.scale_y=1/(900/height);//here u must put where the 900 is ur screensize.y;
wait(1);
}
}
So with this code u only have to make one bmap.
for the buttons u must make one Panel for each button.
then u could use
PANEL* button1=
{
button (0, 0, "example2.bmp", "example3.bmp", "example3.bmp", NULL, NULL, NULL);
layer=2;
flags=OVERLAY|SHOW;
}
function main()
{
level_load("");
while(1)
{
button1.pos_x = 500/(1440/width);
button1.pos_y = 300/(900/width);
button1.scale_x=1/(1440/width);
button1.scale_y=1/(900/height);
wait(1);
}
}
and combined it looks like this
var width;
var height;
PANEL*mypan=
{
bmap="example.bmp";
flags=VISIBLE|SHOW;
}
PANEL* button1=
{
button (0, 0, "example2.bmp", "example3.bmp", "example3.bmp", NULL, NULL, NULL);
layer=2;
flags=OVERLAY|SHOW;
}
function main()
{
level_load("");
while(1)
{
width=screen_size.x;
height=screen_size.y;
mypan.scale_x=1/(1440/width);//where the 1440 stands u must put ur screen_size.x;
mypan.scale_y=1/(900/height);//here u must put where the 900 is ur screensize.y;
button1.pos_x = 500/(1440/width);
button1.pos_y = 300/(900/width);
wait(1);
}
}
But the script with the buttons make the buttons position so that it matches to the Panel not to the Engine position
WFG Progger