How To input text from a button?
Hi, I am trying to make a Button to move a letter into a blank Field ( or InputField) when pressed and delete the button. Secondly, I want the blank field to be a button so when I click on it, it acts like a backspace and moves the letter back to its original position ( button ).
Answer by Tespy · Feb 03, 2017 at 05:01 PM
First, I’d have it so that the buttons get deactivated instead of deleted. Then, I’d have the blank field keep a record of which letters belong to which buttons. I’d have it be a List of game objects, ordered in the same order their letters are put into the blank field.
When the blank field is clicked, it reactivates the last button in its cache, gives it back its letter (which would be at the end of the blank field’s text property), removes the button from the cache, and removes the last letter from its text property.
Your answer
Follow this Question
Related Questions
Best way to handle multiple buttons? (C#) 3 Answers
[resolved] How do I deactivate a button once its height is < 40 in c# 0 Answers
Is there a way to detect if a button is pressed if it isn't created programatically? 2 Answers
Button mouseover only works when other canvas is active 0 Answers
Instantiated Buttons to have separate On-click functions 0 Answers