mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-29 18:32:36 +00:00
55 lines
1.3 KiB
C++
55 lines
1.3 KiB
C++
#ifndef MWGUI_SPELLWINDOW_H
|
|
#define MWGUI_SPELLWINDOW_H
|
|
|
|
#include <memory>
|
|
|
|
#include "spellicons.hpp"
|
|
#include "spellmodel.hpp"
|
|
#include "windowpinnablebase.hpp"
|
|
|
|
namespace MWGui
|
|
{
|
|
class SpellView;
|
|
|
|
class SpellWindow : public WindowPinnableBase, public NoDrop
|
|
{
|
|
public:
|
|
SpellWindow(DragAndDrop* drag);
|
|
|
|
void updateSpells();
|
|
|
|
void onFrame(float dt) override;
|
|
|
|
/// Cycle to next/previous spell
|
|
void cycle(bool next);
|
|
|
|
std::string_view getWindowIdForLua() const override { return "Magic"; }
|
|
|
|
protected:
|
|
MyGUI::Widget* mEffectBox;
|
|
|
|
ESM::RefId mSpellToDelete;
|
|
|
|
void onEnchantedItemSelected(MWWorld::Ptr item, bool alreadyEquipped);
|
|
void onSpellSelected(const ESM::RefId& spellId);
|
|
void onModelIndexSelected(SpellModel::ModelIndex index);
|
|
void onFilterChanged(MyGUI::EditBox* sender);
|
|
void onDeleteClicked(MyGUI::Widget* widget);
|
|
void onDeleteSpellAccept();
|
|
void askDeleteSpell(const ESM::RefId& spellId);
|
|
|
|
void onPinToggled() override;
|
|
void onTitleDoubleClicked() override;
|
|
void onOpen() override;
|
|
|
|
SpellView* mSpellView;
|
|
std::unique_ptr<SpellIcons> mSpellIcons;
|
|
MyGUI::EditBox* mFilterEdit;
|
|
|
|
private:
|
|
float mUpdateTimer;
|
|
};
|
|
}
|
|
|
|
#endif
|