Beispiel #1
0
 static void initialize()
 {
   newLinestring();
   optionalNewLinestring();
   commentOnlyLine();
   contentAndCommentLine();
   objectEnd();
   objectTypeAndName();
   line();
   autosize();
   autocalculate();
   imfSection();
   imfSectionEnd();
 }
void SkeletalAnimationSample::createHUD()
{
    hud_.setName("HUD");
    hud_.setIs2D(true);

    // Logo texture
    auto logo = hud_.addEntity<Sprite>("Logo", 64.0f, 64.0f);
    logo->setSpriteTexture("CarbonLogo.png");
    logo->alignToScreen(GUIWindow::ScreenTopLeft, Vec2(5.0f, -5.0f));

    // Crosshair
    auto crosshair = hud_.addEntity<Sprite>("Crosshair", 31.0f, 31.0f);
    crosshair->setSpriteTexture("Crosshair.png");
    crosshair->alignToScreen(GUIWindow::ScreenMiddle);

    // Add info label
    auto info = hud_.addEntity<GUIWindow>("Info", 300.0f, 35.0f);
    info->move({5.0f, 30.0f});
    info->setText("Press the left mouse button to switch between animations.\n\n"
                  "Press R to toggle ragdoll, or K to toggle rendering of the skeleton.\n"
                  "Press B to toggle display of the bounding volume.");
    info->setTextMargins(7.0f);
    info->autosize();
}