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
This commit is contained in:
Ray Greenwell
2008-11-10 20:16:44 +00:00
parent dcfc762d1f
commit e14212f5b4
+11 -3
View File
@@ -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;
}