diff options
author | Ľubomír Remák | 2018-09-06 19:38:16 +0200 |
---|---|---|
committer | Ľubomír Remák | 2018-09-06 19:38:16 +0200 |
commit | c36fb36afba47f52c1f81f1df61eb31838134cd2 (patch) | |
tree | a87bc4e4c7a70542da8b54e1cb4e86373ec199f8 /engines/mutationofjb/guiscreen.h | |
parent | f10816d9ed0b74b478799a96f26ee8f3f42f9ee2 (diff) | |
download | scummvm-rg350-c36fb36afba47f52c1f81f1df61eb31838134cd2.tar.gz scummvm-rg350-c36fb36afba47f52c1f81f1df61eb31838134cd2.tar.bz2 scummvm-rg350-c36fb36afba47f52c1f81f1df61eb31838134cd2.zip |
MUTATIONOFJB: Add support for 'look' action on inventory items.
Diffstat (limited to 'engines/mutationofjb/guiscreen.h')
-rw-r--r-- | engines/mutationofjb/guiscreen.h | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/engines/mutationofjb/guiscreen.h b/engines/mutationofjb/guiscreen.h new file mode 100644 index 0000000000..c1761be39a --- /dev/null +++ b/engines/mutationofjb/guiscreen.h @@ -0,0 +1,88 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef MUTATIONOFJB_GUISCREEN_H +#define MUTATIONOFJB_GUISCREEN_H + +#include "common/array.h" + +namespace Common { +struct Event; +} + +namespace Graphics { +class Screen; +} + +namespace MutationOfJB { + +class Game; +class Widget; + +/** + * Base class for GUI screens. + * + * GUI screen is a collection of widgets. + */ +class GuiScreen { +public: + + GuiScreen(Game &game, Graphics::Screen *screen); + virtual ~GuiScreen(); + Game &getGame(); + + /** + * Marks all visible widgets as dirty (needs redraw). + */ + void markDirty(); + + /** + * Lets all visible widgets handle core events. + * + * @param event ScummVM event. + */ + void handleEvent(const Common::Event &event); + + /** + * Updates all visible widgets. + */ + void update(); + + /** + * Adds a widget to the GUI screen. + * The GUI screen will own the widget. + * + * @param widget Widget to add. + */ + void addWidget(Widget *widget); + +protected: + Game &_game; + Graphics::Screen *_screen; + +private: + Common::Array<Widget *> _widgets; +}; + +} + +#endif |