2012-05-24 13:57:23 +00:00
|
|
|
#ifndef MWGUI_ALCHEMY_H
|
|
|
|
#define MWGUI_ALCHEMY_H
|
|
|
|
|
2012-09-30 17:05:45 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2017-04-28 15:30:26 +00:00
|
|
|
#include "../mwmechanics/alchemy.hpp"
|
|
|
|
|
2012-07-03 11:15:20 +00:00
|
|
|
#include "widgets.hpp"
|
2013-05-11 16:38:27 +00:00
|
|
|
#include "windowbase.hpp"
|
2012-05-24 13:57:23 +00:00
|
|
|
|
2015-01-10 00:00:52 +00:00
|
|
|
namespace MWMechanics
|
|
|
|
{
|
|
|
|
class Alchemy;
|
|
|
|
}
|
|
|
|
|
2012-05-24 13:57:23 +00:00
|
|
|
namespace MWGui
|
|
|
|
{
|
2013-05-11 16:38:27 +00:00
|
|
|
class ItemView;
|
2014-06-05 20:13:18 +00:00
|
|
|
class ItemWidget;
|
2013-05-11 16:38:27 +00:00
|
|
|
class SortFilterItemModel;
|
|
|
|
|
|
|
|
class AlchemyWindow : public WindowBase
|
2012-05-24 13:57:23 +00:00
|
|
|
{
|
|
|
|
public:
|
2013-04-10 18:46:21 +00:00
|
|
|
AlchemyWindow();
|
2012-05-25 10:58:28 +00:00
|
|
|
|
2012-05-25 13:24:33 +00:00
|
|
|
virtual void open();
|
2014-05-27 03:13:37 +00:00
|
|
|
virtual void exit();
|
2012-05-25 13:24:33 +00:00
|
|
|
|
2013-05-11 16:38:27 +00:00
|
|
|
private:
|
2014-10-20 15:28:22 +00:00
|
|
|
std::string mSuggestedPotionName;
|
|
|
|
|
2013-05-11 16:38:27 +00:00
|
|
|
ItemView* mItemView;
|
|
|
|
SortFilterItemModel* mSortModel;
|
|
|
|
|
2012-05-25 10:58:28 +00:00
|
|
|
MyGUI::Button* mCreateButton;
|
|
|
|
MyGUI::Button* mCancelButton;
|
|
|
|
|
2012-05-25 14:20:57 +00:00
|
|
|
MyGUI::Widget* mEffectsBox;
|
|
|
|
|
2012-05-25 16:00:13 +00:00
|
|
|
MyGUI::EditBox* mNameEdit;
|
|
|
|
|
2012-05-25 10:58:28 +00:00
|
|
|
void onCancelButtonClicked(MyGUI::Widget* _sender);
|
|
|
|
void onCreateButtonClicked(MyGUI::Widget* _sender);
|
2012-05-25 13:24:33 +00:00
|
|
|
void onIngredientSelected(MyGUI::Widget* _sender);
|
|
|
|
|
2013-05-11 16:38:27 +00:00
|
|
|
void onSelectedItem(int index);
|
2012-05-25 13:24:33 +00:00
|
|
|
|
2012-05-25 16:00:13 +00:00
|
|
|
void removeIngredient(MyGUI::Widget* ingredient);
|
|
|
|
|
2012-05-25 13:24:33 +00:00
|
|
|
void update();
|
2013-04-10 04:32:05 +00:00
|
|
|
|
2017-04-28 15:30:26 +00:00
|
|
|
std::unique_ptr<MWMechanics::Alchemy> mAlchemy;
|
2012-09-30 17:05:45 +00:00
|
|
|
|
2014-06-05 20:13:18 +00:00
|
|
|
std::vector<ItemWidget*> mApparatus;
|
|
|
|
std::vector<ItemWidget*> mIngredients;
|
2012-05-24 13:57:23 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|