2012-05-29 09:02:22 +02:00
|
|
|
#ifndef MWGUI_SPELLWINDOW_H
|
|
|
|
#define MWGUI_SPELLWINDOW_H
|
|
|
|
|
2013-04-10 00:32:05 -04:00
|
|
|
#include "windowpinnablebase.hpp"
|
2014-03-17 13:21:28 +01:00
|
|
|
#include "../mwworld/ptr.hpp"
|
2012-05-29 09:02:22 +02:00
|
|
|
|
2014-12-15 13:13:25 +01:00
|
|
|
#include "spellmodel.hpp"
|
|
|
|
|
2012-05-29 09:02:22 +02:00
|
|
|
namespace MWGui
|
|
|
|
{
|
2013-03-03 12:01:19 +01:00
|
|
|
class SpellIcons;
|
2014-12-15 13:13:25 +01:00
|
|
|
class SpellView;
|
2014-03-16 23:38:51 +01:00
|
|
|
|
2014-01-26 14:47:01 +01:00
|
|
|
class SpellWindow : public WindowPinnableBase, public NoDrop
|
2012-05-29 09:02:22 +02:00
|
|
|
{
|
|
|
|
public:
|
2014-01-26 14:47:01 +01:00
|
|
|
SpellWindow(DragAndDrop* drag);
|
2013-03-03 12:01:19 +01:00
|
|
|
virtual ~SpellWindow();
|
2012-05-29 09:02:22 +02:00
|
|
|
|
2012-05-29 12:35:03 +02:00
|
|
|
void updateSpells();
|
|
|
|
|
2015-04-03 17:59:13 +13:00
|
|
|
void onFrame(float dt);
|
2014-01-26 14:47:01 +01:00
|
|
|
|
2014-12-15 15:23:03 +01:00
|
|
|
/// Cycle to next/previous spell
|
|
|
|
void cycle(bool next);
|
|
|
|
|
2012-05-29 09:02:22 +02:00
|
|
|
protected:
|
|
|
|
MyGUI::Widget* mEffectBox;
|
|
|
|
|
2012-05-29 15:13:44 +02:00
|
|
|
std::string mSpellToDelete;
|
|
|
|
|
2014-12-15 13:13:25 +01:00
|
|
|
void onEnchantedItemSelected(MWWorld::Ptr item, bool alreadyEquipped);
|
|
|
|
void onSpellSelected(const std::string& spellId);
|
|
|
|
void onModelIndexSelected(SpellModel::ModelIndex index);
|
2018-05-24 10:48:46 +04:00
|
|
|
void onFilterChanged(MyGUI::EditBox *sender);
|
2012-05-29 15:13:44 +02:00
|
|
|
void onDeleteSpellAccept();
|
2015-02-18 19:06:36 +01:00
|
|
|
void askDeleteSpell(const std::string& spellId);
|
2012-05-29 15:13:44 +02:00
|
|
|
|
|
|
|
virtual void onPinToggled();
|
2014-08-04 17:03:47 +02:00
|
|
|
virtual void onTitleDoubleClicked();
|
2017-09-22 17:10:53 +02:00
|
|
|
virtual void onOpen();
|
2013-03-03 12:01:19 +01:00
|
|
|
|
2014-12-15 13:13:25 +01:00
|
|
|
SpellView* mSpellView;
|
2013-03-03 12:01:19 +01:00
|
|
|
SpellIcons* mSpellIcons;
|
2018-05-24 10:48:46 +04:00
|
|
|
MyGUI::EditBox* mFilterEdit;
|
2015-04-03 17:59:13 +13:00
|
|
|
|
|
|
|
private:
|
|
|
|
float mUpdateTimer;
|
2012-05-29 09:02:22 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|