VR-Engage  2.2
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 ()
 
virtual void setName (const std::string &name)
 
virtual const std::string & name ()
 
virtual DtPlayerStationplayer ()
 
virtual DtAttributeHandleplayerAttributeStore ()
 
virtual const DtAttributeHandleplayerAttributeStore () const
 

Protected Attributes

DtMenumyMenu
 
- Protected Attributes inherited from makVre::DtPlayerComponent
std::string myName
 
DtInitTable myConfig
 
DtPlayerStationmyPlayer
 
makVrv::DtDe * myDe
 
DtEntityResolvermyResolver
 
DtAttributeCallbackManager myAttributeCallbacks
 

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: