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 ABOUT_DIALOG_H 24 #define ABOUT_DIALOG_H 25 26 #include "gui/dialog.h" 27 #include "common/str.h" 28 #include "common/array.h" 29 #include "common/keyboard.h" 30 31 namespace GUI { 32 33 class AboutDialog : public Dialog { 34 typedef Common::Array<Common::String> StringArray; 35 protected: 36 int _scrollPos; 37 uint32 _scrollTime; 38 StringArray _lines; 39 uint32 _lineHeight; 40 bool _willClose; 41 42 int _xOff, _yOff; 43 44 void addLine(const char *str); 45 46 public: 47 AboutDialog(); 48 49 void open(); 50 void close(); 51 void drawDialog(); 52 void handleTickle(); 53 void handleMouseUp(int x, int y, int button, int clickCount); 54 void handleKeyDown(Common::KeyState state); 55 void handleKeyUp(Common::KeyState state); 56 57 void reflowLayout(); 58 }; 59 60 } // End of namespace GUI 61 62 #endif 63