It's the return of the chat prompter!

What's this white box on the control bar?
Now it says "type to chat" right in there when empty and unfocused.
My life is empty and unfocused, checking this in at 11:15 on friday night.
Things like this were tried in the past, and were always screwing up
and getting in the way of chatting or using the room. This is a skin,
not actual text, so it's more fuckup-proof.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@633 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Ray Greenwell
2008-08-16 06:14:41 +00:00
parent 754566d011
commit cbe1f76632
2 changed files with 16 additions and 0 deletions
+16
View File
@@ -20,6 +20,12 @@ public class ChatInput extends TextInput
{
styleName = "chatInput";
width = 147;
showPrompt(true);
}
protected function showPrompt (show :Boolean) :void
{
setStyle("backgroundImage", (show && ("" == text)) ? PROMPT : undefined);
}
override protected function focusInHandler (event :FocusEvent) :void
@@ -32,6 +38,16 @@ public class ChatInput extends TextInput
} finally {
textField.selectable = oldValue;
}
showPrompt(false);
}
override protected function focusOutHandler (event :FocusEvent) :void
{
super.focusOutHandler(event);
showPrompt(true);
}
[Embed(source="typetochat.png")]
protected static const PROMPT :Class;
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 830 B