Load GUI from XML

This commit is contained in:
2015-03-10 00:48:25 +01:00
parent 9d7dd452c7
commit 884fd8bb52
21 changed files with 1019 additions and 119 deletions

View File

@@ -141,14 +141,21 @@ enum class VAFormats {
// Some helpers to C++11-ify SDL
struct SDLSurfaceDeleter {
void operator()(SDL_Surface* ptr) const
{
void operator()(SDL_Surface* ptr) const {
SDL_FreeSurface(ptr);
}
};
using SDLSurfaceUPtr = std::unique_ptr<SDL_Surface, SDLSurfaceDeleter>;
struct TTFFontDeleter {
void operator()(TTF_Font* font) const {
TTF_CloseFont(font);
}
};
using TTFFontUPtr = std::unique_ptr<TTF_Font, TTFFontDeleter>;
class SDLSurfaceScopedLock {
public:
SDLSurfaceScopedLock(SDL_Surface *surf) : surf_(surf) {