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:
@@ -62,13 +62,21 @@ public class FlexUtil
|
|||||||
/**
|
/**
|
||||||
* Create an uneditable/unselectable multiline Text widget with the specified text and width.
|
* 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();
|
var t :Text = new Text();
|
||||||
t.styleName = style;
|
t.styleName = style;
|
||||||
t.width = width;
|
t.width = width;
|
||||||
t.selectable = false;
|
if (html) {
|
||||||
t.text = text;
|
// 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;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user