mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 20:36:42 +00:00
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");
|
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 "physicssystem.hpp"
|
||||||
|
|
||||||
#include "../mwrender/renderinginterface.hpp"
|
#include "../mwrender/renderinginterface.hpp"
|
||||||
|
#include "../mwgui/tooltips.hpp"
|
||||||
|
|
||||||
namespace Ogre
|
namespace Ogre
|
||||||
{
|
{
|
||||||
|
@ -86,6 +87,12 @@ namespace MWWorld
|
||||||
///< Return creature stats or throw an exception, if class does not have creature stats
|
///< Return creature stats or throw an exception, if class does not have creature stats
|
||||||
/// (default implementation: throw an exceoption)
|
/// (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;
|
virtual MWMechanics::NpcStats& getNpcStats (const Ptr& ptr) const;
|
||||||
///< Return NPC stats or throw an exception, if class does not have NPC stats
|
///< Return NPC stats or throw an exception, if class does not have NPC stats
|
||||||
/// (default implementation: throw an exceoption)
|
/// (default implementation: throw an exceoption)
|
||||||
|
|
Loading…
Reference in a new issue