Hi,
int x_pixels = screen_size.x;
This will hold the horizontal size of the PANEL you want.
int y_pixels = screen_size.y;
This will hold the vertical size of PANEL you want.
int scale_y_value = y_pixels / PANEL.size_y /* Current PANEL Size */;
int scale_x_value = x_pixels / PANEL.size_x /* Current PANEL Size */;
The formula to find how much you need to scale
= [WHAT SIZE YOU WANT] / [CURRENT SIZE]
This will give by what percentage the PANEL must be scaled to fit to your size.
This will stretch PANEL to cover the whole screen.
PANEL * pan =
{
bmap = somebackground;
}
function main ()
{
pan.scale_x = screen_size.x / pan.size_x;
pan.scale_y = screen_size.y / pan.size_y;
set(pan,SHOW);
}
Best of Luck