From e14212f5b4ba164d5301aba93b7f64e4e9142aad Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Mon, 10 Nov 2008 20:16:44 +0000 Subject: [PATCH] Add a way to set the HTML text. Oh yeah, links don't work unless the field is selectable. WHY? Carbomb adobe. git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@691 ed5b42cb-e716-0410-a449-f6a68f950b19 --- src/as/com/threerings/flex/FlexUtil.as | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/as/com/threerings/flex/FlexUtil.as b/src/as/com/threerings/flex/FlexUtil.as index e8aeb337..c8dc4760 100644 --- a/src/as/com/threerings/flex/FlexUtil.as +++ b/src/as/com/threerings/flex/FlexUtil.as @@ -62,13 +62,21 @@ public class FlexUtil /** * Create an uneditable/unselectable multiline Text widget with the specified text and width. */ - public static function createText (text :String, width :int, style :String = null) :Text + public static function createText ( + text :String, width :int, style :String = null, html :Boolean = false) :Text { var t :Text = new Text(); t.styleName = style; t.width = width; - t.selectable = false; - t.text = text; + if (html) { + // I want selectable = false here too, but that makes links not work. They still + // have a hand cursor, you can still click the fucking things, but they don't + // work. WHY ADOBE WHY YOU RANCID PIEFUCKERS? + t.htmlText = text; + } else { + t.selectable = false; + t.text = text; + } return t; }