generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: TextBox KeyDown

Previous Thread :: Next Thread 
wetrel is not online. wetrel
Joined: 19 Jun 2009
Total Posts: 919
27 Feb 2014 06:08 PM
Is there a way to be able to detect KeyDown while the player is focused on a textbox?
Report Abuse
transIate is not online. transIate
Joined: 20 Jun 2013
Total Posts: 2699
27 Feb 2014 06:10 PM
wat
Report Abuse
wetrel is not online. wetrel
Joined: 19 Jun 2009
Total Posts: 919
27 Feb 2014 06:12 PM
KeyDown events dont occur while the player is focused (typing/ active cursor) in a gui textbox.
Report Abuse
VoidShredder is not online. VoidShredder
Joined: 06 Jan 2014
Total Posts: 1467
27 Feb 2014 06:12 PM
Why would you even need this.
Report Abuse
wetrel is not online. wetrel
Joined: 19 Jun 2009
Total Posts: 919
27 Feb 2014 06:13 PM
Thats not relevant, but a visual SB.
Report Abuse
xFortunato is not online. xFortunato
Joined: 25 Nov 2010
Total Posts: 865
27 Feb 2014 06:14 PM
I'm guessing you're making an 'Editable' textbox?
How about instead of using default edit option you make it psuedo-editable?
A normal text label, when you click it the background color changes to indicate you are editing. Then you detect all keydown strokes and adjust the text yourself (you could even have your own blinking cursor). Not sure exactly how you will end editing, maybe when they click anywhere that isn't the text box, or click esc, etc..?
Report Abuse
wetrel is not online. wetrel
Joined: 19 Jun 2009
Total Posts: 919
27 Feb 2014 06:14 PM
I could see what textbos the player is focused on and save the text every time they press a key but that will not work for enter and backspace.
Report Abuse
transIate is not online. transIate
Joined: 20 Jun 2013
Total Posts: 2699
27 Feb 2014 06:14 PM
It's not going to detect if you are writing something but it will detect if you enter it.. asdf
Report Abuse
VoidShredder is not online. VoidShredder
Joined: 06 Jan 2014
Total Posts: 1467
27 Feb 2014 06:14 PM
And this is because how annoying would it be if the button 'e' creates a nuke, and you were typing in a word in textbox like "I like pie"

2 nukes go off right there.
Report Abuse
wetrel is not online. wetrel
Joined: 19 Jun 2009
Total Posts: 919
27 Feb 2014 06:15 PM
Thats smart, but it would be extremely difficult to place the cursor at the right position in the text based on where the player clicks.
Report Abuse
wetrel is not online. wetrel
Joined: 19 Jun 2009
Total Posts: 919
27 Feb 2014 06:16 PM
I can make an if statement to make sure the function I want only happens when a player is in a box, a nuke wont be a problem.
Report Abuse
xFortunato is not online. xFortunato
Joined: 25 Nov 2010
Total Posts: 865
27 Feb 2014 06:20 PM
Hadn't thought about arbitrary cursor placement in the line of text. Without pixel spacing information on the text, I don't see anything other than an unreliable 'guessing' method using the x/y position and number of characters. Maybe you'll just have to sacrifice cursor placement and give them better ways to navigate the text to begin editing? (Give them buttons to hop down/up a line or right/left a word)
Report Abuse
wetrel is not online. wetrel
Joined: 19 Jun 2009
Total Posts: 919
27 Feb 2014 06:25 PM
Thank you, everyone, for the ideas.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image