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