Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (RealSerious3D, AndrewAMD, BrainSailor, 1 invisible), 1,233 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 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 | chip programmers | 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