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

84 lines
2.1 KiB
C++
Raw Normal View History

#ifndef MWGUI_ALCHEMY_H
#define MWGUI_ALCHEMY_H
#include <memory>
#include <vector>
#include <MyGUI_ControllerItem.h>
2018-09-18 10:57:21 +00:00
#include <components/widgets/numericeditbox.hpp>
2013-05-11 16:38:27 +00:00
#include "windowbase.hpp"
2015-01-10 00:00:52 +00:00
namespace MWMechanics
{
class Alchemy;
}
namespace MWGui
{
2013-05-11 16:38:27 +00:00
class ItemView;
class ItemWidget;
2013-05-11 16:38:27 +00:00
class SortFilterItemModel;
class AlchemyWindow : public WindowBase
{
public:
AlchemyWindow();
virtual void onOpen();
2017-09-23 20:07:30 +00:00
void onResChange(int, int) { center(); }
2013-05-11 16:38:27 +00:00
private:
2018-09-18 10:57:21 +00:00
static const float sCountChangeInitialPause; // in seconds
static const float sCountChangeInterval; // in seconds
2014-10-20 15:28:22 +00:00
std::string mSuggestedPotionName;
2013-05-11 16:38:27 +00:00
ItemView* mItemView;
SortFilterItemModel* mSortModel;
MyGUI::Button* mCreateButton;
MyGUI::Button* mCancelButton;
2012-05-25 14:20:57 +00:00
MyGUI::Widget* mEffectsBox;
2018-09-18 10:57:21 +00:00
MyGUI::Button* mIncreaseButton;
MyGUI::Button* mDecreaseButton;
MyGUI::EditBox* mNameEdit;
2018-09-18 10:57:21 +00:00
Gui::NumericEditBox* mBrewCountEdit;
void onCancelButtonClicked(MyGUI::Widget* _sender);
void onCreateButtonClicked(MyGUI::Widget* _sender);
void onIngredientSelected(MyGUI::Widget* _sender);
void onAccept(MyGUI::EditBox*);
2018-09-18 10:57:21 +00:00
void onIncreaseButtonPressed(MyGUI::Widget* _sender, int _left, int _top, MyGUI::MouseButton _id);
void onDecreaseButtonPressed(MyGUI::Widget* _sender, int _left, int _top, MyGUI::MouseButton _id);
void onCountButtonReleased(MyGUI::Widget* _sender, int _left, int _top, MyGUI::MouseButton _id);
void onCountValueChanged(int value);
void onRepeatClick(MyGUI::Widget* widget, MyGUI::ControllerItem* controller);
void addRepeatController(MyGUI::Widget* widget);
void onIncreaseButtonTriggered();
void onDecreaseButtonTriggered();
2013-05-11 16:38:27 +00:00
void onSelectedItem(int index);
void removeIngredient(MyGUI::Widget* ingredient);
2018-09-18 10:57:21 +00:00
void createPotions(int count);
void update();
std::unique_ptr<MWMechanics::Alchemy> mAlchemy;
std::vector<ItemWidget*> mApparatus;
std::vector<ItemWidget*> mIngredients;
};
}
#endif