You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw-tes3mp/apps/openmw/mwgui/inventorywindow.hpp

76 lines
2.0 KiB
C++

#ifndef MGUI_Inventory_H
#define MGUI_Inventory_H
#include "../mwrender/characterpreview.hpp"
#include "container.hpp"
#include "window_pinnable_base.hpp"
12 years ago
#include "widgets.hpp"
namespace MWGui
{
class InventoryWindow : public ContainerBase, public WindowPinnableBase
{
public:
InventoryWindow(MWBase::WindowManager& parWindowManager,DragAndDrop* dragAndDrop);
virtual void open();
/// start trading, disables item drag&drop
void startTrade();
void onFrame();
void pickUpObject (MWWorld::Ptr object);
int getPlayerGold();
MyGUI::IntCoord getAvatarScreenCoord();
MWWorld::Ptr getAvatarSelectedItem(int x, int y);
void rebuildAvatar() {
mPreview.rebuild();
}
protected:
13 years ago
MyGUI::Widget* mAvatar;
MyGUI::ImageBox* mAvatarImage;
13 years ago
MyGUI::TextBox* mArmorRating;
12 years ago
Widgets::MWDynamicStat* mEncumbranceBar;
13 years ago
MyGUI::Widget* mLeftPane;
MyGUI::Widget* mRightPane;
13 years ago
MyGUI::Button* mFilterAll;
MyGUI::Button* mFilterWeapon;
MyGUI::Button* mFilterApparel;
MyGUI::Button* mFilterMagic;
MyGUI::Button* mFilterMisc;
int mLastXSize;
int mLastYSize;
MWRender::InventoryPreview mPreview;
bool mTrading;
void onWindowResize(MyGUI::Window* _sender);
13 years ago
void onFilterChanged(MyGUI::Widget* _sender);
void onAvatarClicked(MyGUI::Widget* _sender);
void onPinToggled();
void updateEncumbranceBar();
virtual bool isTrading() { return mTrading; }
virtual bool isInventory() { return true; }
virtual void _unequipItem(MWWorld::Ptr item);
virtual void onReferenceUnavailable() { ; }
virtual void notifyContentChanged();
};
}
#endif // Inventory_H