2012-09-09 18:10:07 +00:00
|
|
|
#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:
|
2012-09-09 18:10:07 +00:00
|
|
|
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
|
|
|
|
2012-09-09 19:03:39 +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);
|
2012-09-09 18:10:07 +00:00
|
|
|
void clearSpells();
|
2012-09-08 22:17:03 +00:00
|
|
|
int mLastPos,mCurrentY;
|
|
|
|
|
|
|
|
static const int sLineHeight;
|
|
|
|
|
|
|
|
void updateLabels();
|
|
|
|
|
|
|
|
virtual void onReferenceUnavailable();
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|