Gamestudio Links
Zorro Links
Newest Posts
Tradestation Multi-sessions??
by walt_Schwarz. 06/25/26 20:18
ZorroGPT
by TipmyPip. 06/24/26 18:31
Z9 getting Error 058
by flip26. 06/24/26 13:57
Lapsa's very own thread
by Lapsa. 06/20/26 18:18
Ranger by Robert Pardo - now for Zorro
by Smallz. 06/20/26 11:23
Z12 live performance
by jcl. 06/19/26 11:21
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 3,712 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Student_64151, Koti, curry, DeepxKalsi, Samed
19219 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