Mana
Loading...
Searching...
No Matches
abilitieswindow.h
Go to the documentation of this file.
1/*
2 * The Mana Client
3 * Copyright (C) 2009-2012 The Mana Developers
4 *
5 * This file is part of The Mana Client.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * 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, see <http://www.gnu.org/licenses/>.
19 */
20
21#pragma once
22
23#include "playerinfo.h"
24
25#include "gui/widgets/window.h"
26
27#include <guichan/actionlistener.hpp>
28
29#include <map>
30
31class AbilityEntry;
32
33class AbilitiesWindow : public Window, public gcn::ActionListener
34{
35 public:
37
38 ~AbilitiesWindow() override;
39
43 void action(const gcn::ActionEvent &actionEvent) override;
44
45 void draw(gcn::Graphics *graphics) override;
46
47 bool hasAbilities() const
48 { return !mEntries.empty(); }
49
50 private:
51 // (re)constructs the list of abilities
52 void rebuild(const std::map<int, Ability> &abilityData);
53
54 std::map<int, AbilityEntry *> mEntries;
55};
56
AbilitiesWindow * abilitiesWindow
Definition game.cpp:107
void rebuild(const std::map< int, Ability > &abilityData)
void action(const gcn::ActionEvent &actionEvent) override
Called when receiving actions from widget.
std::map< int, AbilityEntry * > mEntries
bool hasAbilities() const
~AbilitiesWindow() override
void draw(gcn::Graphics *graphics) override
A window.
Definition window.h:59
Graphics * graphics
Definition client.cpp:104