Is anyone having trouble to create custom application commands for the button click ?
It seems I can get it to work sometimes after rebuilding my application, but sometimes nothing happens.
I can't get it to consistently populate the menu ( there should be a menu with the profile name set to nav3d interface here if I understand correctly ) :
Here is the code I'm currently using to create a list of custom commands based on what I saw in the navlib_viewer project :
Code: Select all
using TDx::SpaceMouse::CCategory;
using TDx::SpaceMouse::CCommand;
using TDx::SpaceMouse::CCommandSet;
// The root action set node
CCommandSet commandSet("Default", "Modeling");
// CCategory category("MenuItem Category", "Category");
CCommand command("MenuItem Command","Command");
CCommand command1("MenuItem Command1","Command1");
CCommand command2("MenuItem Command2","Command2");
commandSet.push_back(std::move(command));
commandSet.push_back(std::move(command1));
commandSet.push_back(std::move(command2));
// commandSet.push_back(std::move(category));
// CCategory category1("MenuItem Category1", "Category1");
CCommand command3("MenuItem Command3","Command3");
CCommand command4("MenuItem Command4","Command4");
CCommand command5("MenuItem Command5","Command5");
commandSet.push_back(std::move(command3));
commandSet.push_back(std::move(command4));
commandSet.push_back(std::move(command5));
// commandSet.push_back(std::move(category1));
// commandSet.push_back(std::move(category));
nav3d::AddCommandSet(commandSet);
nav3d::ActiveCommands = commandSet.Id;
What am I doing wrong ?