- Main Page
- Classes
- Files

- File List

# dimmedscreen.h

    00001 #ifndef _DIMMED_SCREEN_H_
    00002 #define _DIMMED_SCREEN_H_
    00003
    00004 #include "screen.h"
    00005 #include "graphicsport.h"
    00006 #include "woopsi.h"
    00007
    00008 namespace WoopsiUI {
    00009
    00024         class DimmedScreen : public Screen {
    00025         public:
    00026
    00030                 DimmedScreen() : Screen("", 0) { };
    00031
    00032         protected:
    00033
    00040                 virtual void drawContents(GraphicsPort* port) {
    00041
    00042                         Rect rect;
    00043                         port->getClipRect(rect);
    00044
    00045                         // Erase the gadget, thus redrawing everything underneath it
    00046                         _flags.erased = false;
    00047                         disableDrawing();
    00048                         woopsiApplication->eraseRect(rect);
    00049                         enableDrawing();
    00050                         _flags.erased = false;
    00051
    00052                         // Dim the screen
    00053                         port->dim(rect.x, rect.y, rect.width, rect.height);
    00054                 };
    00055
    00059                 virtual inline ~DimmedScreen() { };
    00060
    00064                 inline DimmedScreen(const DimmedScreen& dimmedScreen) : Screen(dimmedScreen) { };
    00065         };
    00066 }
    00067
    00068 #endif