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 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (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, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 */ 22 23 #ifndef NUVIE_VIEWS_ACTOR_VIEW_H 24 #define NUVIE_VIEWS_ACTOR_VIEW_H 25 26 #include "ultima/nuvie/views/view.h" 27 28 namespace Ultima { 29 namespace Nuvie { 30 31 class Configuration; 32 class Screen; 33 class Font; 34 class TileManager; 35 class ObjManager; 36 class Portrait; 37 class Party; 38 39 class ActorView : public View { 40 41 Portrait *portrait; 42 43 unsigned char *portrait_data; 44 struct actcursor_pos_s { 45 uint8 x; 46 uint32 px, py; 47 } cursor_pos; 48 Tile *cursor_tile; 49 bool show_cursor; 50 51 public: 52 ActorView(Configuration *cfg); 53 ~ActorView() override; 54 55 bool init(Screen *tmp_screen, void *view_manager, uint16 x, uint16 y, Font *f, Party *p, TileManager *tm, ObjManager *om, Portrait *port); 56 57 bool set_party_member(uint8 party_member) override; 58 59 void Display(bool full_redraw) override; update()60 void update() { 61 update_display = true; 62 } 63 void set_show_cursor(bool state); 64 void moveCursorToButton(sint8 button_num); 65 66 protected: 67 68 void add_command_icons(Screen *tmp_screen, void *view_manager); 69 void display_name(); 70 void display_actor_stats(); 71 bool in_party; 72 GUI_status MouseDown(int x, int y, Shared::MouseButton button) override; 73 GUI_status KeyDown(const Common::KeyState &key) override; 74 GUI_status MouseWheel(sint32 x, sint32 y) override; 75 void update_cursor(); 76 void select_button(); 77 }; 78 79 } // End of namespace Nuvie 80 } // End of namespace Ultima 81 82 #endif 83