Precarious Footholds

I keep a running devlog in my project folder. It reads like a terse transcript of everything I did that day. Usually, it's a few lines long, highlighting the features I've added, or the bugs I've fixed. The changelogs you see with each new build are usually lightly-edited versions of that devlog, minus notes to self that aren't meant for the public (e.g. installed software X, emailed contractor Y, etc.).

Today's devlog was 28 lines long. And I didn't really get much "done." I did learn quite a bit, though.

Basically, today's work amounted to digging into code for textfields in multiple UI libraries, as well as the generic OpenFL textfield. And with slight variations, what I'm discovering is that each has issues with multi-line input text. Since much of the data in my games is multi-line (e.g. descriptions of in-game things like items, creatures, interactions, etc.), this is a problem.

HaxeUI has some nice UI stuff, but I had to hack the code to force it to use OpenFL "next," which has some improvements to TextField (such as exposing the selected index on non-Flash targets). It has almost everything working, but as soon as I try to highligh across multiple lines, I get a crash.

StableXUI was my next try, and like HaxeUI, has some handy widgets. It was also way easier to implement. Unfortunately, the multi-line support seems missing here, too. I can sort of hack it to accept multi-line input, but the highlighting of text across lines is wonky. (Doesn't crash, though.)

Finally, the vanilla OpenFL TextField seems to be the most stable, but also requires some hacking to accept line breaks. The good news is that highlighting seems to work across lines. So I may look into extending this to see if it works tomorrow.

While I got little more done today than yesterday, I did learn a lot about haxelibs. I figured out how haxelib dependencies worked, how to force which versions of libs to use, switching from "legacy" to "next," and even how to modify libs to work differently. That last bit is one of the major benefits of an open-source platform: I can just get in there and muck around if I need something that the off-the-shelf thing doesn't have.

The down side, of course, is spotty features and instability.

Anyway, I at least made some progress today in terms of understanding what's going on. And most importantly, I have some hope restored and some direction for tomorrow's work. Still no "silver bullet," but I have some footholds to stop my sliding downhill into despair :)


matsy's picture

I would have thought HaxeUI would of been the dream as they have a notepad-esk example!

dcfedor's picture

So did I! Unfortunately, I seem to hit a wall whenever trying to edit text in a multiline field on neko/Windows.

However, I see that he has source published for that Haxe Pad demo, and it's supposed to work in Windows/Neko. So I'll check that out, thanks!

Dan Fedor - Founder, Blue Bottle Games