ScummVM API documentation
navarrow.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 * Additional copyright for this file:
8 * Copyright (C) 1995 Presto Studios, Inc.
9 *
10 * This program is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
14
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 *
23 */
24
25#ifndef BURIED_NAVARROW_H
26#define BURIED_NAVARROW_H
27
28#include "buried/window.h"
29
30namespace Graphics {
31struct Surface;
32}
33
34namespace Buried {
35
36struct LocationStaticData;
37
38class NavArrowWindow : public Window {
39public:
42
43 bool updateArrow(int button, int newStatus);
44 bool updateAllArrows(int up, int left, int right, int down, int forward);
45 bool updateAllArrows(const LocationStaticData &locationStaticData);
46
47 void onPaint();
48 void onEnable(bool enable);
49 void onLButtonDown(const Common::Point &point, uint flags);
50 void onActionEnd(const Common::CustomEventType &action, uint flags);
51
52 enum {
53 BUTTON_DISABLED = 0,
54 BUTTON_ENABLED = 1,
55 BUTTON_SELECTED = 2
56 };
57
58 enum {
59 NAV_BUTTON_UP = 0,
60 NAV_BUTTON_LEFT = 1,
61 NAV_BUTTON_RIGHT = 2,
62 NAV_BUTTON_DOWN = 3,
63 NAV_BUTTON_FORWARD = 4
64 };
65
66private:
67 static const int NUM_ARROWS = 5;
68 static const int NUM_ARROW_BITMAPS = 3;
69
70 Graphics::Surface *_background;
71 int _arrowBitmaps[NUM_ARROWS][NUM_ARROW_BITMAPS];
72 byte _arrowStatus[NUM_ARROWS];
73
74 bool drawArrow(int xDst, int yDst, int arrow);
75 bool rebuildArrows();
76
77};
78
79} // End of namespace Buried
80
81#endif
Definition: buried.h:96
Definition: navarrow.h:38
Definition: window.h:38
uint32 CustomEventType
Definition: events.h:212
Definition: formatinfo.h:28
Definition: navdata.h:72
Definition: rect.h:144
Definition: surface.h:67