mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-09 03:39:14 +00:00
58 lines
1.3 KiB
C++
58 lines
1.3 KiB
C++
#ifndef MWGUI_SpellBuyingWINDOW_H
|
|
#define MWGUI_SpellBuyingWINDOW_H
|
|
|
|
#include "container.hpp"
|
|
#include "window_base.hpp"
|
|
|
|
#include "../mwworld/ptr.hpp"
|
|
|
|
namespace MyGUI
|
|
{
|
|
class Gui;
|
|
class Widget;
|
|
}
|
|
|
|
namespace MWGui
|
|
{
|
|
class WindowManager;
|
|
}
|
|
|
|
|
|
namespace MWGui
|
|
{
|
|
class SpellBuyingWindow : public ContainerBase, public WindowBase
|
|
{
|
|
public:
|
|
SpellBuyingWindow(MWBase::WindowManager& parWindowManager);
|
|
|
|
void startSpellBuying(const MWWorld::Ptr& actor);
|
|
|
|
protected:
|
|
MyGUI::Button* mCancelButton;
|
|
MyGUI::TextBox* mPlayerGold;
|
|
MyGUI::TextBox* mSpells;
|
|
MyGUI::TextBox* mSelect;
|
|
|
|
MyGUI::ScrollView* mSpellsView;
|
|
|
|
MWWorld::Ptr mActor;
|
|
|
|
std::map<MyGUI::Widget*, std::string> mSpellsWidgetMap;
|
|
|
|
void onCancelButtonClicked(MyGUI::Widget* _sender);
|
|
void onSpellButtonClick(MyGUI::Widget* _sender);
|
|
void onMouseWheel(MyGUI::Widget* _sender, int _rel);
|
|
void addSpell(const std::string& spellID);
|
|
void clearSpells();
|
|
int mLastPos,mCurrentY;
|
|
|
|
static const int sLineHeight;
|
|
|
|
void updateLabels();
|
|
|
|
virtual void onReferenceUnavailable();
|
|
};
|
|
}
|
|
|
|
#endif
|