00001 /* 00002 * The Mana World 00003 * Copyright (C) 2008 The Legend of Mazzeroth Development Team 00004 * Copyright (C) 2008 The Mana World Development Team 00005 * 00006 * This file is part of The Mana World. 00007 * 00008 * This program is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * any later version. 00012 * 00013 * This program is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program; if not, write to the Free Software 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00021 */ 00022 00023 #ifndef ITEMPOPUP_H 00024 #define ITEMPOPUP_H 00025 00026 #include "gui/widgets/popup.h" 00027 00028 #include "resources/iteminfo.h" 00029 00030 class TextBox; 00031 00035 class ItemPopup : public Popup 00036 { 00037 public: 00041 ItemPopup(); 00042 00046 ~ItemPopup(); 00047 00051 void setItem(const ItemInfo &item); 00052 00056 void view(int x, int y); 00057 00058 private: 00059 gcn::Label *mItemName; 00060 TextBox *mItemDesc; 00061 TextBox *mItemEffect; 00062 TextBox *mItemWeight; 00063 ItemType mItemType; 00064 00065 static gcn::Color getColor(ItemType type); 00066 }; 00067 00068 #endif // ITEMPOPUP_H