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 
27 namespace Ultima {
28 namespace Nuvie {
29 
30 GUI_status viewLeftButtonCallback(void *data);
31 GUI_status viewRightButtonCallback(void *data);
32 
33 class Configuration;
34 class TileManager;
35 class Screen;
36 class Font;
37 class ObjManager;
38 class Party;
39 class GUI_Button;
40 class Actor;
41 
42 class View: public GUI_Widget {
43 protected:
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 
57 public:
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 
76 protected:
77 
78  GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override;
79  GUI_Button *loadButton(const Common::Path &dir, Std::string name, uint16 x, uint16 y);
80 };
81 
82 } // End of namespace Nuvie
83 } // End of namespace Ultima
84 
85 #endif
Definition: actor.h:178
Definition: gui_widget.h:38
Definition: configuration.h:61
Definition: gui_button.h:70
Definition: rect.h:144
Definition: path.h:52
Definition: atari-screen.h:60
Definition: tile_manager.h:145
Definition: party.h:92
Definition: detection.h:27
Definition: view.h:42
Definition: string.h:30
Definition: obj_manager.h:75
Definition: font.h:42
Definition: gui_callback.h:31