|
VR-Engage
2.2
|
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>
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 DtPlayerStation & | player () |
| virtual DtAttributeHandle & | playerAttributeStore () |
| virtual const DtAttributeHandle & | playerAttributeStore () const |
Protected Attributes | |
| DtMenu * | myMenu |
Protected Attributes inherited from makVre::DtPlayerComponent | |
| std::string | myName |
| DtInitTable | myConfig |
| DtPlayerStation * | myPlayer |
| makVrv::DtDe * | myDe |
| DtEntityResolver * | myResolver |
| DtAttributeCallbackManager | myAttributeCallbacks |
Additional Inherited Members | |
Protected Member Functions inherited from makVre::DtPlayerComponent | |
| virtual void | initializeStateAttributes () |
| makVre::DtCommentLogic::DtCommentLogic | ( | ) |
Constructs a new comment logic component with no menu attached yet.
|
overridevirtual |
Virtual destructor to allow safe subclassing.
|
overridevirtual |
Returns the component type string used during factory registration.
Implements makVre::DtPlayerComponent.
|
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().
|
overridevirtual |
Per-frame update hook. This example does not require per-tick work but keeps the standard component interface.
Implements makVre::DtPlayerComponent.
|
overridevirtual |
Cleans up message handlers and releases any menu resources on shutdown.
Reimplemented from makVre::DtPlayerComponent.
|
virtual |
Handles menu action messages generated when the user interacts with the comment menu (for example, closing a displayed comment).
|
virtual |
Handles internal CommentMessage instances produced by the network connector and adds corresponding entries to the comment menu.
|
protected |
Menu used to present received comments to the player.