haxeui / haxeui-core

The core library of the HaxeUI framework
http://haxeui.org
MIT License
345 stars 71 forks source link

Label display missing text if contains \n #391

Closed hypergeome closed 3 years ago

hypergeome commented 3 years ago

When we set text for label that contains \n, the last line wont be displayed

Expected Behavior

When setting text for label that contains \n, all lines should be displayed.

Current Behavior

When we set text for label that contains \n, the last line wont be displayed

Possible Solution

Steps to Reproduce (for bugs)

1. 2. 3. 4.

Media

Test app / minimal test case

Context

Your Environment

Gulvan0 commented 3 years ago

@ianharrigan As far as I know, the problem is that label does display only the text on the first line, but not the others. This applies to both the usage of a newline symbol (the case described above) AND just an automatic word wrapping.

This is broken since 1.2.0.

This also affects Dialogs.

I think this is a critical bug

ianharrigan commented 3 years ago

Hmm, missed this somehow... Have you tried git versions? Still an issue there?

ianharrigan commented 3 years ago

Also, what backend is this etc?

Gulvan0 commented 3 years ago

Hmm, missed this somehow... Have you tried git versions? Still an issue there?

Also, what backend is this etc?

Ah, sorry, I forgot to add these details.

Yeah, so my version is git and my backend is haxeui-openfl.

ianharrigan commented 3 years ago

This looks to be openfl related, im going to work around in for now in haxeui-openfl, but ive also opened an issue here: https://github.com/openfl/openfl/issues/2499

Gulvan0 commented 3 years ago

This looks to be openfl related, im going to work around in for now in haxeui-openfl, but ive also opened an issue here: openfl/openfl#2499

Thank you very much!

ianharrigan commented 3 years ago

OK, that should be "fixed" now (just worked around it for now, but hopefully openfl will fix the underlying issue)

image

Gulvan0 commented 3 years ago

OK, that should be "fixed" now (just worked around it for now, but hopefully openfl will fix the underlying issue)

image

Yay, this has definitely been fixed, both for labels and for dialogs. Thanks a lot! Should we close this (as this is the openfl-only issue now)?

ianharrigan commented 3 years ago

Yeah, might as well close this... the workaround isnt awful, and if / when openfl fixes it we can just remove the `+1'