ScummVM API documentation
cursor_manager.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 ZVISION_CURSOR_MANAGER_H
23#define ZVISION_CURSOR_MANAGER_H
24
25#include "common/str.h"
26#include "zvision/graphics/cursors/cursor.h"
27
28namespace Graphics {
29struct PixelFormat;
30}
31
32namespace ZVision {
33
34class ZVision;
35
40 CursorIndex_Active = 0,
41 CursorIndex_DownArr = 3,
42 CursorIndex_HandPu = 6,
43 CursorIndex_Idle = 11,
44 CursorIndex_Left = 12,
45 CursorIndex_Right = 13,
46 CursorIndex_UpArr = 17,
47 CursorIndex_ItemIdle = 18,
48 CursorIndex_ItemAct = 19
49};
50
58public:
59 CursorManager(ZVision *engine, const Graphics::PixelFormat &pixelFormat);
60
61private:
62 static const int NUM_CURSORS = 18;
63
64 // 18 default cursors in up/down states, +2 for items idle/act cursors
65 ZorkCursor _cursors[NUM_CURSORS + 2][2];
66
67 ZVision *_engine;
68 const Graphics::PixelFormat _pixelFormat;
69 bool _cursorIsPushed;
70 int _item;
71 int _lastitem;
72 int _currentCursor;
73
74 static const char *_cursorNames[];
75 static const char *_zgiCursorFileNames[];
76 static const char *_zNemCursorFileNames[];
77
78public:
80 void initialize();
81
88 void changeCursor(int id);
89
97 int getCursorId(const Common::String &name);
98
105 void setItemID(int id);
106
112 void cursorDown(bool pushed);
113
119 void showMouse(bool vis);
120
121private:
127 void changeCursor(const ZorkCursor &cursor);
128};
129
130} // End of namespace ZVision
131
132#endif
Definition: str.h:59
Definition: cursor_manager.h:57
void cursorDown(bool pushed)
int getCursorId(const Common::String &name)
void changeCursor(int id)
void setItemID(int id)
void showMouse(bool vis)
Definition: cursor.h:38
Definition: formatinfo.h:28
Definition: focus_list.h:27
CursorIndex
Definition: cursor_manager.h:39
Definition: pixelformat.h:138