Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by dr_panther. 05/18/24 11:01
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (7th_zorro, dr_panther), 724 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: How am i able to let the User write a Text? [Re: ] #233959
10/31/08 12:10
10/31/08 12:10
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Color of the text:
add the red,green,blue parameters in the text object declaration:
Code:
TEXT* namensfeld =
{
  pos_x=21;
  pos_y=350;
  layer=20;
  font = goth;
  red = 1;
  green = 1;
  blue = 1;
  string(Karten_name);
  flags=VISIBLE;
}

By the way: your function for the input is ugly coded wink
If you really want to use a while loop then have a global variable which can be set to terminated that while loop.
Or (even better):
Use the button_number of the field (they would need to be buttons and sitting on one panel) to save the input in the right string.

Re: How am i able to let the User write a Text? [Re: Xarthor] #233960
10/31/08 12:11
10/31/08 12:11

F
Fear411
Unregistered
Fear411
Unregistered
F



do you mean my code. Yeah i know its not good, but i adapted to the other code snippets here in this thread

Re: How am i able to let the User write a Text? [Re: Xarthor] #233961
10/31/08 12:13
10/31/08 12:13
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
hey.. it´s my first input object i´m coding.. be gentle ^^

by the way: is there a code to stop stop the inkey without hitting Enter/Tab/PageDw/pageUp..etc?
And how to ask for the lengh of a string ( so if it reaches it´s maximal size, textfeldnummer is set += 1 ).

Last edited by xXReapeRXx; 10/31/08 12:35.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: How am i able to let the User write a Text? [Re: Espér] #233974
10/31/08 12:55
10/31/08 12:55
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
inkey_active = 0; // stop the inkey
string_length = str_len(Karten_name); // string_length is the length of Karten_name now.

Re: How am i able to let the User write a Text? [Re: Espér] #233975
10/31/08 12:56
10/31/08 12:56
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
@Fear411: Nope I meant xXReapeRXx's code.

@xXReapeRXx:
[edit] see the post above

Last edited by Xarthor; 10/31/08 12:57.
Re: How am i able to let the User write a Text? [Re: Xarthor] #234028
10/31/08 17:51
10/31/08 17:51
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
thanks at all ^^

paste everyone of you to my info-window ^^


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: How am i able to let the User write a Text? [Re: Espér] #234089
10/31/08 22:40
10/31/08 22:40
Joined: Sep 2008
Posts: 66
falagar8 Offline
Junior Member
falagar8  Offline
Junior Member

Joined: Sep 2008
Posts: 66

one thing that I will add is this:

there's a whole host or a a whole lotta of parameters,
attributes, and methods for each Object in 3D Game Studio.
Take the TEXT Object again.

The trick is to know what all or most of them are and do.
And have a passing reference for them.
Then learn what the basic or minimuns are to get something
up and running. As well as the defaults if they are included or
not included as you declare your TEXT Object in this case. For example in my simple code posted abouve I did not include the red,green,blue components. But by default they are 255 each for the whole total color to be white.
Then gradually and eventually pick and choose what attributes,paramaters,
and methods to use in your TEXT Object and also know their defaults if any too.
Those you use and include and those you don't use and neither include.

I hope this helps.

Re: How am i able to let the User write a Text? [Re: falagar8] #234101
10/31/08 23:53
10/31/08 23:53
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
not really XD


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: How am i able to let the User write a Text? [Re: Espér] #234115
11/01/08 01:23
11/01/08 01:23
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
He means, when playing with new functions/objects, test how they work by
knowing how it behaves in its most simple fashion (ie defaults),
then make it more complex till you get what you need.

In your case create the TEXT object at its most simple, just displaying a static text
Code:
TEXT* namensfeld =
{
  string("testing text");
  flags=VISIBLE;
}
then update its complexity piece by piece till you get your desired result.
I would use the following steps, I know youve got the answer to them already,
but if you follow these sort of steps through anyway you can often catch faulty thinking
before it gets too buried in other stuff.

Starting from the somple code above, compile and test.
You see the text up the top left, and hopefully notice it is white.
Now only change its position, compile and test.
Cant see it anymore, now remember its color. Aha!
Now only change its color & position, compile and test.
Now you can see it, good. So add the goth font, compile and test.
Still looking good, OK so replace the fixed text with your Karten_name variable.
Compile and test.

Some of the more simple changes can be grouped together if you are certain of them all,
but the more complex each "step" is, the more places there are for logic faults to creep in.
End of tutorial....


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: How am i able to let the User write a Text? [Re: EvilSOB] #234204
11/01/08 15:52
11/01/08 15:52
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
oh.. ok.. thanks ^^


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Page 2 of 3 1 2 3

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