And another random question⌠are the values you are passing to the TextFields nulls or empty strings or actual values? Like, what is settings.getUsername().
I donât know if it canât handle null⌠if so itâs a bug. But thatâs why I asked.
âŚtrying to trouble shoot without the time to actual test it.
Donât worry I only have time to develop further in between compile pauses (20 min + ) and similar XD
I now forced non null values and they appear to work somewhat now:
(Note I removed the prefered size for the ui, and instead just give the statuslabel a prefered size,so the rest layouts itself, looks way better in my opinion.)
The text no appears correctly and it is editable.
However I see no cursor (if there even is one) and no border.
Do you maybee have somewhere a picture/application which contains a textfield with the default groovy based styling, so that I can compare where things go different?
I figured out what the issue is with the missing cursor. As soon as I tried to have a text field in my glass style I saw the same issue. I actually donât know why I donât have the problem with other styles but anywayâŚ
The issue is that BitmapText by default has an alpha of -1 (indicating that no special alpha has been set). TextEntryComponent inside Lemur grabs the alpha of the BitmapText (along with the color) to set the color of the cursor. The fix is easy as I now just detect that and set cursor alpha to 1.
Longer term, the cursor parameters should probably by stylable properties and this wouldnât be an issue because then cursor alpha would be tracked with cursor color.
Until I make a 1.8.2 release, you might be able to work around it by making sure your text colors have alpha. (Or really all of your components if you set the alpha on the root panel.)
Maybe I donât hit it because my panels with edit fields are fade-animated. (shrug)
I have ran into this issue with the textfield having focus and cursor not showing.
I find that if I have a period as the second char (0. for example), after typing the third char (0.0), the cursor will disappear and then reappear on the 4th char.
If the third char is a period (00.) then the cursor will disappear as soon as the period is typed, reappearing on 4th char again.
Using a standard, no frills textfield or any for that matter.
Edit: Doesnât do it when broken out into a test so I must of screwed up something somewhere. Never MindâŚ
If your no frills test was using a different font then make sure your font is ok. Maybe it has some really weird offset for the â.â character or something.
I ran a different font and same results except when the font disappears shifts slightly.
At size 13 or larger it seems ok but I am not sure as it may just be pushed off further before it happens.
Another mystery for me is how you get your font to be so crisp and clear. Mine all suck at any dimension when using the sdk to build them.
Edit: GuiGlobals shows its the default font.
Edit: Ran it with Console.fnt and same results. Worse actually, even letter and numbers, any size, cause it to happen and it happens frequently.
I just think itâs weird that 12 seems to be some kind of hinge point. There was a commit someone did to âfixâ BitmapText to only draw on full units that I had reverted (99% sure) or never merged because it would have way broken bitmap text. But things like this make me think of that.