2013-03-31 12:36:03 +00:00
|
|
|
#ifndef OPENMW_MWGUI_COMPANIONWINDOW_H
|
|
|
|
#define OPENMW_MWGUI_COMPANIONWINDOW_H
|
|
|
|
|
2013-05-11 16:38:27 +00:00
|
|
|
#include "windowbase.hpp"
|
|
|
|
#include "referenceinterface.hpp"
|
2013-03-31 12:36:03 +00:00
|
|
|
|
|
|
|
namespace MWGui
|
|
|
|
{
|
2017-09-27 10:40:47 +00:00
|
|
|
namespace Widgets
|
|
|
|
{
|
|
|
|
class MWDynamicStat;
|
|
|
|
}
|
|
|
|
|
2013-03-31 12:36:03 +00:00
|
|
|
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
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
bool exit() override;
|
2014-05-27 03:13:37 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
void resetReference() override;
|
2014-07-07 21:37:59 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
void setPtr(const MWWorld::Ptr& npc) override;
|
|
|
|
void onFrame (float dt) override;
|
|
|
|
void clear() override { resetReference(); }
|
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;
|
2020-02-24 18:14:40 +00:00
|
|
|
MyGUI::EditBox* mFilterEdit;
|
2013-03-31 12:36:03 +00:00
|
|
|
MyGUI::TextBox* mProfitLabel;
|
|
|
|
Widgets::MWDynamicStat* mEncumbranceBar;
|
|
|
|
MessageBoxManager* mMessageBoxManager;
|
|
|
|
|
2013-05-11 16:38:27 +00:00
|
|
|
void onItemSelected(int index);
|
2020-02-24 18:14:40 +00:00
|
|
|
void onNameFilterChanged(MyGUI::EditBox* _sender);
|
2013-05-11 16:38:27 +00:00
|
|
|
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);
|
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
void onReferenceUnavailable() override;
|
2013-03-31 12:36:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|