Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (dr_panther, Ayumi, 7th_zorro), 877 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
panel position #314445
03/08/10 17:41
03/08/10 17:41
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
I would like a panel to always be 80 above the bottom of the full screen or the window regardless of the screen resolution.

This doesn't work:

pos_y = (screen_size.y - 80);
or
pos_y = (screen_size.y)- 80;

And this doesn't work:

var desktopHeight;
desktopHeight = sys_metrics(1); (in the main function)

pos_y = (desktopHeight -80);
or
pos_y = (desktopHeight)-80;

Any suggestions would be appreciated. Thanks.

Re: panel position [Re: JazzDude] #314446
03/08/10 17:53
03/08/10 17:53
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
function keep_a_distance_startup() {
while(1) {
mypanel.pos_y = screen_size.y-80-mypanel.size_y;
wait(1);
}
}

Should work?


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: panel position [Re: Superku] #314458
03/08/10 18:42
03/08/10 18:42
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
Maybe it is better using the on_d3d_reset event?

Re: panel position [Re: DJBMASTER] #314467
03/08/10 19:39
03/08/10 19:39
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
Thanks Superku, that is exactly what I was trying to code. I might have figured it out in a few days. smile

Re: panel position [Re: JazzDude] #314471
03/08/10 20:02
03/08/10 20:02
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Your welcome but DJBMASTER is right, you should do it his way.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: panel position [Re: Superku] #314799
03/11/10 00:59
03/11/10 00:59
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
The manual didn't help me on that.

Only this sentence registered, grin LOL!:
Quote:
If you have no idea what I'm talking about, you probably won't need on_d3d_lost or on_d3d_reset


Re: panel position [Re: JazzDude] #314800
03/11/10 01:16
03/11/10 01:16
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
Here you go...
Code:
function SetPanelPosition()
{
mypanel.pos_y = screen_size.y-80-mypanel.size_y;
}

function main()
{
on_d3d_reset = SetPanelPosition;
}


Now every time you change resolution, the panel will auto position.

Last edited by DJBMASTER; 03/11/10 01:17.
Re: panel position [Re: JazzDude] #315368
03/14/10 23:31
03/14/10 23:31
Joined: Jul 2004
Posts: 1,710
MMike Offline
Serious User
MMike  Offline
Serious User

Joined: Jul 2004
Posts: 1,710
Originally Posted By: JazzDude
I would like a panel to always be 80 above the bottom of the full screen or the window regardless of the screen resolution.

This doesn't work:

pos_y = (screen_size.y - 80);
or
pos_y = (screen_size.y)- 80;

And this doesn't work:

pos_y = (desktopHeight -80);
or
pos_y = (desktopHeight)-80;

Any suggestions would be appreciated. Thanks.



Oh my god you made my day...
(desktopHeight)-80; its exactly the same of desktopHeight-80;


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

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