Advertisement
Guest User

test

a guest
Aug 20th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  1. #include "imgui/imgui.h"
  2. #include "imgui/imgui_internal.h"
  3. #include "ProjectWindow.h"
  4. #include <cstdlib>
  5. #include <string.h>
  6. #include <cstring>
  7. namespace {
  8.  
  9.  
  10. void ShowProjectWindow(bool* p_open)
  11. {
  12.  
  13. static char* SelectedFolder;
  14. ImGui::SetNextWindowSize(ImVec2(500, 440), ImGuiCond_FirstUseEver);
  15. ImGui::Begin(("%s", u8"\uf07b ProjectWindow"), p_open, ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_NoCollapse);
  16.  
  17. ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0.20, 0.20, 0.20, 1.0));
  18. ImGui::PushStyleVar(1, ImVec2(5.0f, 8));
  19. ImGui::PushStyleVar(10, ImVec2(-5.0f, -5.0f));
  20. ImGui::BeginChild("Adress", ImVec2(0, 36), true,ImGuiWindowFlags_NoScrollbar);
  21. ImGui::Text("%s > %s","Project Name",SelectedFolder);
  22.  
  23. ImGui::EndChild();
  24. ImGui::PopStyleVar();
  25. ImGui::PopStyleVar();
  26. ImGui::PopStyleColor();
  27. // left
  28. char* Folders[]{ "Scenes", "Shader", "Scripts", "Models", "Animations", "ArtBoards", "UI", "Stamps", "Multimedia" };
  29. static int selected;
  30. ImGui::PushStyleVar(1, ImVec2(5, 5));
  31. ImGui::BeginChild("left pane", ImVec2(110, 0), true);
  32.  
  33. ImGui::PushItemWidth((ImGui::GetWindowContentRegionWidth() - ImGui::CalcItemWidth()));
  34. if (ImGui::Selectable(("%s", u8"\ue802 Scenes")))
  35. {
  36. selected = 0;
  37. }
  38.  
  39. if (ImGui::Selectable("Shaders"))
  40. {
  41. selected = 1;
  42. }
  43. if (ImGui::Selectable(("%s", u8"\uf1c9 Scripts")))
  44. {
  45. selected = 2;
  46. }
  47. if (ImGui::Selectable(("%s", u8"\uf1b2 Models")))
  48. {
  49. selected = 3;
  50. }
  51. if (ImGui::Selectable("Animations"))
  52. {
  53. selected = 4;
  54. }
  55. if (ImGui::Selectable(("%s", u8"\uf1fc Art Boards")))
  56. {
  57. selected = 5;
  58. }
  59. if (ImGui::Selectable("UI"))
  60. {
  61. selected = 6;
  62. }
  63. if (ImGui::Selectable("Stamp"))
  64. {
  65. selected = 7;
  66. }
  67. if (ImGui::Selectable(("%s", u8"\uf008 Multimedia")))
  68. {
  69. selected = 8;
  70. }
  71. ImGui::PopStyleVar();
  72. ImGui::EndChild();
  73. ImGui::SameLine();
  74.  
  75. // right
  76. ImGui::BeginGroup();
  77. ImGui::BeginChild("item view", ImVec2(0, -ImGui::GetFrameHeightWithSpacing())); // Leave room for 1 line below us
  78.  
  79. switch (selected+1)
  80. {
  81. default:
  82. break;
  83. case 1:
  84. ImGui::Text("Scene Files Here");
  85. break;
  86. }
  87.  
  88.  
  89.  
  90.  
  91.  
  92. ImGui::EndChild();
  93.  
  94. ImGui::EndGroup();
  95.  
  96. ImGui::End();
  97. }
  98. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement