1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 22:49:55 +00:00
openmw-tes3mp/apps/openmw/mwgui/companionwindow.hpp

57 lines
1.3 KiB
C++
Raw Normal View History

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:
CompanionWindow(DragAndDrop* dragAndDrop, MessageBoxManager* manager);
2013-03-31 12:36:03 +00:00
virtual void exit();
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;
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