ScummVM API documentation
cursor_mgr.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef PINK_CURSOR_MGR_H
23#define PINK_CURSOR_MGR_H
24
25#include "common/rect.h"
26
27#include "pink/objects/object.h"
28
29namespace Pink {
30
31class CursorActor;
32class Page;
33class PinkEngine;
34
35class CursorMgr : public Object {
36public:
37 CursorMgr(PinkEngine *game, Page *page);
38
39 void update();
40 void setCursor(byte index, Common::Point point, const Common::String &itemName);
41 void setCursor(const Common::String &cursorName, Common::Point point);
42
43 void setPage(Page *page) { _page = page; }
44
45private:
46 void startAnimation(byte index);
47
48 void showItem(const Common::String &itemName, Common::Point point);
49 void hideItem();
50
51private:
52 Page *_page;
53 PinkEngine *_game;
54 CursorActor *_actor;
55 uint _time;
56 byte _firstFrameIndex;
57 bool _isPlayingAnimation;
58 bool _isSecondFrame;
59};
60
61} // End of namespace Pink
62
63#endif
Definition: str.h:59
Definition: cursor_actor.h:33
Definition: cursor_mgr.h:35
Definition: object.h:31
Definition: page.h:36
Definition: pink.h:104
Definition: rect.h:144