New Editor: UI Widgets
Hey all! Hope everyone had a good weekend!
Work still continues on the encounter editor. At the end of last week, I was able to get the node map displaying, along with pan and zoom controls.
Resuming work today started out frustratingly slow, but I made a lot of progress towards the end of the day. Early on, I was having some issues getting the user input to register correctly (important for editing text in the encounters, among other things). However, it turns out the version of Haxe NME that I was using was slightly out of date.
Updating that seemed to fix most issues with keyboard input, and I was able to start working on UI items:
If you look carefully, you'll notice that each colored arrow now has a gray button on it. Haxe NME mas minimal UI widgets out of the box (it's geared more towards games than form-style applications), so there's a bit of groundwork that I need to do before the editor is usable.
Buttons with text labels were my first task. I use these quite a bit, for adding/removing arrows, enabling/disabling encounter flags, etc. So it made sense to start with those.
After a few hours of work, I had buttons working, and had them setup to connect and disconnect nodes, and was also able to drag nodes around, with arrows updating in real time. So far, so good!
I also spent a few hours working on drop-down boxes (a.k.a. combo boxes, list boxes, etc.). This was another UI widget the editor uses everywhere. For example, I use them when choosing which item is associated with an arrow connecting encounters, which image to use in an encounter, and a few other important cases.
The jagged column of gray bricks that you see above is a quick and dirty drop-down I hacked together, expanded after being clicked on. It's not as fancy nor robust as a typical OS drop-down box, but it gets the job done. Tomorrow, I'm going to attach it to the colored arrows, so I can edit which game item each arrow represents.
As I said before, it's a bit slow to start, but progress is picking up pace. Every day I work on this Haxe NME port of the editor, I'm tempted to give up and retreat to Flash. But every time, I have a breakthrough that emboldens me again, giving me hope that this is a worthwhile conversion.
Perhaps most convincingly of all, the editor continues to load and run orders of magnitude faster than its Flash counterpart. Granted, the widgets are not all in place yet, but I think it will continue to outperform Flash even once they're in.
And that speed is critical. The old editor was getting quite slow before I added the recent batch of encounters. Slow enough that I avoided using it, which is always a bad sign for a tool. And that was before the new encounter data crushed it, causing it to crash on load.
So I think we're still moving in the right direction. An investment in time and development now should pay off in the future. Plus, I'm actually looking forward to continuing work on it tomorrow, and that's unusual for tools development!