Mana
Loading...
Searching...
No Matches
src
gui
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
31
class
Icon
;
32
class
Label
;
33
class
TextBox
;
34
38
class
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
:
69
Label
*
mItemName
;
70
TextBox
*
mItemDesc
;
71
TextBox
*
mItemEffect
;
72
TextBox
*
mItemWeight
;
73
std::string
mItemEquipSlot
;
74
ItemType
mItemType
;
75
Icon
*
mIcon
;
76
};
Icon
An icon.
Definition
icon.h:36
ItemInfo
Defines a class for storing generic item infos.
Definition
iteminfo.h:100
ItemPopup
A popup that displays information about an item.
Definition
itempopup.h:39
ItemPopup::mIcon
Icon * mIcon
Definition
itempopup.h:75
ItemPopup::setItem
void setItem(const ItemInfo &item, bool showImage=false)
Sets the info to be displayed given a particular item.
Definition
itempopup.cpp:149
ItemPopup::ItemPopup
ItemPopup()
Constructor.
Definition
itempopup.cpp:81
ItemPopup::mItemName
Label * mItemName
Definition
itempopup.h:69
ItemPopup::mouseMoved
void mouseMoved(gcn::MouseEvent &mouseEvent) override
Definition
itempopup.cpp:232
ItemPopup::mItemDesc
TextBox * mItemDesc
Definition
itempopup.h:70
ItemPopup::setEquipmentText
void setEquipmentText(const std::string &text=std::string())
Tells in which equipment slot the item is equipped.
Definition
itempopup.cpp:116
ItemPopup::mItemWeight
TextBox * mItemWeight
Definition
itempopup.h:72
ItemPopup::mItemEquipSlot
std::string mItemEquipSlot
Definition
itempopup.h:73
ItemPopup::mItemEffect
TextBox * mItemEffect
Definition
itempopup.h:71
ItemPopup::~ItemPopup
~ItemPopup() override
Destructor.
ItemPopup::setNoItem
void setNoItem()
Tells the item popup to say: No Item.
Definition
itempopup.cpp:121
ItemPopup::mItemType
ItemType mItemType
Definition
itempopup.h:74
Label
Label widget.
Definition
label.h:34
Popup
A light version of the Window class.
Definition
popup.h:48
TextBox
A text box, meant to be used inside a scroll area.
Definition
textbox.h:36
iteminfo.h
ItemType
ItemType
Enumeration of available Item types.
Definition
iteminfo.h:43
popup.h
Generated by
1.9.8