forked from mirror/openmw-tes3mp
Add count argument to getToolTipInfo
This commit is contained in:
parent
0d4729dcd5
commit
32d5dece58
38 changed files with 56 additions and 62 deletions
|
@ -81,12 +81,12 @@ namespace MWClass
|
|||
return (ref->mBase->mName != "");
|
||||
}
|
||||
|
||||
MWGui::ToolTipInfo Activator::getToolTipInfo (const MWWorld::ConstPtr& ptr) const
|
||||
MWGui::ToolTipInfo Activator::getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const
|
||||
{
|
||||
const MWWorld::LiveCellRef<ESM::Activator> *ref = ptr.get<ESM::Activator>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(count);
|
||||
|
||||
std::string text;
|
||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp())
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace MWClass
|
|||
virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const;
|
||||
///< @return true if this object has a tooltip when focused (default implementation: false)
|
||||
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr) const;
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const;
|
||||
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
|
||||
|
||||
virtual std::string getScript (const MWWorld::ConstPtr& ptr) const;
|
||||
|
|
|
@ -102,12 +102,12 @@ namespace MWClass
|
|||
return (ref->mBase->mName != "");
|
||||
}
|
||||
|
||||
MWGui::ToolTipInfo Apparatus::getToolTipInfo (const MWWorld::ConstPtr& ptr) const
|
||||
MWGui::ToolTipInfo Apparatus::getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const
|
||||
{
|
||||
const MWWorld::LiveCellRef<ESM::Apparatus> *ref = ptr.get<ESM::Apparatus>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(count);
|
||||
info.icon = ref->mBase->mIcon;
|
||||
|
||||
std::string text;
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace MWClass
|
|||
virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const;
|
||||
///< @return true if this object has a tooltip when focused (default implementation: false)
|
||||
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr) const;
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const;
|
||||
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
|
||||
|
||||
static void registerSelf();
|
||||
|
|
|
@ -209,12 +209,12 @@ namespace MWClass
|
|||
return (ref->mBase->mName != "");
|
||||
}
|
||||
|
||||
MWGui::ToolTipInfo Armor::getToolTipInfo (const MWWorld::ConstPtr& ptr) const
|
||||
MWGui::ToolTipInfo Armor::getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const
|
||||
{
|
||||
const MWWorld::LiveCellRef<ESM::Armor> *ref = ptr.get<ESM::Armor>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(count);
|
||||
info.icon = ref->mBase->mIcon;
|
||||
|
||||
std::string text;
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace MWClass
|
|||
virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const;
|
||||
///< @return true if this object has a tooltip when focused (default implementation: false)
|
||||
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr) const;
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const;
|
||||
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
|
||||
|
||||
virtual int getValue (const MWWorld::ConstPtr& ptr) const;
|
||||
|
|
|
@ -116,12 +116,12 @@ namespace MWClass
|
|||
return (ref->mBase->mName != "");
|
||||
}
|
||||
|
||||
MWGui::ToolTipInfo Book::getToolTipInfo (const MWWorld::ConstPtr& ptr) const
|
||||
MWGui::ToolTipInfo Book::getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const
|
||||
{
|
||||
const MWWorld::LiveCellRef<ESM::Book> *ref = ptr.get<ESM::Book>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(count);
|
||||
info.icon = ref->mBase->mIcon;
|
||||
|
||||
std::string text;
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace MWClass
|
|||
virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const;
|
||||
///< @return true if this object has a tooltip when focused (default implementation: false)
|
||||
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr) const;
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const;
|
||||
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
|
||||
|
||||
virtual int getValue (const MWWorld::ConstPtr& ptr) const;
|
||||
|
|
|
@ -165,12 +165,12 @@ namespace MWClass
|
|||
return (ref->mBase->mName != "");
|
||||
}
|
||||
|
||||
MWGui::ToolTipInfo Clothing::getToolTipInfo (const MWWorld::ConstPtr& ptr) const
|
||||
MWGui::ToolTipInfo Clothing::getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const
|
||||
{
|
||||
const MWWorld::LiveCellRef<ESM::Clothing> *ref = ptr.get<ESM::Clothing>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(count);
|
||||
info.icon = ref->mBase->mIcon;
|
||||
|
||||
std::string text;
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace MWClass
|
|||
virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const;
|
||||
///< @return true if this object has a tooltip when focused (default implementation: false)
|
||||
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr) const;
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const;
|
||||
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
|
||||
|
||||
virtual int getValue (const MWWorld::ConstPtr& ptr) const;
|
||||
|
|
|
@ -222,7 +222,7 @@ namespace MWClass
|
|||
return (ref->mBase->mName != "");
|
||||
}
|
||||
|
||||
MWGui::ToolTipInfo Container::getToolTipInfo (const MWWorld::ConstPtr& ptr) const
|
||||
MWGui::ToolTipInfo Container::getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const
|
||||
{
|
||||
const MWWorld::LiveCellRef<ESM::Container> *ref = ptr.get<ESM::Container>();
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace MWClass
|
|||
virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const;
|
||||
///< @return true if this object has a tooltip when focused (default implementation: false)
|
||||
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr) const;
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const;
|
||||
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
|
||||
|
||||
virtual MWWorld::ContainerStore& getContainerStore (const MWWorld::Ptr& ptr) const;
|
||||
|
|
|
@ -523,7 +523,7 @@ namespace MWClass
|
|||
return !customData.mCreatureStats.getAiSequence().isInCombat() || customData.mCreatureStats.isDead();
|
||||
}
|
||||
|
||||
MWGui::ToolTipInfo Creature::getToolTipInfo (const MWWorld::ConstPtr& ptr) const
|
||||
MWGui::ToolTipInfo Creature::getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const
|
||||
{
|
||||
const MWWorld::LiveCellRef<ESM::Creature> *ref = ptr.get<ESM::Creature>();
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace MWClass
|
|||
virtual bool hasToolTip(const MWWorld::ConstPtr& ptr) const;
|
||||
///< @return true if this object has a tooltip when focused (default implementation: false)
|
||||
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr) const;
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const;
|
||||
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
|
||||
|
||||
virtual MWMechanics::CreatureStats& getCreatureStats (const MWWorld::Ptr& ptr) const;
|
||||
|
|
|
@ -234,7 +234,7 @@ namespace MWClass
|
|||
return (ref->mBase->mName != "");
|
||||
}
|
||||
|
||||
MWGui::ToolTipInfo Door::getToolTipInfo (const MWWorld::ConstPtr& ptr) const
|
||||
MWGui::ToolTipInfo Door::getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const
|
||||
{
|
||||
const MWWorld::LiveCellRef<ESM::Door> *ref = ptr.get<ESM::Door>();
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace MWClass
|
|||
virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const;
|
||||
///< @return true if this object has a tooltip when focused (default implementation: false)
|
||||
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr) const;
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const;
|
||||
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
|
||||
|
||||
static std::string getDestination (const MWWorld::LiveCellRef<ESM::Door>& door);
|
||||
|
|
|
@ -115,12 +115,12 @@ namespace MWClass
|
|||
return (ref->mBase->mName != "");
|
||||
}
|
||||
|
||||
MWGui::ToolTipInfo Ingredient::getToolTipInfo (const MWWorld::ConstPtr& ptr) const
|
||||
MWGui::ToolTipInfo Ingredient::getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const
|
||||
{
|
||||
const MWWorld::LiveCellRef<ESM::Ingredient> *ref = ptr.get<ESM::Ingredient>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(count);
|
||||
info.icon = ref->mBase->mIcon;
|
||||
|
||||
std::string text;
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace MWClass
|
|||
virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const;
|
||||
///< @return true if this object has a tooltip when focused (default implementation: false)
|
||||
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr) const;
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const;
|
||||
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
|
||||
|
||||
virtual std::string getScript (const MWWorld::ConstPtr& ptr) const;
|
||||
|
|
|
@ -147,12 +147,12 @@ namespace MWClass
|
|||
return (ref->mBase->mName != "");
|
||||
}
|
||||
|
||||
MWGui::ToolTipInfo Light::getToolTipInfo (const MWWorld::ConstPtr& ptr) const
|
||||
MWGui::ToolTipInfo Light::getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const
|
||||
{
|
||||
const MWWorld::LiveCellRef<ESM::Light> *ref = ptr.get<ESM::Light>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(count);
|
||||
info.icon = ref->mBase->mIcon;
|
||||
|
||||
std::string text;
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace MWClass
|
|||
virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const;
|
||||
///< @return true if this object has a tooltip when focused (default implementation: false)
|
||||
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr) const;
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const;
|
||||
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
|
||||
|
||||
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
|
||||
|
|
|
@ -112,12 +112,12 @@ namespace MWClass
|
|||
return (ref->mBase->mName != "");
|
||||
}
|
||||
|
||||
MWGui::ToolTipInfo Lockpick::getToolTipInfo (const MWWorld::ConstPtr& ptr) const
|
||||
MWGui::ToolTipInfo Lockpick::getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const
|
||||
{
|
||||
const MWWorld::LiveCellRef<ESM::Lockpick> *ref = ptr.get<ESM::Lockpick>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(count);
|
||||
info.icon = ref->mBase->mIcon;
|
||||
|
||||
std::string text;
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace MWClass
|
|||
virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const;
|
||||
///< @return true if this object has a tooltip when focused (default implementation: false)
|
||||
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr) const;
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const;
|
||||
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
|
||||
|
||||
virtual std::string getScript (const MWWorld::ConstPtr& ptr) const;
|
||||
|
|
|
@ -130,7 +130,7 @@ namespace MWClass
|
|||
return (ref->mBase->mName != "");
|
||||
}
|
||||
|
||||
MWGui::ToolTipInfo Miscellaneous::getToolTipInfo (const MWWorld::ConstPtr& ptr) const
|
||||
MWGui::ToolTipInfo Miscellaneous::getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const
|
||||
{
|
||||
const MWWorld::LiveCellRef<ESM::Miscellaneous> *ref = ptr.get<ESM::Miscellaneous>();
|
||||
|
||||
|
@ -138,8 +138,6 @@ namespace MWClass
|
|||
|
||||
const MWWorld::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
||||
|
||||
int count = ptr.getRefData().getCount();
|
||||
|
||||
bool gold = isGold(ptr);
|
||||
if (gold)
|
||||
count *= getValue(ptr);
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace MWClass
|
|||
virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const;
|
||||
///< @return true if this object has a tooltip when focused (default implementation: false)
|
||||
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr) const;
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const;
|
||||
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
|
||||
|
||||
virtual std::string getScript (const MWWorld::ConstPtr& ptr) const;
|
||||
|
|
|
@ -922,7 +922,7 @@ namespace MWClass
|
|||
return !customData.mNpcStats.getAiSequence().isInCombat() || customData.mNpcStats.isDead();
|
||||
}
|
||||
|
||||
MWGui::ToolTipInfo Npc::getToolTipInfo (const MWWorld::ConstPtr& ptr) const
|
||||
MWGui::ToolTipInfo Npc::getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const
|
||||
{
|
||||
const MWWorld::LiveCellRef<ESM::NPC> *ref = ptr.get<ESM::NPC>();
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace MWClass
|
|||
virtual bool hasToolTip(const MWWorld::ConstPtr& ptr) const;
|
||||
///< @return true if this object has a tooltip when focused (default implementation: false)
|
||||
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr) const;
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const;
|
||||
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
|
||||
|
||||
virtual MWWorld::InventoryStore& getInventoryStore (const MWWorld::Ptr& ptr) const;
|
||||
|
|
|
@ -107,12 +107,12 @@ namespace MWClass
|
|||
return (ref->mBase->mName != "");
|
||||
}
|
||||
|
||||
MWGui::ToolTipInfo Potion::getToolTipInfo (const MWWorld::ConstPtr& ptr) const
|
||||
MWGui::ToolTipInfo Potion::getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const
|
||||
{
|
||||
const MWWorld::LiveCellRef<ESM::Potion> *ref = ptr.get<ESM::Potion>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(count);
|
||||
info.icon = ref->mBase->mIcon;
|
||||
|
||||
std::string text;
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace MWClass
|
|||
virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const;
|
||||
///< @return true if this object has a tooltip when focused (default implementation: false)
|
||||
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr) const;
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const;
|
||||
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
|
||||
|
||||
virtual std::string getScript (const MWWorld::ConstPtr& ptr) const;
|
||||
|
|
|
@ -112,12 +112,12 @@ namespace MWClass
|
|||
return (ref->mBase->mName != "");
|
||||
}
|
||||
|
||||
MWGui::ToolTipInfo Probe::getToolTipInfo (const MWWorld::ConstPtr& ptr) const
|
||||
MWGui::ToolTipInfo Probe::getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const
|
||||
{
|
||||
const MWWorld::LiveCellRef<ESM::Probe> *ref = ptr.get<ESM::Probe>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(count);
|
||||
info.icon = ref->mBase->mIcon;
|
||||
|
||||
std::string text;
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace MWClass
|
|||
virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const;
|
||||
///< @return true if this object has a tooltip when focused (default implementation: false)
|
||||
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr) const;
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const;
|
||||
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
|
||||
|
||||
virtual std::string getScript (const MWWorld::ConstPtr& ptr) const;
|
||||
|
|
|
@ -115,12 +115,12 @@ namespace MWClass
|
|||
return ref->mBase->mData.mUses;
|
||||
}
|
||||
|
||||
MWGui::ToolTipInfo Repair::getToolTipInfo (const MWWorld::ConstPtr& ptr) const
|
||||
MWGui::ToolTipInfo Repair::getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const
|
||||
{
|
||||
const MWWorld::LiveCellRef<ESM::Repair> *ref = ptr.get<ESM::Repair>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(count);
|
||||
info.icon = ref->mBase->mIcon;
|
||||
|
||||
std::string text;
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace MWClass
|
|||
virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const;
|
||||
///< @return true if this object has a tooltip when focused (default implementation: false)
|
||||
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr) const;
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const;
|
||||
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
|
||||
|
||||
virtual std::string getScript (const MWWorld::ConstPtr& ptr) const;
|
||||
|
|
|
@ -249,12 +249,12 @@ namespace MWClass
|
|||
return (ref->mBase->mName != "");
|
||||
}
|
||||
|
||||
MWGui::ToolTipInfo Weapon::getToolTipInfo (const MWWorld::ConstPtr& ptr) const
|
||||
MWGui::ToolTipInfo Weapon::getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const
|
||||
{
|
||||
const MWWorld::LiveCellRef<ESM::Weapon> *ref = ptr.get<ESM::Weapon>();
|
||||
|
||||
MWGui::ToolTipInfo info;
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||
info.caption = ref->mBase->mName + MWGui::ToolTips::getCountString(count);
|
||||
info.icon = ref->mBase->mIcon;
|
||||
|
||||
const MWWorld::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace MWClass
|
|||
virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const;
|
||||
///< @return true if this object has a tooltip when focused (default implementation: false)
|
||||
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr) const;
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const;
|
||||
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
|
||||
|
||||
virtual bool hasItemHealth (const MWWorld::ConstPtr& ptr) const;
|
||||
|
|
|
@ -115,7 +115,7 @@ namespace MWGui
|
|||
tooltipSize = createToolTip(info, true);
|
||||
}
|
||||
else
|
||||
tooltipSize = getToolTipViaPtr(true);
|
||||
tooltipSize = getToolTipViaPtr(mFocusObject.getRefData().getCount(), true);
|
||||
|
||||
MyGUI::IntPoint tooltipPosition = MyGUI::InputManager::getInstance().getMousePosition();
|
||||
position(tooltipPosition, tooltipSize, viewSize);
|
||||
|
@ -183,17 +183,13 @@ namespace MWGui
|
|||
else if (type == "ItemPtr")
|
||||
{
|
||||
mFocusObject = *focus->getUserData<MWWorld::Ptr>();
|
||||
tooltipSize = getToolTipViaPtr(false);
|
||||
tooltipSize = getToolTipViaPtr(mFocusObject.getRefData().getCount(), false);
|
||||
}
|
||||
else if (type == "ItemModelIndex")
|
||||
{
|
||||
std::pair<ItemModel::ModelIndex, ItemModel*> pair = *focus->getUserData<std::pair<ItemModel::ModelIndex, ItemModel*> >();
|
||||
mFocusObject = pair.second->getItem(pair.first).mBase;
|
||||
// HACK: To get the correct count for multiple item stack sources
|
||||
int oldCount = mFocusObject.getRefData().getCount();
|
||||
mFocusObject.getRefData().setCount(pair.second->getItem(pair.first).mCount);
|
||||
tooltipSize = getToolTipViaPtr(false);
|
||||
mFocusObject.getRefData().setCount(oldCount);
|
||||
tooltipSize = getToolTipViaPtr(pair.second->getItem(pair.first).mCount, false);
|
||||
}
|
||||
else if (type == "ToolTipInfo")
|
||||
{
|
||||
|
@ -207,7 +203,7 @@ namespace MWGui
|
|||
|
||||
mFocusObject = item;
|
||||
if (!mFocusObject.isEmpty ())
|
||||
tooltipSize = getToolTipViaPtr(false);
|
||||
tooltipSize = getToolTipViaPtr(mFocusObject.getRefData().getCount(), false);
|
||||
}
|
||||
else if (type == "Spell")
|
||||
{
|
||||
|
@ -294,7 +290,7 @@ namespace MWGui
|
|||
{
|
||||
if (!mFocusObject.isEmpty())
|
||||
{
|
||||
MyGUI::IntSize tooltipSize = getToolTipViaPtr();
|
||||
MyGUI::IntSize tooltipSize = getToolTipViaPtr(mFocusObject.getRefData().getCount());
|
||||
|
||||
setCoord(viewSize.width/2 - tooltipSize.width/2,
|
||||
std::max(0, int(mFocusToolTipY*viewSize.height - tooltipSize.height)),
|
||||
|
@ -326,7 +322,7 @@ namespace MWGui
|
|||
mFocusObject = focus;
|
||||
}
|
||||
|
||||
MyGUI::IntSize ToolTips::getToolTipViaPtr (bool image)
|
||||
MyGUI::IntSize ToolTips::getToolTipViaPtr (int count, bool image)
|
||||
{
|
||||
// this the maximum width of the tooltip before it starts word-wrapping
|
||||
setCoord(0, 0, 300, 300);
|
||||
|
@ -342,7 +338,7 @@ namespace MWGui
|
|||
{
|
||||
mDynamicToolTipBox->setVisible(true);
|
||||
|
||||
ToolTipInfo info = object.getToolTipInfo(mFocusObject);
|
||||
ToolTipInfo info = object.getToolTipInfo(mFocusObject, count);
|
||||
if (!image)
|
||||
info.icon = "";
|
||||
tooltipSize = createToolTip(info, true);
|
||||
|
|
|
@ -95,7 +95,7 @@ namespace MWGui
|
|||
|
||||
MWWorld::Ptr mFocusObject;
|
||||
|
||||
MyGUI::IntSize getToolTipViaPtr (bool image=true);
|
||||
MyGUI::IntSize getToolTipViaPtr (int count, bool image=true);
|
||||
///< @return requested tooltip size
|
||||
|
||||
MyGUI::IntSize createToolTip(const ToolTipInfo& info, bool isFocusObject);
|
||||
|
|
|
@ -267,7 +267,7 @@ namespace MWWorld
|
|||
throw std::runtime_error ("class does not have any inventory icon");
|
||||
}
|
||||
|
||||
MWGui::ToolTipInfo Class::getToolTipInfo (const ConstPtr& ptr) const
|
||||
MWGui::ToolTipInfo Class::getToolTipInfo (const ConstPtr& ptr, int count) const
|
||||
{
|
||||
throw std::runtime_error ("class does not have a tool tip");
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ namespace MWWorld
|
|||
virtual bool hasToolTip (const ConstPtr& ptr) const;
|
||||
///< @return true if this object has a tooltip when focused (default implementation: false)
|
||||
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const ConstPtr& ptr) const;
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const ConstPtr& ptr, int count) const;
|
||||
///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip.
|
||||
|
||||
virtual MWMechanics::NpcStats& getNpcStats (const Ptr& ptr) const;
|
||||
|
|
Loading…
Reference in a new issue