| 337 | } |
| 338 | |
| 339 | void PlaceholderObject::DrawEditorLabel() { |
| 340 | PROFILER_ZONE(g_profiler_ctx, "DrawEditorLabel"); |
| 341 | if (prev_editor_label != editor_label || editor_label_scale != editor_label_scale_prev) { |
| 342 | ClearEditorLabel(); |
| 343 | } |
| 344 | |
| 345 | if (title_debug_string_id == -1 && editor_label.empty() == false) { |
| 346 | title_debug_string_id = DebugDraw::Instance()->AddText(vec3(0.0f), editor_label, editor_label_scale, _persistent, _DD_NO_FLAG); |
| 347 | prev_editor_label = editor_label; |
| 348 | editor_label_scale_prev = editor_label_scale; |
| 349 | label_position_update = true; |
| 350 | } |
| 351 | |
| 352 | if ((label_position_update || editor_label_offset != editor_label_offset_prev) && title_debug_string_id != -1) { |
| 353 | DebugDraw::Instance()->SetPosition(title_debug_string_id, GetTranslation() + editor_label_offset * GetScale()[1]); |
| 354 | editor_label_offset_prev = editor_label_offset; |
| 355 | label_position_update = false; |
| 356 | } |
| 357 | } |
| 358 | |
| 359 | void PlaceholderObject::ClearEditorLabel() { |
| 360 | if (title_debug_string_id != -1) { |
nothing calls this directly
no test coverage detected