ScummVM API documentation
portrait_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_PORTRAIT_VIEW_H
23 #define NUVIE_VIEWS_PORTRAIT_VIEW_H
24 
25 #include "ultima/nuvie/views/view.h"
26 
27 namespace Ultima {
28 namespace Nuvie {
29 
30 class Configuration;
31 class TileManager;
32 class Portrait;
33 class Screen;
34 class Font;
35 class ObjManager;
36 class Party;
37 class Player;
38 class Actor;
39 class DollWidget;
40 class U6Shape;
41 
42 class PortraitView : public View {
43 
44  nuvie_game_t gametype;
45 
46  uint8 cur_actor_num;
47  Portrait *portrait;
48  Std::string *name_string;
49 
50  unsigned char *portrait_data;
51  U6Shape *bg_data;
52  uint8 portrait_width;
53  uint8 portrait_height;
54 
55  bool waiting; // waiting for input, then will return to previous view
56  bool show_cursor; // indicate waiting for input
57 // uint16 cursor_x, cursor_y;
58 
59  DollWidget *doll_widget;
60  bool display_doll;
61 
62 public:
63  PortraitView(const Configuration *cfg);
64  ~PortraitView() override;
65 
66  bool init(uint16 x, uint16 y, Font *f, Party *p, Player *player, TileManager *tm, ObjManager *om, Portrait *port);
67  void Display(bool full_redraw) override;
68  GUI_status HandleEvent(const Common::Event *event) override;
69 
70  bool set_portrait(Actor *actor, const char *name);
71  void set_show_cursor(bool state) {
72  show_cursor = state;
73  }
74  void set_waiting(bool state);
75  bool get_waiting() const {
76  return waiting;
77  }
78 
79 protected:
80 
81  void display_name(uint16 y_offset);
82 
83 private:
84  void load_background(const char *filename, uint8 lib_offset);
85 
86 };
87 
88 } // End of namespace Nuvie
89 } // End of namespace Ultima
90 
91 #endif
Definition: actor.h:178
Definition: portrait.h:40
Definition: configuration.h:61
Definition: player.h:41
Definition: atari-screen.h:60
Definition: tile_manager.h:145
Definition: party.h:92
Definition: u6_shape.h:47
Definition: detection.h:27
Definition: view.h:42
Definition: portrait_view.h:42
Definition: string.h:30
Definition: events.h:199
Definition: obj_manager.h:75
Definition: doll_widget.h:37
Definition: font.h:42