1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 21:19:57 +00:00
openmw-tes3mp/apps/openmw/mwgui/spellwindow.hpp
2020-10-16 22:18:54 +04:00

53 lines
1.3 KiB
C++

#ifndef MWGUI_SPELLWINDOW_H
#define MWGUI_SPELLWINDOW_H
#include "windowpinnablebase.hpp"
#include "../mwworld/ptr.hpp"
#include "spellmodel.hpp"
namespace MWGui
{
class SpellIcons;
class SpellView;
class SpellWindow : public WindowPinnableBase, public NoDrop
{
public:
SpellWindow(DragAndDrop* drag);
virtual ~SpellWindow();
void updateSpells();
void onFrame(float dt) override;
/// Cycle to next/previous spell
void cycle(bool next);
protected:
MyGUI::Widget* mEffectBox;
std::string mSpellToDelete;
void onEnchantedItemSelected(MWWorld::Ptr item, bool alreadyEquipped);
void onSpellSelected(const std::string& spellId);
void onModelIndexSelected(SpellModel::ModelIndex index);
void onFilterChanged(MyGUI::EditBox *sender);
void onDeleteClicked(MyGUI::Widget *widget);
void onDeleteSpellAccept();
void askDeleteSpell(const std::string& spellId);
void onPinToggled() override;
void onTitleDoubleClicked() override;
void onOpen() override;
SpellView* mSpellView;
SpellIcons* mSpellIcons;
MyGUI::EditBox* mFilterEdit;
private:
float mUpdateTimer;
};
}
#endif