2012-04-21 08:51:01 +00:00
|
|
|
#ifndef MGUI_Inventory_H
|
|
|
|
#define MGUI_Inventory_H
|
|
|
|
|
|
|
|
#include "container.hpp"
|
2012-05-12 20:44:12 +00:00
|
|
|
#include "window_pinnable_base.hpp"
|
|
|
|
|
2012-04-21 08:51:01 +00:00
|
|
|
namespace MWGui
|
|
|
|
{
|
2012-05-12 20:44:12 +00:00
|
|
|
class InventoryWindow : public ContainerBase, public WindowPinnableBase
|
2012-04-21 08:51:01 +00:00
|
|
|
{
|
|
|
|
public:
|
2012-05-11 09:52:07 +00:00
|
|
|
InventoryWindow(WindowManager& parWindowManager,DragAndDrop* dragAndDrop);
|
2012-04-21 09:05:30 +00:00
|
|
|
|
2012-05-25 13:24:33 +00:00
|
|
|
virtual void open();
|
2012-05-12 16:24:47 +00:00
|
|
|
|
2012-05-18 15:27:55 +00:00
|
|
|
/// start trading, disables item drag&drop
|
|
|
|
void startTrade();
|
|
|
|
|
2012-05-19 12:55:09 +00:00
|
|
|
void onFrame();
|
2012-05-15 20:45:46 +00:00
|
|
|
|
2012-06-02 12:19:02 +00:00
|
|
|
void pickUpObject (MWWorld::Ptr object);
|
|
|
|
|
2012-05-17 19:56:16 +00:00
|
|
|
int getPlayerGold();
|
|
|
|
|
2012-05-12 16:24:47 +00:00
|
|
|
protected:
|
2012-05-12 19:28:04 +00:00
|
|
|
MyGUI::Widget* mAvatar;
|
|
|
|
MyGUI::TextBox* mArmorRating;
|
|
|
|
MyGUI::ProgressBar* mEncumbranceBar;
|
|
|
|
MyGUI::TextBox* mEncumbranceText;
|
|
|
|
|
2012-05-13 09:25:35 +00:00
|
|
|
MyGUI::Widget* mLeftPane;
|
|
|
|
MyGUI::Widget* mRightPane;
|
|
|
|
|
2012-05-12 19:28:04 +00:00
|
|
|
MyGUI::Button* mFilterAll;
|
|
|
|
MyGUI::Button* mFilterWeapon;
|
|
|
|
MyGUI::Button* mFilterApparel;
|
|
|
|
MyGUI::Button* mFilterMagic;
|
|
|
|
MyGUI::Button* mFilterMisc;
|
|
|
|
|
2012-05-18 15:27:55 +00:00
|
|
|
bool mTrading;
|
|
|
|
|
2012-05-12 16:24:47 +00:00
|
|
|
void onWindowResize(MyGUI::Window* _sender);
|
2012-05-12 19:44:33 +00:00
|
|
|
void onFilterChanged(MyGUI::Widget* _sender);
|
2012-05-15 16:05:53 +00:00
|
|
|
void onAvatarClicked(MyGUI::Widget* _sender);
|
2012-05-12 20:44:12 +00:00
|
|
|
void onPinToggled();
|
2012-05-15 16:05:53 +00:00
|
|
|
|
2012-05-15 20:45:46 +00:00
|
|
|
void updateEncumbranceBar();
|
|
|
|
|
2012-05-18 15:27:55 +00:00
|
|
|
virtual bool isTrading() { return mTrading; }
|
2012-05-15 16:05:53 +00:00
|
|
|
virtual bool isInventory() { return true; }
|
2012-05-15 18:33:34 +00:00
|
|
|
virtual std::vector<MWWorld::Ptr> getEquippedItems();
|
|
|
|
virtual void _unequipItem(MWWorld::Ptr item);
|
2012-05-26 23:14:33 +00:00
|
|
|
|
|
|
|
virtual void onReferenceUnavailable() { ; }
|
2012-05-29 10:35:03 +00:00
|
|
|
|
|
|
|
virtual void notifyContentChanged();
|
2012-04-21 08:51:01 +00:00
|
|
|
};
|
|
|
|
}
|
2012-05-17 11:36:25 +00:00
|
|
|
|
2012-04-21 08:51:01 +00:00
|
|
|
#endif // Inventory_H
|