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 (TipmyPip), 18,586 guests, and 6 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 resize? #230629
10/07/08 09:07
10/07/08 09:07
Joined: Aug 2008
Posts: 22
R
razvan252 Offline OP
Newbie
razvan252  Offline OP
Newbie
R

Joined: Aug 2008
Posts: 22
ok so i added a panel with a bg img, but it doesnt resize depending on resolution. on 1024 its good but at lower res shouldnt stuff on screen resize?

Re: panel resize? [Re: razvan252] #230631
10/07/08 09:27
10/07/08 09:27
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Automatic resizing of panels due to resolution change is not done by the engine. You have to do this by yourself.

Screen entities are rendered resolution independent.

Re: panel resize? [Re: HeelX] #230641
10/07/08 11:02
10/07/08 11:02
Joined: Jul 2005
Posts: 187
L
lostzac Offline
Member
lostzac  Offline
Member
L

Joined: Jul 2005
Posts: 187
This code was posted on the forum, but I forget by who ...anyways I use this to scale all my panels to the correct size of the users rez

//////////////////////////////
// function panelRefresh(PANEL* sPanel)
// Rescales sPanel to fit the new resouloution
//////////////////////////////
function panelRefresh(PANEL* sPanel)
{
var HUD_reference[2] = {1600, 1200};
var PosX;
var PosY;

//Temp Postion
PosX = sPanel.pos_x;
PosY = sPanel.pos_y;

//Position
sPanel.pos_x = (screen_size.x / HUD_reference[0]) * PosX;
sPanel.pos_y = (screen_size.y / HUD_reference[1]) * PosY;

//Scaling
sPanel.scale_x = (screen_size.x / HUD_reference[0]);
sPanel.scale_y = (screen_size.y / HUD_reference[1]);
}


John C Leutz II


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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