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

64 lines
1.5 KiB
C++
Raw Normal View History

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:
CompanionWindow(DragAndDrop* dragAndDrop, MessageBoxManager* manager);
2013-03-31 12:36:03 +00:00
bool exit() override;
void resetReference() override;
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;
int mSelectedItem;
2013-05-11 16:38:27 +00:00
DragAndDrop* mDragAndDrop;
2013-03-31 12:36:03 +00:00
MyGUI::Button* mCloseButton;
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);
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);
void onReferenceUnavailable() override;
2013-03-31 12:36:03 +00:00
};
}
#endif