Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlxInputText background bug when text is empty #47

Closed
kevinresol opened this issue Mar 26, 2014 · 10 comments
Closed

FlxInputText background bug when text is empty #47

kevinresol opened this issue Mar 26, 2014 · 10 comments

Comments

@kevinresol
Copy link
Contributor

With text:
with_text

Empty text:
without_text

@gamedevsam
Copy link
Contributor

Putting a space in there should probably fix this issue...

@kevinresol
Copy link
Contributor Author

This is an input for user and caused bad user experience.
I suggest adding a minHeight property to FlxText and honor that in regenGraphics()

@gamedevsam
Copy link
Contributor

Put a text, refresh the height, and set text back to "" :-P

Just kidding this is a bug and needs to be fixed...

@larsiusprime
Copy link
Member

Yeah, I should fix this.

On Tue, Mar 25, 2014 at 11:09 PM, Samuel Batista
notifications@github.comwrote:

Put a text, refresh the height, and set text back to "" :-P

Reply to this email directly or view it on GitHubhttps://github.com//issues/47#issuecomment-38648326
.

www.fortressofdoors.com -- Games, Art, Design

@kevinresol
Copy link
Contributor Author

This is a temp fix for me

FlxText:

private function regenGraphics():Void
    {
        //...

        // Account for 2px gutter on top and bottom (that's why there is "+ 4")
        var newHeight:Float = _textField.textHeight + _heightInc + 4;
        if (newHeight < size + 6) newHeight = size + 6; //fix empty text height

        //...
    }

@Gama11
Copy link
Member

Gama11 commented Mar 26, 2014

This is actuallly not a bug with flixel-ui, but flixel / FlxText itself. If you look at the text height of an empty text, it's incorrect / different from the usual text height. This only seems to happen on flash.

@larsiusprime
Copy link
Member

So should we close this and redirect to the bug in FlxText?

@Gama11
Copy link
Member

Gama11 commented Jun 24, 2014

Didn't we fix this here? HaxeFlixel/flixel@cda9a70

@larsiusprime
Copy link
Member

Yeah pretty sure we did.

@larsiusprime
Copy link
Member

I'm going to close this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants