/* 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 3 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, see .
*
*/
#ifndef ILLUSIONS_MENUSYSTEM_H
#define ILLUSIONS_MENUSYSTEM_H
#include "illusions/actor.h"
#include "illusions/graphics.h"
#include "illusions/resources/fontresource.h"
#include "common/array.h"
#include "common/rect.h"
#include "common/stack.h"
#include "common/str.h"
#include "graphics/surface.h"
namespace Illusions {
class IllusionsEngine;
class BaseMenuSystem;
class BaseMenuAction;
const uint kMenuTextSize = 4096;
class MenuItem {
public:
MenuItem(const Common::String text, BaseMenuAction *action);
~MenuItem();
void executeAction(const Common::Point &point);
const Common::String& getText() const { return _text; }
void setText(const Common::String &text) { _text = text; }
const Common::Point& getMouseClickPoint() { return _mouseClickPoint; };
protected:
Common::String _text;
BaseMenuAction *_action;
Common::Point _mouseClickPoint;
};
class BaseMenu {
public:
BaseMenu(BaseMenuSystem *menuSystem, uint32 fontId, byte backgroundColor, byte borderColor, byte textColor, byte fieldE,
uint defaultMenuItemIndex);
virtual ~BaseMenu();
void addText(const Common::String text);
void addMenuItem(MenuItem *menuItem);
uint getHeaderLinesCount();
const Common::String& getHeaderLine(uint index);
uint getMenuItemsCount();
MenuItem *getMenuItem(uint index);
virtual void enterMenu();
public://protected://TODO
typedef Common::Array