Mana
Loading...
Searching...
No Matches
label.h
Go to the documentation of this file.
1/*
2 * The Mana Client
3 * Copyright (c) 2009 Aethyra Development Team
4 * Copyright (C) 2009-2012 The Mana Developers
5 *
6 * This file is part of The Mana Client.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
24#include <guichan/widgets/label.hpp>
25#include <optional>
26
33class Label : public gcn::Label
34{
35 public:
36 Label();
37
42 Label(const std::string &caption);
43
47 void setOutlineColor(std::optional<gcn::Color> color);
48
52 void setShadowColor(std::optional<gcn::Color> color);
53
57 void draw(gcn::Graphics *graphics) override;
58
59 private:
60 std::optional<gcn::Color> mOutlineColor;
61 std::optional<gcn::Color> mShadowColor;
62};
63
64inline void Label::setOutlineColor(std::optional<gcn::Color> color)
65{
66 mOutlineColor = color;
67}
68
69inline void Label::setShadowColor(std::optional<gcn::Color> color)
70{
71 mShadowColor = color;
72}
Label widget.
Definition label.h:34
void setShadowColor(std::optional< gcn::Color > color)
Sets the color of the shadow.
Definition label.h:69
std::optional< gcn::Color > mShadowColor
Definition label.h:61
void draw(gcn::Graphics *graphics) override
Draws the label.
Definition label.cpp:40
std::optional< gcn::Color > mOutlineColor
Definition label.h:60
void setOutlineColor(std::optional< gcn::Color > color)
Sets the color of the outline.
Definition label.h:64
Label()
Definition label.cpp:29
Graphics * graphics
Definition client.cpp:104