2013-03-03 11:01:19 +00:00
|
|
|
#ifndef MWGUI_SPELLICONS_H
|
|
|
|
#define MWGUI_SPELLICONS_H
|
|
|
|
|
|
|
|
#include <string>
|
2013-11-15 19:29:47 +00:00
|
|
|
#include <vector>
|
2013-03-03 11:01:19 +00:00
|
|
|
|
|
|
|
#include "../mwmechanics/magiceffects.hpp"
|
|
|
|
|
|
|
|
namespace MyGUI
|
|
|
|
{
|
|
|
|
class Widget;
|
|
|
|
class ImageBox;
|
|
|
|
}
|
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
struct ENAMstruct;
|
|
|
|
struct EffectList;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace MWGui
|
|
|
|
{
|
|
|
|
|
|
|
|
// information about a single magic effect source as required for display in the tooltip
|
|
|
|
struct MagicEffectInfo
|
|
|
|
{
|
2013-07-31 16:46:32 +00:00
|
|
|
MagicEffectInfo()
|
2015-04-25 18:37:42 +00:00
|
|
|
: mMagnitude(0)
|
2014-12-20 19:56:44 +00:00
|
|
|
, mRemainingTime(0.f)
|
|
|
|
, mTotalTime(0.f)
|
2015-04-25 18:37:42 +00:00
|
|
|
, mPermanent(false)
|
2013-07-31 16:46:32 +00:00
|
|
|
{}
|
2013-03-03 11:01:19 +00:00
|
|
|
std::string mSource; // display name for effect source (e.g. potion name)
|
|
|
|
MWMechanics::EffectKey mKey;
|
|
|
|
int mMagnitude;
|
|
|
|
float mRemainingTime;
|
2014-12-20 19:56:44 +00:00
|
|
|
float mTotalTime;
|
2013-03-03 11:01:19 +00:00
|
|
|
bool mPermanent; // the effect is permanent
|
|
|
|
};
|
|
|
|
|
2013-11-15 19:29:47 +00:00
|
|
|
class EffectSourceVisitor : public MWMechanics::EffectSourceVisitor
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
bool mIsPermanent;
|
|
|
|
|
|
|
|
std::map <int, std::vector<MagicEffectInfo> > mEffectSources;
|
|
|
|
|
2014-05-15 01:12:52 +00:00
|
|
|
virtual ~EffectSourceVisitor() {}
|
|
|
|
|
2013-11-17 22:15:57 +00:00
|
|
|
virtual void visit (MWMechanics::EffectKey key,
|
2015-01-05 17:52:37 +00:00
|
|
|
const std::string& sourceName, const std::string& sourceId, int casterActorId,
|
2014-12-20 19:56:44 +00:00
|
|
|
float magnitude, float remainingTime = -1, float totalTime = -1);
|
2013-11-15 19:29:47 +00:00
|
|
|
};
|
|
|
|
|
2013-03-03 11:01:19 +00:00
|
|
|
class SpellIcons
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void updateWidgets(MyGUI::Widget* parent, bool adjustSize);
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
std::map<int, MyGUI::ImageBox*> mWidgetMap;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|