Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "imgui/imgui.h"
- #include "imgui/imgui_internal.h"
- #include "ProjectWindow.h"
- #include <cstdlib>
- #include <string.h>
- #include <cstring>
- namespace {
- void ShowProjectWindow(bool* p_open)
- {
- static char* SelectedFolder;
- ImGui::SetNextWindowSize(ImVec2(500, 440), ImGuiCond_FirstUseEver);
- ImGui::Begin(("%s", u8"\uf07b ProjectWindow"), p_open, ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_NoCollapse);
- ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0.20, 0.20, 0.20, 1.0));
- ImGui::PushStyleVar(1, ImVec2(5.0f, 8));
- ImGui::PushStyleVar(10, ImVec2(-5.0f, -5.0f));
- ImGui::BeginChild("Adress", ImVec2(0, 36), true,ImGuiWindowFlags_NoScrollbar);
- ImGui::Text("%s > %s","Project Name",SelectedFolder);
- ImGui::EndChild();
- ImGui::PopStyleVar();
- ImGui::PopStyleVar();
- ImGui::PopStyleColor();
- // left
- char* Folders[]{ "Scenes", "Shader", "Scripts", "Models", "Animations", "ArtBoards", "UI", "Stamps", "Multimedia" };
- static int selected;
- ImGui::PushStyleVar(1, ImVec2(5, 5));
- ImGui::BeginChild("left pane", ImVec2(110, 0), true);
- ImGui::PushItemWidth((ImGui::GetWindowContentRegionWidth() - ImGui::CalcItemWidth()));
- if (ImGui::Selectable(("%s", u8"\ue802 Scenes")))
- {
- selected = 0;
- }
- if (ImGui::Selectable("Shaders"))
- {
- selected = 1;
- }
- if (ImGui::Selectable(("%s", u8"\uf1c9 Scripts")))
- {
- selected = 2;
- }
- if (ImGui::Selectable(("%s", u8"\uf1b2 Models")))
- {
- selected = 3;
- }
- if (ImGui::Selectable("Animations"))
- {
- selected = 4;
- }
- if (ImGui::Selectable(("%s", u8"\uf1fc Art Boards")))
- {
- selected = 5;
- }
- if (ImGui::Selectable("UI"))
- {
- selected = 6;
- }
- if (ImGui::Selectable("Stamp"))
- {
- selected = 7;
- }
- if (ImGui::Selectable(("%s", u8"\uf008 Multimedia")))
- {
- selected = 8;
- }
- ImGui::PopStyleVar();
- ImGui::EndChild();
- ImGui::SameLine();
- // right
- ImGui::BeginGroup();
- ImGui::BeginChild("item view", ImVec2(0, -ImGui::GetFrameHeightWithSpacing())); // Leave room for 1 line below us
- switch (selected+1)
- {
- default:
- break;
- case 1:
- ImGui::Text("Scene Files Here");
- break;
- }
- ImGui::EndChild();
- ImGui::EndGroup();
- ImGui::End();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement