VR-Engage  2.3
Loading...
Searching...
No Matches
makVre::DtCommentLogic Class Reference

Detailed Description

DtCommentLogic subscribes to internal CommentMessage traffic and menu action messages. For each received network comment targeted at the local entity, it creates an entry in a dedicated "Comment" menu and drives the menu state so the user can view and dismiss comments.

#include <commentLogic.h>

Inheritance diagram for makVre::DtCommentLogic:
[legend]

Public Member Functions

 DtCommentLogic ()
 
virtual ~DtCommentLogic () override
 
virtual const char * type () const override
 
virtual bool initialize (DtPlayerStation *player, DtInitTable &config) override
 
virtual void tick (double dt) override
 
virtual void shutdown () override
 
virtual DtVreMessageResult handleMenuMessage (makVre::DtVreMessage *msg)
 
virtual DtVreMessageResult handleCommentMessage (makVre::DtVreMessage *msg)
 
- Public Member Functions inherited from makVre::DtPlayerComponent
 DtPlayerComponent ()
 
virtual ~DtPlayerComponent ()
 
virtual bool postInitialize ()
 
bool componentReady () const
 
void setComponentReady (bool ready)
 
virtual DtInitTickStatus finalizeInitTick (double dt)
 
virtual void setName (const std::string &name)
 
virtual const std::string & name ()
 
virtual DtPlayerStation & player ()
 
virtual DtAttributeHandle & playerAttributeStore ()
 
virtual const DtAttributeHandle & playerAttributeStore () const
 
virtual const DtAttributeHandle & ownshipState () const
 
virtual void setExtendedData (const std::string &key, const std::string &value, DtEntityIdentifier entity=DtEntityIdentifier::nullId())
 

Protected Attributes

DtMenu * myMenu
 
- Protected Attributes inherited from makVre::DtPlayerComponent
bool myComponentReady = true
 
std::string myName
 
DtInitTable myConfig
 
DtPlayerStation * myPlayer
 
makVrv::DtDe * myDe
 
DtEntityResolver * myResolver
 
DtAttributeCallbackManager myAttributeCallbacks
 
DtVreMessageHandlerGroup myMessageHandlers
 

Additional Inherited Members

- Protected Member Functions inherited from makVre::DtPlayerComponent
virtual void initializeStateAttributes ()
 

Constructor & Destructor Documentation

◆ DtCommentLogic()

makVre::DtCommentLogic::DtCommentLogic ( )

Constructs a new comment logic component with no menu attached yet.

◆ ~DtCommentLogic()

virtual makVre::DtCommentLogic::~DtCommentLogic ( )
overridevirtual

Virtual destructor to allow safe subclassing.

Member Function Documentation

◆ type()

virtual const char * makVre::DtCommentLogic::type ( ) const
overridevirtual

Returns the component type string used during factory registration.

Implements makVre::DtPlayerComponent.

◆ initialize()

virtual bool makVre::DtCommentLogic::initialize ( DtPlayerStation * player,
DtInitTable & config )
overridevirtual

Initializes the component, registers message handlers, and creates the comment menu if a menu manager is available from the attribute store.

Reimplemented from makVre::DtPlayerComponent.

References makVre::DtPlayerComponent::player().

◆ tick()

virtual void makVre::DtCommentLogic::tick ( double dt)
overridevirtual

Per-frame update hook. This example does not require per-tick work but keeps the standard component interface.

Implements makVre::DtPlayerComponent.

◆ shutdown()

virtual void makVre::DtCommentLogic::shutdown ( )
overridevirtual

Cleans up message handlers and releases any menu resources on shutdown.

Reimplemented from makVre::DtPlayerComponent.

◆ handleMenuMessage()

virtual DtVreMessageResult makVre::DtCommentLogic::handleMenuMessage ( makVre::DtVreMessage * msg)
virtual

Handles menu action messages generated when the user interacts with the comment menu (for example, closing a displayed comment).

◆ handleCommentMessage()

virtual DtVreMessageResult makVre::DtCommentLogic::handleCommentMessage ( makVre::DtVreMessage * msg)
virtual

Handles internal CommentMessage instances produced by the network connector and adds corresponding entries to the comment menu.

Member Data Documentation

◆ myMenu

DtMenu* makVre::DtCommentLogic::myMenu
protected

Menu used to present received comments to the player.


The documentation for this class was generated from the following file: