Merge commit 'af93f94c679456e697ec438bad9cdfdfcbed1eb8'
All checks were successful
Build / build (push) Successful in 3m58s

This commit is contained in:
2025-01-23 21:35:40 -06:00
12 changed files with 192 additions and 36 deletions

View File

@@ -22,6 +22,10 @@ void ProjectExplorer::fileOpened(ox::StringViewCR path) const noexcept {
fileChosen.emit(path);
}
void ProjectExplorer::fileDeleted(ox::StringViewCR path) const noexcept {
deleteItem.emit(path);
}
void ProjectExplorer::fileContextMenu(ox::StringViewCR path) const noexcept {
if (ImGui::BeginPopupContextItem("FileMenu", ImGuiPopupFlags_MouseButtonRight)) {
if (ImGui::MenuItem("Delete")) {

View File

@@ -28,6 +28,8 @@ class ProjectExplorer final: public FileExplorer {
protected:
void fileOpened(ox::StringViewCR path) const noexcept override;
void fileDeleted(ox::StringViewCR path) const noexcept override;
void fileContextMenu(ox::StringViewCR path) const noexcept override;
void dirContextMenu(ox::StringViewCR path) const noexcept override;

View File

@@ -225,7 +225,9 @@ void StudioUI::drawTabs() noexcept {
if (m_activeEditorOnLastDraw != e.get()) [[unlikely]] {
m_activeEditor->onActivated();
}
e->draw(m_sctx);
if (open) [[likely]] {
e->draw(m_sctx);
}
m_activeEditorOnLastDraw = e.get();
}
ImGui::EndTabItem();