Playmaker Help & Tips > Playmaker Help

Need help creating custom keyboard [SOLVED]

(1/3) > >>

I'm building a custom keyboard for my android application. Any ideas how to go about building a string from letter inputs in playmaker?

If this has already been asked, I'm sorry. I've searched for a while now and haven't come across anything. Any help is greatly appreciated. Thanks.

Since its for your android, won't your letters be just a gui element with a location on the screen?  I'de recommend taking a look at the actions under the "device" tab in the playmaker action editor, maybe GetTouchInfo, TouchEvent, or TouchGUIEvent.  Also if you need it, you can convert floats, ints, and bools to strings with the actions listed under the "Convert" tab in the playmaker action editor.  Not sure if this helps you. Good Luck.

Yeah, actually building the keyboard is not the problem. I can't figure out how to make a text field that will allow me to type in it. I can press a button (lets say "U"), set a variable equal to U and display that variable via 3Dtext on the screen. Now I press "N" and need to change that variable to U+N. Same with I, T and Y. So, my variable should look something like varU+varN+varI+varT+varY and then my text should read UNITY.

I am still new to Playmaker to be honest but I did something similar in Playmaker using the String Builder action and specifying I want only 2 variables involved.

How about creating two variables var1 and var2 and when the keyboard is pressed you add the letter to var1 and then add it into var2 and then when the keyboard is hit again you replace var1 with the new press and then add the new press to var2, it would go like this:
Var1 = ""
Var2 = Var2 + Var1
Player presses the letter "U" you add that to Var1, then add Var1 to the empty Var2 so Var2 is now U. Then when the player presses the letter "N" you replace the U with N in Var1 and then add the N to the U in Var2.

I think it might work am not sure, maybe someone has more knowledge can shed some light on that.

Vallar.....You're a genius. Thanks. Got it up and running like you suggested.

Only problem now is backspace. :/ Any Ideas?

Only thing I can think of is:

Set one variable for each letter - lets say max input is 10 characters so you need 10 variables
Have a string builder build a string from all the variables - var1, var2, var3.......var10
Then every time you touch a button you set the next consecutive var and increase an int variable by one
Now for backspace, you would have logic that says: if backspace is pressed, get int value. if int = 1, set var1 equal to nothing. if int = 2, set var equal to nothing.....etc

Hope that makes sense.


[0] Message Index

[#] Next page

Go to full version