diff options
author | Paul Gilbert | 2018-10-19 19:37:03 -0700 |
---|---|---|
committer | Paul Gilbert | 2018-12-08 19:05:59 -0800 |
commit | b9bafba382a9756cbedbb2008086208e24834139 (patch) | |
tree | 0d50024fd840bc4543b655d57144519c9f8556fa /engines/gargoyle/windows.h | |
parent | 89102c42cac1bd2367a6322f07286452bab21e11 (diff) | |
download | scummvm-rg350-b9bafba382a9756cbedbb2008086208e24834139.tar.gz scummvm-rg350-b9bafba382a9756cbedbb2008086208e24834139.tar.bz2 scummvm-rg350-b9bafba382a9756cbedbb2008086208e24834139.zip |
GLK: Remaining window rearrange code
Diffstat (limited to 'engines/gargoyle/windows.h')
-rw-r--r-- | engines/gargoyle/windows.h | 48 |
1 files changed, 46 insertions, 2 deletions
diff --git a/engines/gargoyle/windows.h b/engines/gargoyle/windows.h index aad4969be2..64adf81450 100644 --- a/engines/gargoyle/windows.h +++ b/engines/gargoyle/windows.h @@ -210,6 +210,11 @@ public: * Rearranges the window */ virtual void rearrange(const Common::Rect &box) { bbox = box; } + + /** + * Get window split size within parent pair window + */ + virtual glui32 getSplit(glui32 size, bool vertical) const { return 0; } }; typedef Window *winid_t; @@ -277,7 +282,15 @@ public: /** * Rearranges the window */ - virtual void rearrange(const Common::Rect &box); + virtual void rearrange(const Common::Rect &box) override; + + /** + * Get window split size within parent pair window + */ + virtual glui32 getSplit(glui32 size, bool vertical) const override { + return vertical ? size * Windows::_cellW + Windows::_tMarginx * 2 : + size * Windows::_cellH + Windows::_tMarginy * 2; + } }; /** @@ -373,7 +386,14 @@ public: /** * Rearranges the window */ - virtual void rearrange(const Common::Rect &box); + virtual void rearrange(const Common::Rect &box) override; + + /** + * Get window split size within parent pair window + */ + virtual glui32 getSplit(glui32 size, bool vertical) const override { + return (vertical) ? size * Windows::_cellW : size * Windows::_cellH; + } /** * Clear the window @@ -385,11 +405,30 @@ public: * Graphics window */ class GraphicsWindow : public Window { +private: + void touch(); +public: + unsigned char bgnd[3]; + bool dirty; + int w, h; + Graphics::ManagedSurface *_surface; public: /** * Constructor */ GraphicsWindow(Windows *windows, uint32 rock); + + /** + * Rearranges the window + */ + virtual void rearrange(const Common::Rect &box) override; + + /** + * Get window split size within parent pair window + */ + virtual glui32 getSplit(glui32 size, bool vertical) const override { + return size; + } }; /** @@ -412,6 +451,11 @@ public: * Constructor */ PairWindow(Windows *windows, glui32 method, Window *_key, glui32 _size); + + /** + * Rearranges the window + */ + virtual void rearrange(const Common::Rect &box) override; }; } // End of namespace Gargoyle |