1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 00:35:23 +00:00
OpenMW/apps/openmw/mwgui/spellbuyingwindow.hpp

61 lines
1.4 KiB
C++
Raw Normal View History

#ifndef MWGUI_SpellBuyingWINDOW_H
#define MWGUI_SpellBuyingWINDOW_H
2012-09-08 18:17:03 -04:00
#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
2012-09-08 18:17:03 -04:00
{
public:
SpellBuyingWindow(MWBase::WindowManager& parWindowManager);
2012-09-08 18:17:03 -04:00
void startSpellBuying(MWWorld::Ptr actor);
2012-09-08 18:17:03 -04:00
protected:
MyGUI::Button* mCancelButton;
MyGUI::TextBox* mPlayerGold;
MyGUI::TextBox* mSpells;
MyGUI::TextBox* mSelect;
MyGUI::WidgetPtr mSpellsBoxWidget, mSpellsClientWidget;
MyGUI::ScrollBar* mSpellsScrollerWidget;
MWWorld::Ptr mActor;
2012-09-08 18:17:03 -04:00
std::map<MyGUI::Widget*, const ESM::Spell*> mSpellsWidgetMap;
void onCancelButtonClicked(MyGUI::Widget* _sender);
void onSpellButtonClick(MyGUI::Widget* _sender);
void updateScroller();
void onScrollChangePosition(MyGUI::ScrollBar* scroller, size_t pos);
void onMouseWheel(MyGUI::Widget* _sender, int _rel);
void addSpell(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