2013-03-31 12:36:03 +00:00
|
|
|
#ifndef OPENMW_MWGUI_COMPANIONWINDOW_H
|
|
|
|
#define OPENMW_MWGUI_COMPANIONWINDOW_H
|
|
|
|
|
|
|
|
#include "widgets.hpp"
|
2013-05-11 16:38:27 +00:00
|
|
|
#include "windowbase.hpp"
|
|
|
|
#include "referenceinterface.hpp"
|
2013-03-31 12:36:03 +00:00
|
|
|
|
|
|
|
namespace MWGui
|
|
|
|
{
|
|
|
|
class MessageBoxManager;
|
2013-05-11 16:38:27 +00:00
|
|
|
class ItemView;
|
|
|
|
class DragAndDrop;
|
|
|
|
class SortFilterItemModel;
|
|
|
|
class CompanionItemModel;
|
2013-03-31 12:36:03 +00:00
|
|
|
|
2013-05-11 16:38:27 +00:00
|
|
|
class CompanionWindow : public WindowBase, public ReferenceInterface
|
2013-03-31 12:36:03 +00:00
|
|
|
{
|
|
|
|
public:
|
2013-04-10 18:46:21 +00:00
|
|
|
CompanionWindow(DragAndDrop* dragAndDrop, MessageBoxManager* manager);
|
2013-03-31 12:36:03 +00:00
|
|
|
|
2014-05-27 03:13:37 +00:00
|
|
|
virtual void exit();
|
|
|
|
|
2014-07-07 21:37:59 +00:00
|
|
|
virtual void resetReference();
|
|
|
|
|
2013-05-11 16:38:27 +00:00
|
|
|
void open(const MWWorld::Ptr& npc);
|
|
|
|
void onFrame ();
|
2013-03-31 12:36:03 +00:00
|
|
|
|
2013-05-11 16:38:27 +00:00
|
|
|
private:
|
|
|
|
ItemView* mItemView;
|
|
|
|
SortFilterItemModel* mSortModel;
|
|
|
|
CompanionItemModel* mModel;
|
2014-05-15 01:12:52 +00:00
|
|
|
int mSelectedItem;
|
2013-05-11 16:38:27 +00:00
|
|
|
|
|
|
|
DragAndDrop* mDragAndDrop;
|
2013-03-31 12:36:03 +00:00
|
|
|
|
|
|
|
MyGUI::Button* mCloseButton;
|
|
|
|
MyGUI::TextBox* mProfitLabel;
|
|
|
|
Widgets::MWDynamicStat* mEncumbranceBar;
|
|
|
|
MessageBoxManager* mMessageBoxManager;
|
|
|
|
|
2013-05-11 16:38:27 +00:00
|
|
|
void onItemSelected(int index);
|
|
|
|
void onBackgroundSelected();
|
|
|
|
void dragItem(MyGUI::Widget* sender, int count);
|
|
|
|
|
2013-03-31 12:36:03 +00:00
|
|
|
void onMessageBoxButtonClicked(int button);
|
|
|
|
|
|
|
|
void updateEncumbranceBar();
|
|
|
|
|
|
|
|
void onCloseButtonClicked(MyGUI::Widget* _sender);
|
|
|
|
|
|
|
|
virtual void onReferenceUnavailable();
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|