Question by
decay · Aug 01, 2016 at 03:40 PM ·
javascriptguiwindowtextfield
Are TextFields in GUI.window generally uneditable?
function playerNameWindow()
{
var Hinweis : String = "Bitte gib Deinen Namen ein:";
var links: int;
var textSize: Vector2 = GUI.skin.label.CalcSize(GUIContent(Hinweis));
links = (FensterPos.width - textSize.x) / 2;
GUI.Label(Rect(links, 25, 200, 20), Hinweis);
links = (FensterPos.width - 100) /2;
playerName = GUI.TextField(Rect(links, 50, 100, 20), playerName);
}
function OnGUI() {
if (nameGiven == false){
FensterPos = GUI.Window(0, Rect((Screen.width /2) - 150, (Screen.height / 2) - 150, 300, 100), playerNameWindow, "Bevor es los geht...");
}
}
leads to a nice Window with a Textfield an a blinking line, but i cannot enter text as long as the TextField stays inside the window.
Comment