Times, trials, and turbulence.
More progress on Battleforge, which is getting nearer and nearer to completion.
The “Map Properties” dialog is now completed, which allows you edit several trivial (at the moment) fields, and two important ones (width and height). As you can see in the screenshot below, this involved the implementation of the ValueSpinner component, which will hopefully be the last one I need to write for a while. 🙂
I’ve also had to implement a handfull of helper functions for the UI work, such as centreXComponents(), which accepts a variable number of Component objects and a pixel value for padding, which it arranges them with aforementioned padding in order, centred. Not particularly hard work, but it’s the small things that add up at the end of the day.
Also out of the way is the generic “YesNoDialog”, which is a simple dialog window that presents the user with somesort of question that can be answered ‘yes’ or ‘no’ to, and uses Java’s [weird] anonymous classes to embed the functionality right into the code. These are hugely useful for confirmation when map data is at risk, such as when clearing the map, closing the editor, or loading in a new map. It’ll be a huge boon for in-game menus that oftentimes require confirmation, as well.
Only file I/O work remains, which entails: saving, loading, and the generation of the mini-map for the game to use. The map format for the Alpha version will probably be a simple binary format, although I intend on looking to some compression and/or encryption libraries in the future. Barring any spontaneous motivation drops, the editor should be ready to go in another week, at the most. 🙂