I have been working on the user interface side of the project for a chance and made some nice progress. Damage counters aren’t moving in constant speed anymore, but bouncing up similar to how they work in Final Fantasy. Another addition is the new inventory window, which looks nice, but doesn’t do anything yet.
Last addition this week is Qt resource system. Previously I was managing locating and loading icons manually. Most of the graphics still use that system (and probably will always do so), but user interface is now using resource system of Qt. UI icons are packaged into a single file, where they can be easily loaded from anywhere in the application:
self.necklace_slot = ItemGlyph(None, surface_manager, self, QPixmap(':necklace.png'))
ItemGlyph is a class I wrote by myself, but the interesting part is loading necklace.png from inside resource file. QFile (which QPixmap uses to load the file) automatically detects the colon in the beginning and will load the file from resource file, instead from filesystem. Advantage of this is that I don’t have to package dozens and dozens of icon files anymore when I release the game.
There’s couple youtube videos behind the cut. Quality is somewhat choppy, I haven’t yet figured out how to record smooth video. But you’ll get the basic idea.