diff options
Diffstat (limited to 'engines/wage/gui.h')
-rw-r--r-- | engines/wage/gui.h | 60 |
1 files changed, 15 insertions, 45 deletions
diff --git a/engines/wage/gui.h b/engines/wage/gui.h index dc3a593bda..ba1bb5ef3b 100644 --- a/engines/wage/gui.h +++ b/engines/wage/gui.h @@ -50,8 +50,8 @@ #include "common/str-array.h" #include "graphics/font.h" -#include "graphics/fontman.h" #include "graphics/managed_surface.h" +#include "common/events.h" #include "common/rect.h" #include "wage/macwindow.h" @@ -60,27 +60,13 @@ namespace Wage { class Menu; +class Scene; +class WageEngine; enum { - kMenuHeight = 20, - kMenuLeftMargin = 7, - kMenuSpacing = 13, - kMenuPadding = 16, - kMenuDropdownPadding = 14, - kMenuDropdownItemHeight = 16, - kMenuItemHeight = 20, - kDesktopArc = 7, - kComponentsPadding = 10, kCursorHeight = 12 }; -enum { - kPatternSolid = 1, - kPatternStripes = 2, - kPatternCheckers = 3, - kPatternCheckers2 = 4 -}; - class Gui { public: Gui(WageEngine *engine); @@ -89,17 +75,12 @@ public: void draw(); void appendText(const char *str); void clearOutput(); - void mouseMove(int x, int y); - void mouseDown(int x, int y); - Designed *mouseUp(int x, int y); + bool processEvent(Common::Event &event); + void drawInput(); void setSceneDirty() { _sceneDirty = true; } - const Graphics::Font *getFont(const char *name, Graphics::FontManager::FontUsage fallback); void regenCommandsMenu(); void regenWeaponsMenu(); - void processMenuShortCut(byte flags, uint16 ascii); - void pushArrowCursor(); - void popCursor(); void actionCopy(); void actionPaste(); @@ -110,19 +91,15 @@ public: void disableAllMenus(); void enableNewGameMenus(); - bool builtInFonts() { return _builtInFonts; } + bool processSceneEvents(WindowClick click, Common::Event &event); + bool processConsoleEvents(WindowClick click, Common::Event &event); + void executeMenuCommand(int action, Common::String &text); private: void drawScene(); void drawConsole(); void undrawCursor(); - void drawDesktop(); - void paintBorder(Graphics::ManagedSurface *g, Common::Rect &r, WindowType windowType, int highlightedPart = kBorderNone, - float scrollPos = 0.0, float scrollSize = 0.0); 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(); const Graphics::Font *getTitleFont(); @@ -135,26 +112,24 @@ public: Graphics::ManagedSurface _screen; int _cursorX, _cursorY; bool _cursorState; - Common::Rect _consoleTextArea; - bool _builtInFonts; WageEngine *_engine; - Patterns _patterns; - bool _cursorDirty; Common::Rect _cursorRect; bool _cursorOff; - bool _menuDirty; + Scene *_scene; + + MacWindowManager _wm; + MacWindow *_sceneWindow; + MacWindow *_consoleWindow; private: Graphics::ManagedSurface _console; Menu *_menu; - Scene *_scene; bool _sceneDirty; bool _consoleDirty; - bool _bordersDirty; Common::StringArray _out; Common::StringArray _lines; @@ -163,10 +138,6 @@ private: uint _consoleNumLines; bool _consoleFullRedraw; - Common::Rect _sceneArea; - bool _sceneIsActive; - bool _cursorIsArrow; - bool _inTextSelection; int _selectionStartX; int _selectionStartY; @@ -178,9 +149,8 @@ private: int _inputTextLineNum; - MacWindowManager _wm; - int _sceneWindowId; - int _consoleWindowId; + int _commandsMenuId; + int _weaponsMenuId; }; } // End of namespace Wage |