Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by OptimusPrime. 08/15/26 23:39
Max Number of Strategies in /Strategy folder
by Martin_HH. 08/15/26 09:47
Pause button for evaluation shell?
by AndrewAMD. 08/13/26 17:16
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 08/10/26 12:46
phantom() not defined in indicators.c
by jcl. 08/07/26 11:45
Accepting new programming clients
by AndrewAMD. 08/06/26 21:25
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (Lapsa, OptimusPrime), 6,717 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
riggi89, shuhari, KD1990, Student_64151, Koti
19230 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