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
0 registered members (), 16,302 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
text position not relative? #354510
01/19/11 14:43
01/19/11 14:43
Joined: Dec 2010
Posts: 63
C
Ceryni Offline OP
Junior Member
Ceryni  Offline OP
Junior Member
C

Joined: Dec 2010
Posts: 63
hi,

i want to place a text relativ to the screen size
Code:
TEXT* inkey_chatmsg_text =
{
	pos_x = 10;
	pos_y = screen_size.y-20;
	layer = 1;
	strings = 2;
	string = "Nachricht:",chat_input;
}



the compiler says that its a nummeric error
is it impossible to place it relative

Re: text position not relative? [Re: Ceryni] #354511
01/19/11 14:57
01/19/11 14:57
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Yes, that is not allowed. Write the code as follows:

TEXT* inkey_chatmsg_text =
{
pos_x = 10;
layer = 1;
strings = 2;
string = "Nachricht:",chat_input;
}

function main() {
video_mode = ...;
...
After the first frame, screen_size is set by video_mode and you can use it:
wait(1);
inkey_chatmsg_text.pos_y = screen_size.y-20;
}


"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: text position not relative? [Re: Ceryni] #354514
01/19/11 15:22
01/19/11 15:22
Joined: Dec 2010
Posts: 63
C
Ceryni Offline OP
Junior Member
Ceryni  Offline OP
Junior Member
C

Joined: Dec 2010
Posts: 63
thx (danke)


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