1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-24 13:43:43 +00:00

59 lines
1.1 KiB
C++
Raw Normal View History

#ifndef OPENMW_MWGUI_RECHARGE_H
#define OPENMW_MWGUI_RECHARGE_H
#include <memory>
#include "windowbase.hpp"
2015-01-10 03:56:06 +01:00
namespace MWWorld
{
class Ptr;
}
namespace MWGui
{
2022-09-22 21:26:05 +03:00
class ItemSelectionDialog;
class ItemWidget;
class ItemChargeView;
2022-09-22 21:26:05 +03:00
class Recharge : public WindowBase
{
public:
Recharge();
2022-09-22 21:26:05 +03:00
void onOpen() override;
2022-09-22 21:26:05 +03:00
void setPtr(const MWWorld::Ptr& gem) override;
2023-07-09 08:42:09 +02:00
std::string_view getWindowIdForLua() const override { return "Recharge"; }
2022-09-22 21:26:05 +03:00
protected:
ItemChargeView* mBox;
2022-09-22 21:26:05 +03:00
MyGUI::Widget* mGemBox;
2022-09-22 21:26:05 +03:00
ItemWidget* mGemIcon;
2017-04-16 16:52:56 +04:00
2022-09-22 21:26:05 +03:00
std::unique_ptr<ItemSelectionDialog> mItemSelectionDialog;
2022-09-22 21:26:05 +03:00
MyGUI::TextBox* mChargeLabel;
2022-09-22 21:26:05 +03:00
MyGUI::Button* mCancelButton;
2022-09-22 21:26:05 +03:00
void updateView();
2017-04-16 16:52:56 +04:00
2022-09-22 21:26:05 +03:00
void onSelectItem(MyGUI::Widget* sender);
2017-04-16 16:52:56 +04:00
2022-09-22 21:26:05 +03:00
void onItemSelected(MWWorld::Ptr item);
void onItemCancel();
2022-09-22 21:26:05 +03:00
void onItemClicked(MyGUI::Widget* sender, const MWWorld::Ptr& item);
void onCancel(MyGUI::Widget* sender);
void onMouseWheel(MyGUI::Widget* _sender, int _rel);
};
}
#endif