mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
renamed Widgets::MWEnchantment to Widgets::MWEffectList so it can be
reused for potion effects
This commit is contained in:
parent
f733382f74
commit
b82c39c8be
5 changed files with 16 additions and 14 deletions
|
@ -124,6 +124,8 @@ namespace MWClass
|
|||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight);
|
||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
||||
|
||||
ESM::EffectList list = ref->base->effects;
|
||||
|
||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
||||
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
||||
text += MWGui::ToolTips::getMiscString(ref->base->script, "Script");
|
||||
|
|
|
@ -233,7 +233,7 @@ IntSize ToolTips::createToolTip(const ToolTipInfo& info)
|
|||
|
||||
IntCoord coord(0, 6, totalSize.width, 24);
|
||||
|
||||
Widgets::MWEnchantmentPtr enchantWidget = enchantArea->createWidget<Widgets::MWEnchantment>
|
||||
Widgets::MWEffectListPtr enchantWidget = enchantArea->createWidget<Widgets::MWEffectList>
|
||||
("MW_StatName", coord, Align::Default, "ToolTipEnchantWidget");
|
||||
enchantWidget->setWindowManager(mWindowManager);
|
||||
enchantWidget->setEnchantmentId(info.enchant);
|
||||
|
|
|
@ -266,20 +266,20 @@ MWSpell::~MWSpell()
|
|||
{
|
||||
}
|
||||
|
||||
/* MWEnchantment */
|
||||
/* MWEffectList */
|
||||
|
||||
MWEnchantment::MWEnchantment()
|
||||
MWEffectList::MWEffectList()
|
||||
: mWindowManager(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
void MWEnchantment::setEnchantmentId(const std::string &enchantId)
|
||||
void MWEffectList::setEnchantmentId(const std::string &enchantId)
|
||||
{
|
||||
id = enchantId;
|
||||
updateWidgets();
|
||||
}
|
||||
|
||||
void MWEnchantment::createEffectWidgets(std::vector<MyGUI::WidgetPtr> &effects, MyGUI::WidgetPtr creator, MyGUI::IntCoord &coord, bool center, bool constant)
|
||||
void MWEffectList::createEffectWidgets(std::vector<MyGUI::WidgetPtr> &effects, MyGUI::WidgetPtr creator, MyGUI::IntCoord &coord, bool center, bool constant)
|
||||
{
|
||||
const ESMS::ESMStore &store = mWindowManager->getStore();
|
||||
const ESM::Enchantment *enchant = store.enchants.search(id);
|
||||
|
@ -324,16 +324,16 @@ void MWEnchantment::createEffectWidgets(std::vector<MyGUI::WidgetPtr> &effects,
|
|||
coord.width = maxwidth;
|
||||
}
|
||||
|
||||
void MWEnchantment::updateWidgets()
|
||||
void MWEffectList::updateWidgets()
|
||||
{
|
||||
}
|
||||
|
||||
void MWEnchantment::initialiseOverride()
|
||||
void MWEffectList::initialiseOverride()
|
||||
{
|
||||
Base::initialiseOverride();
|
||||
}
|
||||
|
||||
MWEnchantment::~MWEnchantment()
|
||||
MWEffectList::~MWEffectList()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -145,11 +145,11 @@ namespace MWGui
|
|||
};
|
||||
typedef MWSpell* MWSpellPtr;
|
||||
|
||||
class MYGUI_EXPORT MWEnchantment : public Widget
|
||||
class MYGUI_EXPORT MWEffectList : public Widget
|
||||
{
|
||||
MYGUI_RTTI_DERIVED( MWEnchantment );
|
||||
MYGUI_RTTI_DERIVED( MWEffectList );
|
||||
public:
|
||||
MWEnchantment();
|
||||
MWEffectList();
|
||||
|
||||
typedef MWMechanics::Stat<int> EnchantmentValue;
|
||||
|
||||
|
@ -168,7 +168,7 @@ namespace MWGui
|
|||
const std::string &getSpellId() const { return id; }
|
||||
|
||||
protected:
|
||||
virtual ~MWEnchantment();
|
||||
virtual ~MWEffectList();
|
||||
|
||||
virtual void initialiseOverride();
|
||||
|
||||
|
@ -178,7 +178,7 @@ namespace MWGui
|
|||
WindowManager* mWindowManager;
|
||||
std::string id;
|
||||
};
|
||||
typedef MWEnchantment* MWEnchantmentPtr;
|
||||
typedef MWEffectList* MWEffectListPtr;
|
||||
|
||||
class MYGUI_EXPORT MWSpellEffect : public Widget
|
||||
{
|
||||
|
|
|
@ -104,7 +104,7 @@ WindowManager::WindowManager(
|
|||
MyGUI::FactoryManager::getInstance().registerFactory<MWGui::Widgets::MWSkill>("Widget");
|
||||
MyGUI::FactoryManager::getInstance().registerFactory<MWGui::Widgets::MWAttribute>("Widget");
|
||||
MyGUI::FactoryManager::getInstance().registerFactory<MWGui::Widgets::MWSpell>("Widget");
|
||||
MyGUI::FactoryManager::getInstance().registerFactory<MWGui::Widgets::MWEnchantment>("Widget");
|
||||
MyGUI::FactoryManager::getInstance().registerFactory<MWGui::Widgets::MWEffectList>("Widget");
|
||||
MyGUI::FactoryManager::getInstance().registerFactory<MWGui::Widgets::MWSpellEffect>("Widget");
|
||||
MyGUI::FactoryManager::getInstance().registerFactory<MWGui::Widgets::MWDynamicStat>("Widget");
|
||||
|
||||
|
|
Loading…
Reference in a new issue