1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +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 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:
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
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);
void clearSpells();
2012-09-08 18:17:03 -04:00
int mLastPos,mCurrentY;
static const int sLineHeight;
void updateLabels();
virtual void onReferenceUnavailable();
};
}
#endif