本文整理汇总了C++中Axis::GetDescription方法的典型用法代码示例。如果您正苦于以下问题:C++ Axis::GetDescription方法的具体用法?C++ Axis::GetDescription怎么用?C++ Axis::GetDescription使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Axis
的用法示例。
在下文中一共展示了Axis::GetDescription方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
/**
* @brief
* Test: Controller
*/
void Application30::TestController()
{
// Start
System::GetInstance()->GetConsole().Print("Controller 'GameBoy'\n");
System::GetInstance()->GetConsole().Print('\n');
// Create test controller
GameBoyController cController;
// List all controls
System::GetInstance()->GetConsole().Print("Controls:\n");
const List<Control*> &lstControls = cController.GetControls();
for (uint32 i=0; i<lstControls.GetNumOfElements(); i++) {
// Get control
Control *pControl = lstControls[i];
if (pControl->GetType() == ControlButton)
System::GetInstance()->GetConsole().Print("- Button '" + pControl->GetName() + "' [" + pControl->GetDescription() + "]\n");
else if (pControl->GetType() == ControlAxis)
System::GetInstance()->GetConsole().Print("- Axis '" + pControl->GetName() + "' [" + pControl->GetDescription() + "]\n");
}
System::GetInstance()->GetConsole().Print('\n');
// List buttons
System::GetInstance()->GetConsole().Print("Buttons:\n");
const List<Button*> &lstButtons = cController.GetButtons();
for (uint32 i=0; i<lstButtons.GetNumOfElements(); i++) {
Button *pButton = lstButtons[i];
System::GetInstance()->GetConsole().Print("- Button '" + pButton->GetName() + "' [" + pButton->GetDescription() + "]\n");
}
System::GetInstance()->GetConsole().Print('\n');
// List axes
System::GetInstance()->GetConsole().Print("Axes:\n");
const List<Axis*> &lstAxes = cController.GetAxes();
for (uint32 i=0; i<lstAxes.GetNumOfElements(); i++) {
Axis *pAxis = lstAxes[i];
System::GetInstance()->GetConsole().Print("- Axis '" + pAxis->GetName() + "' [" + pAxis->GetDescription() + "]\n");
}
System::GetInstance()->GetConsole().Print('\n');
// Done
System::GetInstance()->GetConsole().Print('\n');
}