|
|
|
|
@ -144,7 +144,12 @@ namespace editor
|
|
|
|
|
ImGui::PushFont(GUI::GetInstance().GetFont(GuiFont::FONT_ROBO_SMALL));
|
|
|
|
|
ImGui::TextUnformatted(mpEditor->GetProject()->MakeRelativeToAssets(mSelectedDir, true).string().c_str());
|
|
|
|
|
ImGui::PopFont();
|
|
|
|
|
if (ImGui::Button("Back"))
|
|
|
|
|
|
|
|
|
|
// Prevent the back button from leaving the projects asset directory
|
|
|
|
|
std::string parent = mSelectedDir.parent_path().lexically_normal().string();
|
|
|
|
|
std::string assets_str = mpEditor->GetProject()->GetAssetDirectory().lexically_normal().string();
|
|
|
|
|
size_t loc = parent.find(assets_str);
|
|
|
|
|
if (ImGui::Button("Back") && (loc != std::string::npos))
|
|
|
|
|
{
|
|
|
|
|
mSelectedDir = mSelectedDir.parent_path();
|
|
|
|
|
mSyncTree = true;
|
|
|
|
|
|