ScummVM API documentation
view.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 NUVIE_VIEWS_VIEW_H
23#define NUVIE_VIEWS_VIEW_H
24
25#include "ultima/nuvie/gui/widgets/gui_widget.h"
26
27namespace Ultima {
28namespace Nuvie {
29
30GUI_status viewLeftButtonCallback(void *data);
31GUI_status viewRightButtonCallback(void *data);
32
33class Configuration;
34class TileManager;
35class Screen;
36class Font;
37class ObjManager;
38class Party;
39class GUI_Button;
40class Actor;
41
42class View: public GUI_Widget {
43protected:
44 const Configuration *config;
45
46 GUI_Button *left_button, *right_button, *actor_button, *party_button, *inventory_button;
47
48 Font *font;
49 TileManager *tile_manager;
50 ObjManager *obj_manager;
51 Party *party;
52
53 uint8 cur_party_member;
54 uint8 bg_color;
55 bool new_ui_mode;
56
57public:
58
59 View(const Configuration *cfg);
60 ~View() override;
61
62 bool init(uint16 x, uint16 y, Font *f, Party *p, TileManager *tm, ObjManager *om);
63
64 virtual bool set_party_member(uint8 party_member);
65 uint8 get_party_member_num() const {
66 return cur_party_member;
67 }
68 bool next_party_member();
69 bool prev_party_member();
70 void fill_md_background(uint8 color, const Common::Rect &r);
71 void set_combat_mode(Actor *actor);
72 uint8 get_combat_mode_index(const Actor *actor) const;
73
74 virtual void close_view() {}
75
76protected:
77
78 GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override;
79 GUI_Button *loadButton(const Common::Path &dir, Common::String name, uint16 x, uint16 y);
80};
81
82} // End of namespace Nuvie
83} // End of namespace Ultima
84
85#endif
Definition: path.h:52
Definition: str.h:59
Definition: actor.h:174
Definition: configuration.h:60
Definition: font.h:42
Definition: gui_button.h:70
Definition: gui_callback.h:31
Definition: gui_widget.h:38
Definition: obj_manager.h:74
Definition: party.h:92
Definition: tile_manager.h:145
Definition: view.h:42
Definition: rect.h:536
Definition: atari-screen.h:58