diff options
Diffstat (limited to 'engines/wage/gui.h')
-rw-r--r-- | engines/wage/gui.h | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/engines/wage/gui.h b/engines/wage/gui.h index 48ec41c30a..dc3a593bda 100644 --- a/engines/wage/gui.h +++ b/engines/wage/gui.h @@ -51,18 +51,16 @@ #include "common/str-array.h" #include "graphics/font.h" #include "graphics/fontman.h" -#include "graphics/surface.h" +#include "graphics/managed_surface.h" #include "common/rect.h" +#include "wage/macwindow.h" +#include "wage/macwindowmanager.h" + namespace Wage { class Menu; -enum WindowType { - kWindowScene, - kWindowConsole -}; - enum { kMenuHeight = 20, kMenuLeftMargin = 7, @@ -71,7 +69,6 @@ enum { kMenuDropdownPadding = 14, kMenuDropdownItemHeight = 16, kMenuItemHeight = 20, - kBorderWidth = 17, kDesktopArc = 7, kComponentsPadding = 10, kCursorHeight = 12 @@ -84,13 +81,6 @@ enum { kPatternCheckers2 = 4 }; -enum { - kBorderNone = 0, - kBorderScrollUp, - kBorderScrollDown, - kBorderCloseButton -}; - class Gui { public: Gui(WageEngine *engine); @@ -120,16 +110,18 @@ public: void disableAllMenus(); void enableNewGameMenus(); + bool builtInFonts() { return _builtInFonts; } + private: void drawScene(); void drawConsole(); void undrawCursor(); void drawDesktop(); - void paintBorder(Graphics::Surface *g, Common::Rect &r, WindowType windowType, int highlightedPart = kBorderNone, + void paintBorder(Graphics::ManagedSurface *g, Common::Rect &r, WindowType windowType, int highlightedPart = kBorderNone, float scrollPos = 0.0, float scrollSize = 0.0); - void renderConsole(Graphics::Surface *g, Common::Rect &r); - void drawBox(Graphics::Surface *g, int x, int y, int w, int h); - void fillRect(Graphics::Surface *g, int x, int y, int w, int h, int color = kColorBlack); + void renderConsole(Graphics::ManagedSurface *g, const Common::Rect &r); + void drawBox(Graphics::ManagedSurface *g, int x, int y, int w, int h); + void fillRect(Graphics::ManagedSurface *g, int x, int y, int w, int h, int color = kColorBlack); void loadFonts(); void flowText(Common::String &str); const Graphics::Font *getConsoleFont(); @@ -140,7 +132,7 @@ private: void updateTextSelection(int x, int y); public: - Graphics::Surface _screen; + Graphics::ManagedSurface _screen; int _cursorX, _cursorY; bool _cursorState; Common::Rect _consoleTextArea; @@ -157,7 +149,7 @@ public: bool _menuDirty; private: - Graphics::Surface _console; + Graphics::ManagedSurface _console; Menu *_menu; Scene *_scene; bool _sceneDirty; @@ -185,6 +177,10 @@ private: Common::String _undobuffer; int _inputTextLineNum; + + MacWindowManager _wm; + int _sceneWindowId; + int _consoleWindowId; }; } // End of namespace Wage |