Mana
Loading...
Searching...
No Matches
ministatuswindow.h
Go to the documentation of this file.
1/*
2 * The Mana Client
3 * Copyright (C) 2004-2009 The Mana World 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 "eventlistener.h"
25
26#include "gui/widgets/popup.h"
27
28#include <memory>
29#include <vector>
30
31class Sprite;
32class Graphics;
33class ProgressBar;
34class TextPopup;
35
41class MiniStatusWindow : public Popup, public EventListener
42{
43 public:
46
47 void event(Event::Channel channel, const Event &event) override;
48
49 void logic() override; // Updates icons
50
51 void draw(gcn::Graphics *graphics) override;
52
53 void mouseMoved(gcn::MouseEvent &mouseEvent) override;
54 void mouseExited(gcn::MouseEvent &event) override;
55
56 private:
58 void updateSize();
59
60 /*
61 * Mini Status Bars
62 */
67
69 {
71 std::unique_ptr<Sprite> sprite;
72 };
73
74 std::vector<StatusIcon> mStatusIcons;
75};
76
Definition event.h:42
Channel
Definition event.h:45
A central point of control for graphics.
Definition graphics.h:78
The player mini-status dialog.
ProgressBar * mHpBar
~MiniStatusWindow() override
void mouseMoved(gcn::MouseEvent &mouseEvent) override
void mouseExited(gcn::MouseEvent &event) override
ProgressBar * mMpBar
TextPopup * mTextPopup
std::vector< StatusIcon > mStatusIcons
void drawIcons(Graphics *graphics)
void draw(gcn::Graphics *graphics) override
void logic() override
void event(Event::Channel channel, const Event &event) override
ProgressBar * mXpBar
A light version of the Window class.
Definition popup.h:48
A progress bar.
Definition progressbar.h:34
Animates a sprite by adding playback state.
Definition sprite.h:37
A popup that displays information about an item.
Definition textpopup.h:36
Graphics * graphics
Definition client.cpp:104
MiniStatusWindow * miniStatusWindow
Definition game.cpp:95
std::unique_ptr< Sprite > sprite