Open piboistudios opened 6 years ago
What target? Looks like html5? Can you post a reproduction sample? (Your xml markup for instance?)
Yeah, here's the markup:
<?xml version="1.0" encoding="utf-8" ?>
<data><include name="00definitions"/>
<chrome use_def="chrome" group="ui_fatboi" width="640" height="72" y="72" center_x="true" id="head"></chrome>
<text size="48" color="#aba521" shadow="#222222" border_quality="1.0" text="Create Your Destiny" width="head.width-6" align="center">
<anchor y="head.top + 80" y-flush="top" x-flush="left"></anchor>
</text>
<chrome use_def="chrome" group="ui_fatboi" width="head.width" height="512" y="head.bottom+8" x="head.left" id="body1"></chrome>
<chrome use_def="chrome" group="ui_fatboi" width="body1.width-48" height="body1.height/2" y="body1.top+48" id="general" x="body1.left+32"></chrome>
<text shadow="#222222" color="#cddfaa" id="general_title" size="32" text="General - " width="general.width">
<anchor y="general.top-48" x="general.left+24"></anchor>
</text>
<region group="ui_fatboi" width="general.width/2" height="general.height" id="general_col1">
<anchor x="general.left" x-flush="left" y="general.top" y-flush="top"></anchor>
</region>
<text group="ui_fatboi" text="Name" anchor="center" size="24" x="general_col1.left+16" y="general_col1.top+12" id="name_label"></text>
<input_text group="ui_fatboi" width="general_col1.width/2" id="name_input" height="24" color="#dddddd" background="#ffffff">
<anchor x="name_label.right+16" x-flush="left" y="name_label.top" y-flush="top"></anchor>
</input_text>
<input_text group="ui_fatboi" width="general_col1.width" id="family_label" height="24" color="#dddddd" background="#ffffff">
<anchor x="general_col1.left" y="name_label.bottom+4"></anchor>
</input_text>
</data>
Both input texts seem to work fine without a background color, but they don't render a UI sprite.
package;
import flixel.FlxState;
import flixel.addons.ui.FlxInputText;
class PlayState extends FlxState
{
override public function create():Void
{
var tf:FlxInputText = new FlxInputText(50, 100, 300);
tf.borderColor = 0xFFFFFFFF;
tf.x = 50;
tf.y = 200;
tf.width = 300;
tf.height = 15;
tf.caretWidth = 5;
tf.callback = speakUp;
add(tf);
}
}
When providing a background color for FlxInputText widgets via an XML generated FlxUI the game crashes with this error: