Mana
Loading...
Searching...
No Matches
itempopup.h
Go to the documentation of this file.
1/*
2 * The Mana Client
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/iteminfo.h"
28
29#include <guichan/mouselistener.hpp>
30
31class Icon;
32class Label;
33class TextBox;
34
38class ItemPopup : public Popup
39{
40 public:
44 ItemPopup();
45
49 ~ItemPopup() override;
50
54 void setNoItem();
55
59 void setEquipmentText(const std::string& text = std::string());
60
64 void setItem(const ItemInfo &item, bool showImage = false);
65
66 void mouseMoved(gcn::MouseEvent &mouseEvent) override;
67
68 private:
73 std::string mItemEquipSlot;
76};
An icon.
Definition icon.h:36
Defines a class for storing generic item infos.
Definition iteminfo.h:100
A popup that displays information about an item.
Definition itempopup.h:39
Icon * mIcon
Definition itempopup.h:75
void setItem(const ItemInfo &item, bool showImage=false)
Sets the info to be displayed given a particular item.
ItemPopup()
Constructor.
Definition itempopup.cpp:81
Label * mItemName
Definition itempopup.h:69
void mouseMoved(gcn::MouseEvent &mouseEvent) override
TextBox * mItemDesc
Definition itempopup.h:70
void setEquipmentText(const std::string &text=std::string())
Tells in which equipment slot the item is equipped.
TextBox * mItemWeight
Definition itempopup.h:72
std::string mItemEquipSlot
Definition itempopup.h:73
TextBox * mItemEffect
Definition itempopup.h:71
~ItemPopup() override
Destructor.
void setNoItem()
Tells the item popup to say: No Item.
ItemType mItemType
Definition itempopup.h:74
Label widget.
Definition label.h:34
A light version of the Window class.
Definition popup.h:48
A text box, meant to be used inside a scroll area.
Definition textbox.h:36
ItemType
Enumeration of available Item types.
Definition iteminfo.h:43