Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (Dico), 16,767 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Panel size adjust to screen #300926
12/07/09 01:11
12/07/09 01:11
Joined: Nov 2008
Posts: 109
J
JGGamer Offline OP
Member
JGGamer  Offline OP
Member
J

Joined: Nov 2008
Posts: 109
I have a panel with an image that fits the whole screen, and I use this code...

Code:
panel_face.scale_x = (screen_size.x / bmap_width[code](panel_face.bmap));
panel_face.scale_y = (screen_size.y / bmap_height(panel_face.bmap)+0.001);



...so that it adjusts to fit the screen at any resolution. This works fine.
However, I have a panel with a smaller image. When the resolution is adjusted the panel's image size remain the same. I used the code above, but that stretches it to fit the screen.
What code do I use to adjust the panel's bitmap size according to the screen resolution?

Last edited by JGGamer; 12/07/09 01:12.
Re: Panel size adjust to screen [Re: JGGamer] #300928
12/07/09 01:15
12/07/09 01:15
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Try playing with panel.scale_x and scale_y instead.
It stretches/shrinks the bmap (and panel size) for sure, but I dunno about button placements...
Also, I dont know if it is c-script friendly. (if your using c-script that is)


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Panel size adjust to screen [Re: EvilSOB] #301051
12/07/09 23:53
12/07/09 23:53
Joined: Nov 2008
Posts: 109
J
JGGamer Offline OP
Member
JGGamer  Offline OP
Member
J

Joined: Nov 2008
Posts: 109
Playing with the scale is going to present a problem, because I would have to do that for every possible resolution. There has to be an easier way, I'm sure.
I am using lite-c. Thanks


Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1