HaxeFlixel / flixel-ui

GUI library for HaxeFlixel
171 stars 63 forks source link

Game crashing because of Invalid FlxDrawItem when using FlxInputText #283

Closed Arolox666 closed 1 month ago

Arolox666 commented 1 month ago

I was trying to make an username input text box but when I compiled the game it said this Screenshot 2024-09-26 194257 Here is the code of how initialized the InputText

        var userNameTextBox = new FlxInputText(367, 272, 1200, "Enter Username... (Max 40 Characters)", 48, 0xff000000, 0xffffff, true);
        userNameTextBox.font = "Arial";
        userNameTextBox.maxLength = 40;
        userNameTextBox.focusGained = () -> userNameTextBox.text = "";
        add(userNameTextBox);

P.S.: I tried using FlxUIInputText but the same thing happened.

Geokureli commented 1 month ago

A new FlxInputText is coming the core flixel in the next update, feel free to use

haxelib git flixel https://github.com/HaxeFlixel/flixel.git

To use the next release early, I'll look into this issue, though

Arolox666 commented 1 month ago

A new FlxInputText is coming the core flixel in the next update, feel free to use

haxelib git flixel https://github.com/HaxeFlixel/flixel.git

To use the next release early, I'll look into this issue, though

I tried to use the git but there is no FlxInputText in normal flixel imports.

Geokureli commented 1 month ago

I tried to use the git but there is no FlxInputText in normal flixel imports.

https://github.com/HaxeFlixel/flixel/blob/dev/flixel/text/FlxInputText.hx

Arolox666 commented 1 month ago

I tried to use the git but there is no FlxInputText in normal flixel imports.

https://github.com/HaxeFlixel/flixel/blob/dev/flixel/text/FlxInputText.hx

Oh sorry I'm just stupid and VS Code didn't detect that it exists