1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 15:39:02 +00:00
OpenMW/apps/openmw/mwgui/companionwindow.hpp
2013-05-11 18:38:27 +02:00

53 lines
1.2 KiB
C++

#ifndef OPENMW_MWGUI_COMPANIONWINDOW_H
#define OPENMW_MWGUI_COMPANIONWINDOW_H
#include "widgets.hpp"
#include "windowbase.hpp"
#include "referenceinterface.hpp"
namespace MWGui
{
class MessageBoxManager;
class ItemView;
class DragAndDrop;
class SortFilterItemModel;
class CompanionItemModel;
class CompanionWindow : public WindowBase, public ReferenceInterface
{
public:
CompanionWindow(DragAndDrop* dragAndDrop, MessageBoxManager* manager);
void open(const MWWorld::Ptr& npc);
void onFrame ();
private:
ItemView* mItemView;
SortFilterItemModel* mSortModel;
CompanionItemModel* mModel;
size_t mSelectedItem;
DragAndDrop* mDragAndDrop;
MyGUI::Button* mCloseButton;
MyGUI::TextBox* mProfitLabel;
Widgets::MWDynamicStat* mEncumbranceBar;
MessageBoxManager* mMessageBoxManager;
void onItemSelected(int index);
void onBackgroundSelected();
void dragItem(MyGUI::Widget* sender, int count);
void onMessageBoxButtonClicked(int button);
void updateEncumbranceBar();
void onCloseButtonClicked(MyGUI::Widget* _sender);
virtual void onReferenceUnavailable();
};
}
#endif