What do people do for typing in a character name?

Get help using Construct 2

Post » Wed Aug 02, 2017 1:17 am

I'm imagining having to type code to catch all the letters of the alphabet, plus space...it all seems a little clumsy to implement for the novelty of naming a character in a game. What method do you guys use - is there an easier way?
B
50
S
14
G
4
Posts: 187
Reputation: 5,499

Post » Wed Aug 02, 2017 1:24 am

Which way are you trying to name a character? I suppose you are talking about spritefonts? Or custom keyboard or smth?
Sorry I don't really understand, maybe I'm too asleep....
B
19
S
7
Posts: 141
Reputation: 1,774

Post » Wed Aug 02, 2017 2:13 am

Why can't you just use an ordinary text box?

If you want to make a nicer looking box to type in, just put the actual textbox off-screen and force set-focus to the textbox when you want the player to type in the name. Then create a nicer looking box on the screen for players to see - but it doesn't really do the hard work.

You can reflect whatever is in the textbox just using some sprite fonts or whatever for your "visible to the player" version of the textbox.

I hope this makes sense?

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
81
S
34
G
40
Posts: 3,032
Reputation: 30,424

Post » Wed Aug 02, 2017 4:19 am

SoldjahBoy wrote:Why can't you just use an ordinary text box?


Because I didn't know about them :p

Thanks for the info, I'll have a look. Though I've looked a bit now and I'm not sure how to register when the information has been entered? Separate keypress check for enter?
B
50
S
14
G
4
Posts: 187
Reputation: 5,499

Post » Wed Aug 02, 2017 9:09 am

Detecting 'enter' when using a TextBox :

https://www.dropbox.com/s/5ysizu9kjsu47 ... .capx?dl=0
B
33
S
18
G
28
Posts: 2,474
Reputation: 20,912

Post » Thu Aug 03, 2017 2:00 am

Callan S wrote:
SoldjahBoy wrote:Why can't you just use an ordinary text box?


Because I didn't know about them :p

Thanks for the info, I'll have a look. Though I've looked a bit now and I'm not sure how to register when the information has been entered? Separate keypress check for enter?


Oh! hahaha - I don't know I just figured most people had encountered a text box lmao. I thought you must have had some other reason to NOT want to use it! xD

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
81
S
34
G
40
Posts: 3,032
Reputation: 30,424


Return to How do I....?

Who is online

Users browsing this forum: Syazanie Amirin and 10 guests