forked from teamnwah/openmw-tes3coop
add interface for tooltips to MWWorld::Class
This commit is contained in:
parent
f1b80c6ff7
commit
53b48196f9
2 changed files with 17 additions and 0 deletions
|
@ -173,4 +173,14 @@ namespace MWWorld
|
|||
{
|
||||
throw std::runtime_error ("class does not have an down sound");
|
||||
}
|
||||
|
||||
MWGui::ToolTipInfo Class::getToolTipInfo (const Ptr& ptr)
|
||||
{
|
||||
throw std::runtime_error ("class does not have a tool tip");
|
||||
}
|
||||
|
||||
bool Class::hasToolTip (const Ptr& ptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "physicssystem.hpp"
|
||||
|
||||
#include "../mwrender/renderinginterface.hpp"
|
||||
#include "../mwgui/tooltips.hpp"
|
||||
|
||||
namespace Ogre
|
||||
{
|
||||
|
@ -86,6 +87,12 @@ namespace MWWorld
|
|||
///< Return creature stats or throw an exception, if class does not have creature stats
|
||||
/// (default implementation: throw an exceoption)
|
||||
|
||||
virtual bool hasToolTip (const Ptr& ptr) const;
|
||||
///< @return true if this object has a tooltip when focused (default implementation: false)
|
||||
|
||||
virtual MWGui::ToolTipInfo getToolTipInfo (const Ptr& ptr) 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;
|
||||
///< Return NPC stats or throw an exception, if class does not have NPC stats
|
||||
/// (default implementation: throw an exceoption)
|
||||
|
|
Loading…
Reference in a new issue