1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-05 15:55:45 +00:00
OpenMW/apps/openmw/mwgui/spellwindow.hpp

55 lines
1.3 KiB
C++
Raw Normal View History

#ifndef MWGUI_SPELLWINDOW_H
#define MWGUI_SPELLWINDOW_H
#include "windowpinnablebase.hpp"
2014-03-17 12:21:28 +00:00
#include "../mwworld/ptr.hpp"
namespace MWGui
{
2013-03-03 11:01:19 +00:00
class SpellIcons;
2014-03-17 12:21:28 +00:00
bool sortItems(const MWWorld::Ptr& left, const MWWorld::Ptr& right);
2014-03-17 12:21:28 +00:00
bool sortSpells(const std::string& left, const std::string& right);
class SpellWindow : public WindowPinnableBase, public NoDrop
{
public:
SpellWindow(DragAndDrop* drag);
2013-03-03 11:01:19 +00:00
virtual ~SpellWindow();
2012-05-29 10:35:03 +00:00
void updateSpells();
void onFrame(float dt) { NoDrop::onFrame(dt); }
protected:
MyGUI::ScrollView* mSpellView;
MyGUI::Widget* mEffectBox;
2012-05-29 10:35:03 +00:00
int mHeight;
int mWidth;
MyGUI::IntSize mWindowSize;
std::string mSpellToDelete;
2012-05-29 10:35:03 +00:00
void addGroup(const std::string& label, const std::string& label2);
int estimateHeight(int numSpells) const;
void onWindowResize(MyGUI::Window* _sender);
void onEnchantedItemSelected(MyGUI::Widget* _sender);
void onSpellSelected(MyGUI::Widget* _sender);
void onMouseWheel(MyGUI::Widget* _sender, int _rel);
void onDeleteSpellAccept();
virtual void onPinToggled();
virtual void onTitleDoubleClicked();
2012-05-29 10:35:03 +00:00
virtual void open();
2013-03-03 11:01:19 +00:00
SpellIcons* mSpellIcons;
};
}
#endif