aboutsummaryrefslogtreecommitdiff
path: root/gui/InterfaceManager.h
diff options
context:
space:
mode:
authorVicent Marti2008-06-09 21:16:26 +0000
committerVicent Marti2008-06-09 21:16:26 +0000
commitda757aa2ca1c086ae2f123dc6636d17655b512c7 (patch)
tree38cd17dc5c9d3cf964b68d099e025742df41f5bf /gui/InterfaceManager.h
parent69694c72f658cedde9a03235ccdaf20982b3980f (diff)
downloadscummvm-rg350-da757aa2ca1c086ae2f123dc6636d17655b512c7.tar.gz
scummvm-rg350-da757aa2ca1c086ae2f123dc6636d17655b512c7.tar.bz2
scummvm-rg350-da757aa2ca1c086ae2f123dc6636d17655b512c7.zip
InterfaceManager is now a singleton
svn-id: r32640
Diffstat (limited to 'gui/InterfaceManager.h')
-rw-r--r--gui/InterfaceManager.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/gui/InterfaceManager.h b/gui/InterfaceManager.h
index c7e96103c0..ff8eee3de0 100644
--- a/gui/InterfaceManager.h
+++ b/gui/InterfaceManager.h
@@ -37,10 +37,14 @@
namespace GUI {
+#define g_InterfaceManager (GUI::InterfaceManager::instance())
+
struct WidgetDrawData;
class InterfaceManager;
-class InterfaceManager {
+class InterfaceManager : public Common::Singleton<InterfaceManager> {
+
+ friend class Common::Singleton<SingletonBaseType>;
public:
enum Graphics_Mode {
@@ -107,12 +111,15 @@ public:
kTextAlignRight //! Text should be aligned to the right
};
+ //! Function used to process areas other than the current dialog
+ enum ShadingStyle {
+ kShadingNone, //! No special post processing
+ kShadingDim, //! Dimming unused areas
+ kShadingLuminance //! Converting colors to luminance for unused areas
+ };
- InterfaceManager(OSystem *system, Graphics_Mode mode) : _vectorRenderer(0),
- _system(system), _graphicsMode(kGfxDisabled), _screen(0), _bytesPerPixel(0) {
- setGraphicsMode(mode);
- }
+ InterfaceManager();
~InterfaceManager() {
freeRenderer();
@@ -121,7 +128,9 @@ public:
void setGraphicsMode(Graphics_Mode mode);
int runGUI();
- void init();
+
+ bool init();
+ bool deinit();
/** Font management */
const Graphics::Font *getFont(FontStyle font) const { return _font; }