diff --git a/src/as/com/threerings/flex/ChatInput.as b/src/as/com/threerings/flex/ChatInput.as index 5d2442cb..4749b975 100644 --- a/src/as/com/threerings/flex/ChatInput.as +++ b/src/as/com/threerings/flex/ChatInput.as @@ -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; } } diff --git a/src/as/com/threerings/flex/typetochat.png b/src/as/com/threerings/flex/typetochat.png new file mode 100644 index 00000000..f1774626 Binary files /dev/null and b/src/as/com/threerings/flex/typetochat.png differ