2014-03-16 23:38:51 +01:00
|
|
|
#ifndef OPENMW_GAME_MWGUI_ITEMSELECTION_H
|
|
|
|
#define OPENMW_GAME_MWGUI_ITEMSELECTION_H
|
|
|
|
|
2015-01-10 01:21:17 +01:00
|
|
|
#include <MyGUI_Delegate.h>
|
|
|
|
|
|
|
|
#include "windowbase.hpp"
|
|
|
|
|
|
|
|
namespace MWWorld
|
|
|
|
{
|
|
|
|
class Ptr;
|
|
|
|
}
|
2012-08-26 10:52:06 +02:00
|
|
|
|
|
|
|
namespace MWGui
|
|
|
|
{
|
2013-05-11 18:38:27 +02:00
|
|
|
class ItemView;
|
|
|
|
class SortFilterItemModel;
|
|
|
|
class InventoryItemModel;
|
2012-08-26 10:52:06 +02:00
|
|
|
|
2013-05-11 18:38:27 +02:00
|
|
|
class ItemSelectionDialog : public WindowModal
|
2012-08-26 10:52:06 +02:00
|
|
|
{
|
|
|
|
public:
|
2013-05-11 18:38:27 +02:00
|
|
|
ItemSelectionDialog(const std::string& label);
|
2012-08-26 10:52:06 +02:00
|
|
|
|
2017-09-23 12:18:39 +02:00
|
|
|
virtual bool exit();
|
2014-05-27 13:50:24 -04:00
|
|
|
|
2012-08-26 10:52:06 +02:00
|
|
|
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
|
|
|
typedef MyGUI::delegates::CMultiDelegate1<MWWorld::Ptr> EventHandle_Item;
|
|
|
|
|
|
|
|
EventHandle_Item eventItemSelected;
|
|
|
|
EventHandle_Void eventDialogCanceled;
|
|
|
|
|
2013-05-11 18:38:27 +02:00
|
|
|
void openContainer (const MWWorld::Ptr& container);
|
|
|
|
void setCategory(int category);
|
|
|
|
void setFilter(int filter);
|
2012-08-26 10:52:06 +02:00
|
|
|
|
|
|
|
private:
|
2013-05-11 18:38:27 +02:00
|
|
|
ItemView* mItemView;
|
|
|
|
SortFilterItemModel* mSortModel;
|
|
|
|
InventoryItemModel* mModel;
|
2012-08-26 10:52:06 +02:00
|
|
|
|
2013-05-11 18:38:27 +02:00
|
|
|
void onSelectedItem(int index);
|
2012-08-26 10:52:06 +02:00
|
|
|
|
|
|
|
void onCancelButtonClicked(MyGUI::Widget* sender);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
2014-03-16 23:38:51 +01:00
|
|
|
|
|
|
|
#endif
|