104 virtual void tick(
double dt)
override;
112 virtual const char*
type()
const override;
168 RoleListItem(
const std::string& _name,
bool _slotOccupied,
bool _roleEngaged)
Table-based access to Lua state for configuration data.
Definition initializer.h:38
virtual DtPlayerStation & player()
Gets the player station.
DtPlayerComponent()
Constructor.
Class for managing the user interface for engaged roles.
Definition playerStation.h:51
std::string myHasAvailableRolesAttributeName
Name of the attribute indicating if there are available roles.
Definition roleSelectionControl.h:192
virtual void tick(double dt) override
Called every frame to update the component state.
DtInputLogic myInputLogic
Input logic for handling role selection bindings.
Definition roleSelectionControl.h:204
virtual void selectRole(const std::string &roleName)
Switches to a specific role on the ownship entity.
std::vector< RoleListItem > myRolesList
List of roles available on the current entity.
Definition roleSelectionControl.h:186
virtual const char * type() const override
Returns the type identifier for this component.
unsigned int myRoleIndex
Index of the current role in the roles list.
Definition roleSelectionControl.h:189
virtual DtVreMessageResult handleSimState(DtVreMessage *msg)
Handles simulation state messages.
virtual bool postInitialize() override
Performs post-initialization after all components are initialized.
std::string mySelectRoleMenuAction
Name of the menu action for selecting a role.
Definition roleSelectionControl.h:198
virtual ~DtRoleSelectionControl() override
Virtual destructor for DtRoleSelectionControl.
std::string myAvailableRolesAttributeName
Name of the attribute containing the list of available roles.
Definition roleSelectionControl.h:195
virtual DtVreMessageResult handleMenuAction(DtVreMessage *msg)
Handles menu action messages.
virtual void shutdown() override
Shuts down the role selection control component.
virtual bool initialize(DtPlayerStation *player, DtInitTable &config) override
Initializes the role selection control component.
virtual void nextRole(double keyState)
Input handler for cycling to the next available role.
bool myIsStackedRole
Flag indicating if this is a stacked role (embarked) versus direct-engaged.
Definition roleSelectionControl.h:201
virtual DtVreMessageResult handleEntityEmbarkationInformation(DtVreMessage *msg)
Handles entity embarkation information messages.
virtual void previousRole(double keyState)
Input handler for cycling to the previous available role.
DtRoleSelectionControl()
Constructor for DtRoleSelectionControl.
virtual void updateAvailableRolesAttribute()
Updates the available roles state attributes.
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
constexpr const char * inputConfigGroup
Definition roleSelectionControl.h:46
constexpr const char * hasAvailableRolesAttributeName
Definition roleSelectionControl.h:40
constexpr const char * nextRoleBinding
Definition roleSelectionControl.h:49
constexpr const char * previousRoleBinding
Definition roleSelectionControl.h:52
constexpr const char * excludedRoles
Definition roleSelectionControl.h:37
constexpr const char * rolesList
Definition roleSelectionControl.h:55
constexpr const char * selectRoleMenuAction
Definition roleSelectionControl.h:58
constexpr const char * availableRolesAttributeName
Definition roleSelectionControl.h:34
constexpr const char * inputConfigFile
Definition roleSelectionControl.h:43
Defines export/import macros for the vreCommonComponents library.
#define VRECOMMONCOMPONENTS_DLL
DLL export/import macro for the vreCommonComponents library.
Definition export.h:28
Definition roleSelectionControl.h:26
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
constexpr const char * DtRoleSelectionControlType
Type identifier for DtRoleSelectionControl component.
Definition roleSelectionControl.h:64
DtVreMessageResult
Enumeration of possible message handling results.
Definition vreMessage.h:33
Defines the DtPlayerComponent base class for VR-Engage role components.
bool slotOccupied
Flag indicating if the corresponding slot is occupied.
Definition roleSelectionControl.h:179
std::string name
Name of the role.
Definition roleSelectionControl.h:176
bool roleEngaged
Flag indicating if the role is currently engaged by another player.
Definition roleSelectionControl.h:182
RoleListItem(const std::string &_name, bool _slotOccupied, bool _roleEngaged)
Constructor for RoleListItem.
Definition roleSelectionControl.h:168
Defines the base class for all VREngage messages.