FEATURE REQUEST: Text Box Input

Get help using Construct 2

Post » Sat Apr 19, 2014 6:36 pm

Why is it that I can only write into a text box when:

A - It's on screen
B - It's visible

?

I have events in place that state it's always in focus. This is so I can write into the text box and the content will always be shown in a text object. Anyone know how to achieve this with these 'features' in place?

*UPDATE*

Upon doing further tests it seems that even setting the on-screen box to a vertical size of zero will not allow me to enter text, and also auto size must be switched on if the text box is too small.

Therefore, @Ashley, please may I request that text boxes can be focused even if they are invisible or off screen? At the moment I can't think of a way to allow people to write into Sprite.Font or normal font objects without text boxes.

This (hopefully) minor feature is important for 2 of my current ongoing projects.
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
79
S
12
G
7
Posts: 963
Reputation: 10,721

Post » Sat Apr 19, 2014 10:14 pm

I never liked the text boxes much

maybe you could work with something like this instead?

Edit* see bellow
Last edited by Sargas on Sun Apr 20, 2014 12:56 am, edited 2 times in total.
B
43
S
12
G
6
Posts: 446
Reputation: 6,802

Post » Sat Apr 19, 2014 10:15 pm

Sorry @Sargas, I can't see anything...
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
79
S
12
G
7
Posts: 963
Reputation: 10,721

Post » Sat Apr 19, 2014 10:24 pm

@AnD4D woops, there, forgot the link xD

Edit* see bellow
Last edited by Sargas on Sun Apr 20, 2014 12:56 am, edited 1 time in total.
B
43
S
12
G
6
Posts: 446
Reputation: 6,802

Post » Sat Apr 19, 2014 10:53 pm

@Sargas, Interesting. Not bad at all. The only thing I can think of is the fact that in order to get the shift and caps lock working, I'll have to set up a whole bunch of other functions. I'll definitely do this if the TextBox won't be updated, but the text box method would be a lot more straight forward... if it worked :(
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
79
S
12
G
7
Posts: 963
Reputation: 10,721

Post » Sat Apr 19, 2014 11:03 pm

@AnD4D CapLocks is easy... but holding shift is considerably more complex :D
B
43
S
12
G
6
Posts: 446
Reputation: 6,802

Post » Sun Apr 20, 2014 12:56 am

@AnD4D https://dl.dropboxusercontent.com/u/206 ... ting3.capx

Now you can input only letters, numbers, space and enter. with or without shift. and with capslock on or off.
B
43
S
12
G
6
Posts: 446
Reputation: 6,802

Post » Sun Apr 20, 2014 10:03 pm

@Sargas - Very nice indeed. Thanks a lot! I'm still going to put this through as a feature request however, as although it may be this way by design, I do not see why whether an object is invisible or not should stop it from functioning.

15 events for something that should already be built in reminds me of my early turret code :)
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
79
S
12
G
7
Posts: 963
Reputation: 10,721

Post » Thu Apr 24, 2014 1:35 pm

Following on from: https://www.scirra.com/forum/viewtopic.php?t=102042

@Ashley - Can we at least have a opacity setting then, as I believe 0% opaque objects are still rendered and can therefore be focussed. At the moment, I can't see anyone using the TextBox for their professional game as you can't customize it at all. At least if you link it to a text object you can change the font and size. The ability to enter data is a big deal for my current game, and would prefer to use the great functionality provided by the TextBox... just not the way it looks.

Unless of course, you know of an easier way to achieve my aim beyond Sargas suggestion?

Your help would be appreciated, as it's a rather nicely paid job waiting here, requiring that I upgrade my license :mrgreen:
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
79
S
12
G
7
Posts: 963
Reputation: 10,721

Post » Thu Apr 24, 2014 2:00 pm

If text boxes are off-screen or invisible, the text box is removed from the page so it does not exist. You can't focus a control that does not exist.

It sounds like you're trying to reinvent the wheel. Why not just let the user type text in to the text box itself? Are you going to go as far as enabling cursor editing, text selection, copy/paste...?
Scirra Founder
B
395
S
231
G
88
Posts: 24,367
Reputation: 193,694

Next

Return to How do I....?

Who is online

Users browsing this forum: darkrealos, JaredX, Rhindon and 21 guests