| 335 | { |
| 336 | float top = 0.5 + _textYOffset; |
| 337 | PackedColor fColor(Color(1, 1, 1, _alpha)); |
| 338 | const TitleShadowOffset shadow = SubtitleShadowOffset(GEngine->Width2D(), GEngine->Height2D()); |
| 339 | for (int i = 0; i < _texts.Size(); i++) |
| 340 | { |
| 341 | RString text = _texts[i]; |
| 342 | float width = GEngine->GetTextWidth(_textSize, _textFont, text); |
| 343 | float x = 0.5 - width * 0.5; |
| 344 | PackedColor bColor(Color(0, 0, 0, _alpha * 0.3)); |
| 345 | GEngine->DrawText(Point2DFloat(x + shadow.x, top + shadow.y), _textSize, _textFont, bColor, text); |
| 346 | GEngine->DrawText(Point2DFloat(x, top), _textSize, _textFont, fColor, text); |
| 347 | top += _textSize; |
| 348 | } |
| 349 | } |
| 350 | |
| 351 | void TitleEffectBasic::DrawObject() |
| 352 | { |
| 353 | if (!GScene->GetCamera()) |
| 354 | { |
| 355 | return; |
| 356 | } |
| 357 | // temporary override camera |
| 358 | Camera oldCam = *GScene->GetCamera(); |
| 359 | Camera cam; |
| 360 | cam.SetPosition(_objectCamera); |
| 361 | |
| 362 | float fov = 0.7; |
nothing calls this directly
no test coverage detected