1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-12 03:36:32 +00:00
OpenMW/apps/openmw/mwgui/spellbuyingwindow.hpp

54 lines
1.2 KiB
C++
Raw Normal View History

#ifndef MWGUI_SpellBuyingWINDOW_H
#define MWGUI_SpellBuyingWINDOW_H
2012-09-08 22:17:03 +00:00
#include "window_base.hpp"
2012-09-22 22:36:20 +00:00
#include "referenceinterface.hpp"
2012-09-08 22:17:03 +00:00
namespace MyGUI
{
class Gui;
class Widget;
}
namespace MWGui
{
class WindowManager;
}
namespace MWGui
{
2012-09-22 22:36:20 +00:00
class SpellBuyingWindow : public ReferenceInterface, public WindowBase
2012-09-08 22:17:03 +00:00
{
public:
SpellBuyingWindow(MWBase::WindowManager& parWindowManager);
2012-09-08 22:17:03 +00:00
2012-09-09 19:08:57 +00:00
void startSpellBuying(const MWWorld::Ptr& actor);
2012-09-08 22:17:03 +00:00
protected:
MyGUI::Button* mCancelButton;
MyGUI::TextBox* mPlayerGold;
MyGUI::TextBox* mSpells;
MyGUI::TextBox* mSelect;
2012-09-10 12:10:01 +00:00
MyGUI::ScrollView* mSpellsView;
2012-09-08 22:17:03 +00:00
std::map<MyGUI::Widget*, std::string> mSpellsWidgetMap;
2012-09-08 22:17:03 +00:00
void onCancelButtonClicked(MyGUI::Widget* _sender);
void onSpellButtonClick(MyGUI::Widget* _sender);
void onMouseWheel(MyGUI::Widget* _sender, int _rel);
2012-09-09 19:08:57 +00:00
void addSpell(const std::string& spellID);
void clearSpells();
2012-09-08 22:17:03 +00:00
int mLastPos,mCurrentY;
static const int sLineHeight;
void updateLabels();
virtual void onReferenceUnavailable();
};
}
#endif