|
|
|
@ -2,29 +2,15 @@
|
|
|
|
|
#define MWGUI_SPELLWINDOW_H
|
|
|
|
|
|
|
|
|
|
#include "windowpinnablebase.hpp"
|
|
|
|
|
#include "../mwworld/ptr.hpp"
|
|
|
|
|
|
|
|
|
|
namespace MWGui
|
|
|
|
|
{
|
|
|
|
|
class SpellIcons;
|
|
|
|
|
|
|
|
|
|
bool sortItems(const MWWorld::Ptr& left, const MWWorld::Ptr& right)
|
|
|
|
|
{
|
|
|
|
|
int cmp = left.getClass().getName(left).compare(
|
|
|
|
|
right.getClass().getName(right));
|
|
|
|
|
return cmp < 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool sortSpells(const std::string& left, const std::string& right)
|
|
|
|
|
{
|
|
|
|
|
const MWWorld::Store<ESM::Spell> &spells =
|
|
|
|
|
MWBase::Environment::get().getWorld()->getStore().get<ESM::Spell>();
|
|
|
|
|
|
|
|
|
|
const ESM::Spell* a = spells.find(left);
|
|
|
|
|
const ESM::Spell* b = spells.find(right);
|
|
|
|
|
bool sortItems(const MWWorld::Ptr& left, const MWWorld::Ptr& right);
|
|
|
|
|
|
|
|
|
|
int cmp = a->mName.compare(b->mName);
|
|
|
|
|
return cmp < 0;
|
|
|
|
|
}
|
|
|
|
|
bool sortSpells(const std::string& left, const std::string& right);
|
|
|
|
|
|
|
|
|
|
class SpellWindow : public WindowPinnableBase, public NoDrop
|
|
|
|
|
{
|
|
|
|
|