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