diff --git a/src/gui/graphics.cpp b/src/gui/graphics.cpp index d1a717093..ea06a6e4f 100644 --- a/src/gui/graphics.cpp +++ b/src/gui/graphics.cpp @@ -124,3 +124,16 @@ gfx::Size Graphics::measureString(const std::string& str) return gfx::Size(ji_font_text_len(m_currentFont, str.c_str()), text_height(m_currentFont)); } + +////////////////////////////////////////////////////////////////////// +// ScreenGraphics + +ScreenGraphics::ScreenGraphics() + : Graphics(screen, 0, 0) +{ + setFont(font); // Allegro default font +} + +ScreenGraphics::~ScreenGraphics() +{ +} diff --git a/src/gui/graphics.h b/src/gui/graphics.h index 262f94216..fd574d395 100644 --- a/src/gui/graphics.h +++ b/src/gui/graphics.h @@ -55,6 +55,14 @@ private: FONT* m_currentFont; }; +// Class to draw directly in the screen. +class ScreenGraphics : public Graphics +{ +public: + ScreenGraphics(); + virtual ~ScreenGraphics(); +}; + // Class to temporary set the Graphics' clip region to a sub-rectangle // (in the life-time of the IntersectClip instance). class IntersectClip