Page 1 of 1

Writing text for phones

PostPosted: Tue Feb 18, 2014 4:39 pm
by knucklecrunchgames
Hi all. I know how to write text on ge with the keyboard by selecting yes on input, but how do you make buttons to write.

Thanks

Re: Writing text for phones

PostPosted: Wed Feb 19, 2014 4:03 am
by skydereign
You would need to make a virtual keyboard, that way you can map clicks to keystrokes. And since you can't use the input box you'll need to manipulate the string yourself. Here's a simple example. Create a text actor with some default text. Then have another actor with the following mouse down event.
Code: Select all
strcat(text_actor.text, "a");

Now when the button actor is pressed, the text actor's text should insert an a.

Re: Writing text for phones

PostPosted: Wed Feb 19, 2014 3:29 pm
by knucklecrunchgames
You would need to make a virtual keyboard, that way you can map clicks to keystrokes. And since you can't use the input box you'll need to manipulate the string yourself. Here's a simple example. Create a text actor with some default text. Then have another actor with the following mouse down event.
Code: Select all
strcat(text_actor.text, "a");

Now when the button actor is pressed, the text actor's text should insert an a.


Thanks sky. I have another question.

How would you do a backspace.

Thanks :)

Re: Writing text for phones

PostPosted: Wed Feb 19, 2014 3:31 pm
by knucklecrunchgames
skydereign wrote:strcat(text_actor.text, "a");


YOU... YOU...USED AN EMOTION! :shock: :o :shock: :o

But why the long face :?

Re: Writing text for phones

PostPosted: Wed Feb 19, 2014 4:21 pm
by MrJolteon
knucklecrunchgames wrote:
skydereign wrote:strcat(text_actor.text, "a");


YOU... YOU...USED AN EMOTION! :shock: :o :shock: :o

But why the long face :?

No he didn't.

Re: Writing text for phones

PostPosted: Wed Feb 19, 2014 5:47 pm
by knucklecrunchgames
MrJolteon wrote:
knucklecrunchgames wrote:
skydereign wrote:strcat(text_actor.text, "a");


YOU... YOU...USED AN EMOTION! :shock: :o :shock: :o

But why the long face :?

No he didn't.


Yes he did.

Re: Writing text for phones

PostPosted: Thu Feb 20, 2014 9:58 am
by DeltaLeeds
knucklecrunchgames wrote:
skydereign wrote:strcat(text_actor.text, "a");


YOU... YOU...USED AN EMOTION! :shock: :o :shock: :o

But why the long face :?


That is part of the code, so of course he didn't! If that was an emote, he would have used tons of emotes in his posts.

Re: Writing text for phones

PostPosted: Thu Feb 20, 2014 11:29 am
by knucklecrunchgames
jonathang wrote:
knucklecrunchgames wrote:
skydereign wrote:strcat(text_actor.text, "a");


YOU... YOU...USED AN EMOTION! :shock: :o :shock: :o

But why the long face :?


That is part of the code, so of course he didn't! If that was an emote, he would have used tons of emotes in his posts.


I know. It's a joke

Re: Writing text for phones

PostPosted: Mon Mar 24, 2014 4:32 pm
by sonicforvergame
skyderieg is NOT emotionless he is just so awesome in explaining it make us fell like what he says is monotone or without any feeling