- Home /
Question by
Skylermaki · Aug 22, 2013 at 05:24 PM ·
guibuttontextfield
GUI.Textfield backspace control + Button Style problem
Hi, i've made a system of button input like the Windows calculator. I don't know how to setup the backspace when pushing the button.
if(GUI.Button(Rect (xdist+25+5, yoffset+21+ydist+21+ydist+21+ydist, 55, 21), "All", "All")){
stringToEdit = itemQuantity.ToString();
UI.click = true;
}
GUI.Label(Rect (xdist+25+5+20, yoffset+21+ydist+21+ydist+21+ydist+2, 50, 50), "All");
if(GUI.Button(Rect (xdist+25+5+25+5+25+5, yoffset, 26, 50), "B/S", "Lateral")){
//here, i would like to put the backspace function
UI.click = true;
}
GUI.Label(Rect (xdist+25+5+25+5+25+5+2, yoffset+17, 26, 50), "B/S");
if(GUI.Button(Rect (xdist+25+5+25+5+25+5, yoffset+21+ydist+21+ydist, 26, 50), "C", "Lateral")){
stringToEdit = "0";
UI.click = true;
}
GUI.Label(Rect (xdist+25+5+25+5+25+5+8, yoffset+21+ydist+21+ydist+17, 26, 50), "C");
Then, i have an other problem. The button text function works only with the default button style. When i create a custom style, i setup it exactly like the default one, but no text seems to appear in my buttons.
If you have any idea, thanks.
Comment
Your answer
Follow this Question
Related Questions
textfield and button submit 1 Answer
Using GUI Button to activate script instances 1 Answer
C# Why Won't My GUI Layout Button Appear? 1 Answer
Unity GUI multiple grids? 0 Answers
when button pressed, textfield appears 3 Answers