- Home /
TextArea with Custom Image has no flashing indicator
Hey guys, been having an issue with some custom TextArea's that use an input image as the background. When I use the background image, the TextArea has no flashing line to indicate where you are in the textarea.
This is what it looks like idle,
And this is what it looks like active
This is the GUI code I'm using to generate the lines
if (appSystem.settings.guiId == 1) {
GUI.SetNextControlName("site-name");
appAccount.settings.siteName = GUI.TextArea(new Rect(20, 84, 280, 30), appAccount.settings.siteName, inputField);
GUI.SetNextControlName("user-name");
appAccount.settings.userName = GUI.TextArea(new Rect(20, 132, 280, 30), appAccount.settings.userName, inputField);
GUI.SetNextControlName("pass-word");
appAccount.settings.passWord = GUI.TextArea(new Rect(20, 182, 280, 30), appAccount.settings.passWord, inputField);
if (UnityEngine.Event.current.type == EventType.Repaint)
{
if (GUI.GetNameOfFocusedControl () == "site-name")
{
if (appAccount.settings.siteName == "Site Name") {
appAccount.settings.siteName = "";
}
} else {
if (appAccount.settings.siteName == "") {
appAccount.settings.siteName = "Site Name";
}
}
if (GUI.GetNameOfFocusedControl () == "user-name")
{
if (appAccount.settings.userName == "Username") {
appAccount.settings.userName = "";
}
} else {
if (appAccount.settings.userName == "") {
appAccount.settings.userName = "Username";
}
}
if (GUI.GetNameOfFocusedControl () == "pass-word")
{
if (appAccount.settings.passWord == "Password") {
appAccount.settings.passWord = "";
}
} else {
if (appAccount.settings.passWord == "") {
appAccount.settings.passWord = "Password";
}
}
}
Can anyone tell me what's going on?? I've also declared the flashing speed of the indicator with:
GUI.skin.settings.cursorFlashSpeed = 3;
So I have yet to figure this out, can anyone try to share some insight on the issue?
Your answer
Follow this Question
Related Questions
Disappearing text on Android devices 3 Answers
cursor.visible(false) not working on android TV 1 Answer
TouchScreenKeyboard not working with GUI.TextArea (tested with Android tablet) 0 Answers
Editable text field in Android with cursor 0 Answers
Access selected text or cursor position of TextArea in CustomEditor 0 Answers