Skip to content

Instantly share code, notes, and snippets.

@larsiusprime
Created July 31, 2015 18:08
Show Gist options
  • Save larsiusprime/1dcda7cd53f9e7ecbee2 to your computer and use it in GitHub Desktop.
Save larsiusprime/1dcda7cd53f9e7ecbee2 to your computer and use it in GitHub Desktop.
Text regression reproduction case
package;
import openfl.display.Sprite;
import openfl.Lib;
import openfl.text.TextField;
import openfl.text.TextFieldAutoSize;
import openfl.text.TextFormat;
import openfl.text.TextFormatAlign;
class Main extends Sprite {
public function new () {
super ();
Lib.current.stage.color = 0xA0A0A0;
var textField = new TextField();
textField.defaultTextFormat = new TextFormat(null, 24, 0x000000, null, null, null, null, null, TextFormatAlign.CENTER, null, null, null, 20);
textField.selectable = false;
textField.border = true;
textField.borderColor = 0x000000;
textField.width = 700;
textField.multiline = true;
textField.wordWrap = true;
textField.autoSize = TextFieldAutoSize.NONE;
textField.x = 50;
textField.y = 50;
textField.text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
addChild (textField);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment