1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00
OpenMW/apps/openmw/mwgui/inventorywindow.hpp

77 lines
2.0 KiB
C++
Raw Normal View History

2012-04-21 10:51:01 +02:00
#ifndef MGUI_Inventory_H
#define MGUI_Inventory_H
#include "../mwrender/characterpreview.hpp"
2012-04-21 10:51:01 +02:00
#include "container.hpp"
2012-05-12 22:44:12 +02:00
#include "window_pinnable_base.hpp"
2012-04-21 10:51:01 +02:00
namespace MWGui
{
2012-05-12 22:44:12 +02:00
class InventoryWindow : public ContainerBase, public WindowPinnableBase
2012-04-21 10:51:01 +02:00
{
public:
InventoryWindow(MWBase::WindowManager& parWindowManager,DragAndDrop* dragAndDrop);
virtual void open();
/// start trading, disables item drag&drop
void startTrade();
void onFrame();
2012-05-15 22:45:46 +02:00
void pickUpObject (MWWorld::Ptr object);
int getPlayerGold();
2012-09-14 14:34:18 +02:00
MyGUI::IntCoord getAvatarScreenCoord();
MWWorld::Ptr getAvatarSelectedItem(int x, int y);
void rebuildAvatar() {
mPreview.rebuild();
}
protected:
2012-05-12 21:28:04 +02:00
MyGUI::Widget* mAvatar;
2012-09-13 00:54:32 +02:00
MyGUI::ImageBox* mAvatarImage;
2012-05-12 21:28:04 +02:00
MyGUI::TextBox* mArmorRating;
MyGUI::ProgressBar* mEncumbranceBar;
MyGUI::TextBox* mEncumbranceText;
MyGUI::Widget* mLeftPane;
MyGUI::Widget* mRightPane;
2012-05-12 21:28:04 +02:00
MyGUI::Button* mFilterAll;
MyGUI::Button* mFilterWeapon;
MyGUI::Button* mFilterApparel;
MyGUI::Button* mFilterMagic;
MyGUI::Button* mFilterMisc;
2012-09-14 17:10:10 +02:00
int mLastXSize;
int mLastYSize;
2012-09-14 14:34:18 +02:00
MWRender::InventoryPreview mPreview;
2012-09-14 14:34:18 +02:00
bool mTrading;
void onWindowResize(MyGUI::Window* _sender);
2012-05-12 21:44:33 +02:00
void onFilterChanged(MyGUI::Widget* _sender);
void onAvatarClicked(MyGUI::Widget* _sender);
2012-05-12 22:44:12 +02:00
void onPinToggled();
2012-05-15 22:45:46 +02:00
void updateEncumbranceBar();
virtual bool isTrading() { return mTrading; }
virtual bool isInventory() { return true; }
virtual std::vector<MWWorld::Ptr> getEquippedItems();
virtual void _unequipItem(MWWorld::Ptr item);
virtual void onReferenceUnavailable() { ; }
2012-05-29 12:35:03 +02:00
virtual void notifyContentChanged();
2012-04-21 10:51:01 +02:00
};
}
2012-04-21 10:51:01 +02:00
#endif // Inventory_H