Mana
Loading...
Searching...
No Matches
speechbubble.h
Go to the documentation of this file.
1/*
2 * Speech bubbles
3 * Copyright (C) 2008 The Legend of Mazzeroth Development Team
4 * Copyright (C) 2008-2009 The Mana World Development Team
5 * Copyright (C) 2009-2012 The Mana Developers
6 *
7 * This file is part of The Mana Client.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 */
22
23#pragma once
24
25#include "gui/widgets/popup.h"
26
27#include "resources/theme.h"
28
29class TextBox;
30
31class SpeechBubble : public Popup
32{
33 public:
35
39 void setCaption(const std::string &name,
40 const gcn::Color *color =
42
46 void setText(const std::string &text, bool showName = true);
47
48 private:
49 std::string mText;
50 gcn::Label *mCaption;
52};
A light version of the Window class.
Definition popup.h:48
void setCaption(const std::string &name, const gcn::Color *color=&Theme::getThemeColor(Theme::TEXT))
Sets the name displayed for the speech bubble, and in what color.
std::string mText
void setText(const std::string &text, bool showName=true)
Sets the text to be displayed.
TextBox * mSpeechBox
gcn::Label * mCaption
A text box, meant to be used inside a scroll area.
Definition textbox.h:36
static const gcn::Color & getThemeColor(int type)
Gets the color associated with the type in the default palette (0).
Definition theme.cpp:313
@ TEXT
Definition theme.h:214