1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-11 09:36:37 +00:00
OpenMW/apps/openmw/mwgui/spellwindow.hpp
dteviot 52de622e97 provide incremental update of SpellWindow (Fixes #2411)
When SpellWindow is visible, every 0.5 seconds update the cost/changes for spells/enchanted items shown.
Also, check to see if more substantial update of the window is required.
2015-04-03 17:59:13 +13:00

51 lines
1.1 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);
/// 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 onDeleteSpellAccept();
void askDeleteSpell(const std::string& spellId);
virtual void onPinToggled();
virtual void onTitleDoubleClicked();
virtual void open();
SpellView* mSpellView;
SpellIcons* mSpellIcons;
private:
float mUpdateTimer;
};
}
#endif