From 5b374c6f55885f61215bada85a57feb293ea0c8d Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 11 Jan 2016 11:16:00 +0100 Subject: WAGE: Moved menu rendering into separate file --- engines/wage/gui.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'engines/wage/gui.h') diff --git a/engines/wage/gui.h b/engines/wage/gui.h index 3c5660b4f2..7e91479b07 100644 --- a/engines/wage/gui.h +++ b/engines/wage/gui.h @@ -56,11 +56,23 @@ namespace Wage { +class Menu; + enum WindowType { kWindowScene, kWindowConsole }; +enum { + kMenuHeight = 20, + kMenuPadding = 6, + kMenuItemHeight = 20, + kBorderWidth = 17, + kDesktopArc = 7, + kComponentsPadding = 10, + kCursorHeight = 12 +}; + class Gui { public: Gui(WageEngine *engine); @@ -73,6 +85,7 @@ public: Designed *getClickTarget(int x, int y); void drawInput(); void setSceneDirty() { _sceneDirty = true; } + const Graphics::Font *getFont(const char *name, Graphics::FontManager::FontUsage fallback); private: void paintBorder(Graphics::Surface *g, Common::Rect &r, WindowType windowType); @@ -80,12 +93,9 @@ private: 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); void loadFonts(); - void renderMenu(); void flowText(Common::String &str); const Graphics::Font *getConsoleFont(); - const Graphics::Font *getMenuFont(); const Graphics::Font *getTitleFont(); - const Graphics::Font *getFont(const char *name, Graphics::FontManager::FontUsage fallback); public: Graphics::Surface _screen; @@ -94,9 +104,12 @@ public: Common::Rect _consoleTextArea; bool _cursorOff; + bool _builtInFonts; + private: WageEngine *_engine; Graphics::Surface _console; + Menu *_menu; Scene *_scene; bool _sceneDirty; bool _consoleDirty; @@ -110,8 +123,6 @@ private: uint _consoleNumLines; bool _consoleFullRedraw; - bool _builtInFonts; - Common::Rect _sceneArea; bool _sceneIsActive; bool _cursorIsArrow; -- cgit v1.2.3