| 677 | } |
| 678 | |
| 679 | void drawTitle() |
| 680 | { |
| 681 | DisplayInfo info; |
| 682 | TFE_RenderBackend::getDisplayInfo(&info); |
| 683 | const s32 winWidth = info.width; |
| 684 | |
| 685 | const Project* project = project_get(); |
| 686 | char fullTitle[1024]; |
| 687 | const char* title = project->active ? project->name : c_readOnly; |
| 688 | if (s_editorAssetType == TYPE_LEVEL) |
| 689 | { |
| 690 | sprintf(fullTitle, "%s - %s", title, LevelEditor::s_level.name.c_str()); |
| 691 | if (LevelEditor::levelIsDirty()) |
| 692 | { |
| 693 | strcat(fullTitle, "*"); |
| 694 | } |
| 695 | } |
| 696 | else |
| 697 | { |
| 698 | strcpy(fullTitle, title); |
| 699 | } |
| 700 | const s32 titleWidth = (s32)ImGui::CalcTextSize(fullTitle).x; |
| 701 | |
| 702 | const ImVec4 titleColor = getTextColor(project->active ? TEXTCLR_TITLE_ACTIVE : TEXTCLR_TITLE_INACTIVE); |
| 703 | ImGui::SameLine(f32((winWidth - titleWidth)/2)); |
| 704 | ImGui::TextColored(titleColor, "%s", fullTitle); |
| 705 | } |
| 706 | |
| 707 | void popupCallback_openAssetBrowser(EditorPopup popupId) |
| 708 | { |
no test coverage detected