Changes:
- editor project - build system fixes - dummy data editor panels mock
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#include "asset_browser_panel.hpp"
|
||||
|
||||
#include <imgui.h>
|
||||
|
||||
void AssetBrowserPanel::onUpdate(const sophia::FrameInfo&) {
|
||||
ImGui::Begin("Asset Browser");
|
||||
|
||||
ImGui::BeginChild("Folders", ImVec2(150, 0), true);
|
||||
for (int i = 0; i < static_cast<int>(folders.size()); i++) {
|
||||
if (ImGui::Selectable(folders[static_cast<size_t>(i)].name.c_str(),
|
||||
selectedFolder == i)) {
|
||||
selectedFolder = i;
|
||||
}
|
||||
}
|
||||
ImGui::EndChild();
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::BeginChild("Files", ImVec2(0, 0), true);
|
||||
const Folder& folder = folders[static_cast<size_t>(selectedFolder)];
|
||||
for (const std::string& file : folder.files) {
|
||||
ImGui::Selectable(file.c_str());
|
||||
}
|
||||
ImGui::EndChild();
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
Reference in New Issue
Block a user