1 /* 2 Copyright (C) 2001 The Exult Team 3 4 This program is free software; you can redistribute it and/or 5 modify it under the terms of the GNU General Public License 6 as published by the Free Software Foundation; either version 2 7 of the License, or (at your option) any later version. 8 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 GNU General Public License for more details. 13 14 You should have received a copy of the GNU General Public License 15 along with this program; if not, write to the Free Software 16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 */ 18 19 #ifndef FACE_BUTTON_H 20 #define FACE_BUTTON_H 21 22 #include "Gump_button.h" 23 24 class Actor; 25 class Game_window; 26 27 /* 28 * A character's face, that will open inventory when clicked. 29 */ 30 class Face_button : public Gump_button { 31 protected: 32 Actor *actor; // Who this represents. 33 bool translucent; 34 public: 35 Face_button(Gump *par, int px, int py, Actor *a); get_actor()36 Actor *get_actor() { 37 return actor; 38 } 39 void double_clicked(int x, int y) override; activate(int button)40 bool activate(int button) override { 41 return button == 1; 42 } 43 44 void paint() override; push(int button)45 bool push(int button) override { 46 return button == 1; 47 } unpush(int)48 void unpush(int) override {} 49 void update_widget() override; 50 }; 51 52 #endif 53