1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 06:53:52 +00:00
openmw-tes3mp/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 22:17:03 +00: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 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;
MyGUI::WidgetPtr mSpellsBoxWidget, mSpellsClientWidget;
MyGUI::ScrollBar* mSpellsScrollerWidget;
MWWorld::Ptr mActor;
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 updateScroller();
void onScrollChangePosition(MyGUI::ScrollBar* scroller, size_t pos);
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