Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,454 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 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 | 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