00001 /* 00002 * Speech bubbles 00003 * Copyright (C) 2008 The Legend of Mazzeroth Development Team 00004 * Copyright (C) 2008 The Mana World Development Team 00005 * 00006 * This file is part of The Mana World. 00007 * 00008 * This program is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * any later version. 00012 * 00013 * This program is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program; if not, write to the Free Software 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00021 */ 00022 00023 #ifndef SPEECHBUBBLE_H 00024 #define SPEECHBUBBLE_H 00025 00026 #include "gui/palette.h" 00027 00028 #include "gui/widgets/popup.h" 00029 00030 class TextBox; 00031 00032 class SpeechBubble : public Popup 00033 { 00034 public: 00038 SpeechBubble(); 00039 00043 void setCaption(const std::string &name, 00044 const gcn::Color *color = 00045 &guiPalette->getColor(Palette::TEXT)); 00046 00050 void setText(const std::string &text, bool showName = true); 00051 00055 void setLocation(int x, int y); 00056 00057 private: 00058 std::string mText; 00059 gcn::Label *mCaption; 00060 TextBox *mSpeechBox; 00061 }; 00062 00063 #endif