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
1 registered members (TipmyPip), 18,466 guests, and 6 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 box? #224704
08/31/08 20:34
08/31/08 20:34
Joined: Aug 2008
Posts: 22
R
razvan252 Offline OP
Newbie
razvan252  Offline OP
Newbie
R

Joined: Aug 2008
Posts: 22
hello. i was wondering if making something like a multi-line scrollable text box is possible. im after a log that will add some text lines depending on what the player does.(ex: shot missed, out of ammo, etc). Can someone pls point me in the right direction?

Re: text box? [Re: razvan252] #224713
08/31/08 21:18
08/31/08 21:18
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
It's definately possible. Here's some of the code I use for a debug log,
this isn't scrollable but it's the basics

Code:
TEXT* txt_log = {
	pos_x = 20; pos_y = 20;
	layer = 100;
	strings = 40;
	flags = visible;
}

function fnc_logUpdate(STRING* localString){
	while(i < txt_log.strings-1){ //most recent at bottom
		str_cpy((txt_log.pstring)[i],(txt_log.pstring)[i+1]);
		i+=1;
	}
	if(localString){
		str_cpy((txt_log.pstring)[txt_log.strings-1],localString);
	}else{
		str_cpy((txt_log.pstring)[0],"");
	}
}


then use the line
Code:
fnc_logUpdate("MY STRING");
to add it to the log

if you want it scrollable, you'll need a second TEXT* and your current TEXT txt_log will display the selected lines from there

Re: text box? [Re: razvan252] #224838
09/01/08 13:31
09/01/08 13:31
Joined: Aug 2008
Posts: 22
R
razvan252 Offline OP
Newbie
razvan252  Offline OP
Newbie
R

Joined: Aug 2008
Posts: 22
yeah i was thinking along those lines to add the text, thank you. not too sure about scrolling though. cant "textboxes" like in c++ or c# be added?


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

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