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
2 registered members (AndrewAMD, TipmyPip), 12,389 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 pos_x and y #104742
01/01/07 20:15
01/01/07 20:15
Joined: May 2006
Posts: 16
L
Ludochrist Offline OP
Newbie
Ludochrist  Offline OP
Newbie
L

Joined: May 2006
Posts: 16
going through the c script tutorials and from what i gather the pos_x and y of the panel is only from the top left corner. this causes a problem if i want to have the resolutions changeable, especially for elements i want to be in the bottom right corner. is there an easier way to get panel elements in the bottom right corner in several resolutions without having to write separate code for each resolution mode?

Re: panel pos_x and y [Re: Ludochrist] #104743
01/01/07 20:24
01/01/07 20:24
Joined: Dec 2006
Posts: 78
Nevada, USA
Futurulus Offline
Junior Member
Futurulus  Offline
Junior Member

Joined: Dec 2006
Posts: 78
Nevada, USA
You can use screen_size.x and screen_size.y. To keep your panel in the bottom right, just use a loop like this:
Code:

while(1)
{
panel.pos_x = screen_size.x - panel.size_x;
panel.pos_y = screen_size.y - panel.size_y;
wait(1);
}


If the size of the panel depends on the size of a bitmap, and that code doesn't work (try it out first), you can use the size of the bmap:
Code:

while(1)
{
panel.pos_x = screen_size.x - bmap_width(panel.bmap);
panel.pos_y = screen_size.y - bmap_height(panel.bmap);
wait(1);
}



Re: panel pos_x and y [Re: Futurulus] #104744
01/01/07 21:09
01/01/07 21:09
Joined: May 2006
Posts: 16
L
Ludochrist Offline OP
Newbie
Ludochrist  Offline OP
Newbie
L

Joined: May 2006
Posts: 16
thanks, that worked great!


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