2
3
4
5
9#include "World/World/World.h"
11#include <imgui_internal.h>
16 const std::string& panelName,
28 ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.149f, 0.16f, 0.164f, 1.0f));
29 ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(0.156f, 0.302f, 0.353f, 1.0f));
30 ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(0.156f, 0.302f, 0.353f, 1.0f));
31 ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(0.149f, 0.16f, 0.168f, 1.0f));
32 ImGui::PushStyleColor(ImGuiCol_HeaderHovered, ImGui::GetStyle().Colors[ImGuiCol_ButtonHovered]);
33 ImGui::PushStyleColor(ImGuiCol_HeaderActive, ImGui::GetStyle().Colors[ImGuiCol_ButtonActive]);
34 ImGui::PushStyleColor(ImGuiCol_PopupBg, ImGui::GetStyle().Colors[ImGuiCol_WindowBg]);
36 const ImGuiWindowFlags window_flags =
37 ImGuiWindowFlags_NoDecoration |
38 ImGuiWindowFlags_NoDocking |
39 ImGuiWindowFlags_AlwaysAutoResize |
40 ImGuiWindowFlags_NoSavedSettings |
41 ImGuiWindowFlags_NoFocusOnAppearing |
42 ImGuiWindowFlags_NoNav |
43 ImGuiWindowFlags_NoMove;
45 const ImVec2 StartPos = ImVec2(m_Owner->GetPanelPos().x + 5.0f, m_Owner->GetPanelPos().y + 5.0f);
46 ImGui::SetNextWindowPos(StartPos);
49 std::stringstream lss;
51 Begin(lss.str().c_str(), 0.0f, window_flags);
53 ImVec2 ItemSize = ImGuiH::GetLineItemSize() * 1.5f;
55 const float offset = ImGui::GetStyle().WindowPadding.y;
57 if (ImGui::Button(ICON_MD_TUNE, ImGuiH::GetLineItemSize() * 1.5f))
69 static std::string renderingMode[5] = {
72 "RTX-Interactive(Path Tracing)",
77 static int rendererSelected = 0;
82 std::string buttonName;
85 case RendererType::Rasterization:
86 buttonName =
ICON_TEXT(ICON_MD_LIGHTBULB, Rasterization);
88 case RendererType::PathTracing:
89 buttonName =
ICON_TEXT(ICON_MD_LIGHTBULB, RTX - Interactive);
93 if (ImGui::Button(buttonName.c_str(), ItemSize))
106 if (ImGui::Button(ICON_MD_REMOVE_RED_EYE, ImGuiH::GetLineItemSize() * 1.5f))
117 if (ImGui::Button(
ICON_TEXT(ICON_MD_VIDEO_CAMERA_FRONT, Perspective), ItemSize))
127 ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.0f, 0.5f));
128 if (ImGui::Button(ICON_MD_ARROW_RIGHT, ImVec2(ItemSize.y * 0.5f, ItemSize.y)))
131 ImGui::PopStyleVar();
134 ImVec2 NextPos = StartPos;
135 NextPos.x += m_Owner->GetPanelSize().x - ItemSize.x - ItemSize.y - 10.0f;
136 ImGui::SetNextWindowPos(NextPos);
138 std::stringstream rss;
140 Begin(rss.str().c_str(), 0.0f, window_flags);
141 if (ImGui::Button(
ICON_TEXT(ICON_MD_SUNNY, Stage Lights), ItemSize))
152 if (ImGui::Button(ICON_MD_LOCATION_ON, ImGuiH::GetLineItemSize() * 1.5f))
164 ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(4.0f, 4.0f));
165 ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(6.0f, 6.0f));
170 ImGui::SetNextWindowPos(StartPos + ImVec2(offset, ItemSize.y + 2.0f + offset));
174 ImGui::Begin(
"##", &open, window_flags);
177 if (ImGui::BeginMenu(
"Navigation"))
182 ImGui::MenuItem(
"Navigation Speed");
183 ImGui::SameLine(200.0f);
184 ImGui::PushItemWidth(100.0f);
185 static float test = 0.0f;
186 ImGui::DragFloat(
"##", &test);
187 ImGui::PopItemWidth();
188 ImGui::SameLine(300.0f);
192 if (ImGui::MenuItem(
"Navigation Speed Scalar")) {}
193 if (ImGui::MenuItem(
"Lock Navigation Height")) {}
194 if (ImGui::MenuItem(
"Gamepad Camera Control")) {}
196 if (ImGui::MenuItem(
"Object Centric Navigation")) {}
197 if (ImGui::MenuItem(
"Double Click Sets Interest")) {}
199 if (ImGui::MenuItem(
"Inertia Mode")) {}
200 if (ImGui::MenuItem(
"Camera Inertia")) {}
202 if (ImGui::MenuItem(
"Look Speed Horizontal")) {}
203 if (ImGui::MenuItem(
"Look Speed Vertical")) {}
204 if (ImGui::MenuItem(
"Look Speed Tumble Speed")) {}
205 if (ImGui::MenuItem(
"Zoom Speed")) {}
207 if (ImGui::MenuItem(
"Animation clamp")) {}
212 if (ImGui::BeginMenu(
"Selection"))
214 if (ImGui::MenuItem(
"Selection Color")) {}
215 if (ImGui::MenuItem(
"Selection Line Width")) {}
216 if (ImGui::MenuItem(
"Bounding Box Color")) {}
221 if (ImGui::BeginMenu(
"Grid"))
223 if (ImGui::MenuItem(
"Grid Color")) {}
224 if (ImGui::MenuItem(
"Grid Line Width")) {}
225 if (ImGui::MenuItem(
"Grid Size")) {}
226 if (ImGui::MenuItem(
"Grid Fade")) {}
231 if (ImGui::BeginMenu(
"Gizmos"))
233 if (ImGui::MenuItem(
"Gizmos Line Width")) {}
234 if (ImGui::MenuItem(
"Gizmos Constant Scale Enabled")) {}
235 if (ImGui::MenuItem(
"Gizmos Constant Scale")) {}
236 if (ImGui::MenuItem(
"Gizmos Camera Scale")) {}
237 if (ImGui::MenuItem(
"Gizmos Min FadeOut")) {}
238 if (ImGui::MenuItem(
"Gizmos Max FadeOut")) {}
243 if (ImGui::BeginMenu(
"Viewport"))
245 if (ImGui::MenuItem(
"Render Resolution Custom")) {}
247 if (ImGui::MenuItem(
"Custom Resolution")) {}
248 if (ImGui::MenuItem(
"Render Scale")) {}
249 if (ImGui::MenuItem(
"Fill Viewport")) {}
254 if (ImGui::BeginMenu(
"Viewport UI"))
256 if (ImGui::MenuItem(
"UI Background Opacity")) {}
257 if (ImGui::MenuItem(
"UI Control Brightness")) {}
262 if (ImGui::BeginMenu(
"Manipulator Transform"))
264 if (ImGui::MenuItem(
"Transform Manipulator Scale")) {}
265 if (ImGui::MenuItem(
"Enable Free Rotation")) {}
266 if (ImGui::MenuItem(
"Free Rotation Type")) {}
267 if (ImGui::MenuItem(
"Manipulator Intersection Thickness")) {}
273 ImGui::MenuItem(
"Reset To Defaults");
275 ImGui::MenuItem(
"Preferences");
282 ImGui::SetNextWindowPos(StartPos + ImVec2(ItemSize.y + offset, ItemSize.y + 2.0f + offset));
285 ImGui::Begin(
"##", &open, window_flags);
300 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.5f, 0.5f, 0.5f, 1.0f));
301 ImGui::SeparatorText(
"Rendering Settings");
302 ImGui::PopStyleColor();
315 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.5f, 0.5f, 0.5f, 1.0f));
316 ImGui::SeparatorText(
"Rendering Mode");
317 ImGui::PopStyleColor();
323 if (ImGui::MenuItem(
ICON_TEXT(
ICON_EMPTY, 3D Motion Vectors[WARNING: Flashing Colors]))) {}
343 if (ImGui::MenuItem(
ICON_TEXT(
ICON_EMPTY, PT Adaptive Sampling Error[WARNING: Flashing Colors]))) {}
381 ImGui::SetNextWindowPos(StartPos + ImVec2(ItemSize.y + ItemSize.x + 2.0f * offset, ItemSize.y + 2.0f + offset));
384 ImGui::Begin(
"##", &open, window_flags);
502 ImGui::SetNextWindowPos(StartPos + ImVec2(2.0f * ItemSize.y + ItemSize.x + 3.0f * offset, ItemSize.y + 2.0f + offset));
505 ImGui::Begin(
"##", &open, window_flags);
528 ImGui::SetNextWindowPos(NextPos + ImVec2(offset, ItemSize.y + 2.0f + offset));
531 ImGui::Begin(
"##", &open, window_flags);
537 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.5f, 0.5f, 0.5f, 1.0f));
538 ImGui::SeparatorText(
"Light Rigs");
539 ImGui::PopStyleColor();
552 ImGui::PopStyleVar(2);
553 ImGui::PopStyleColor(7);
#define ICON_TEXT(icon, text)
#define SPICES_PROFILE_ZONEN(...)
#define SPICES_PROFILE_ZONE
static FrameInfo & Get()
Get FrameInfo.
RendererType m_RendererType
The renderer type of current world.
FrameInfo Class. This class defines the FrameInfo data.
static void MainMenuTitleSeparator()
Draw main menu titile separator.
static bool DrawResetIcon(const bool &isMove)
Draw Reset Icon.
The ImGuiH Class. This class defines helper function for slate render.
ImguiSlate(const std::string &panelName, FrameInfo &frameInfo)
Constructor Function. Init with Slate's name.
const std::string & GetName() const
Get this panel Name.
This Class defines the basic behaves of specific slate. When we add an new Slate, we need inherit fro...
World Class. This class defines the basic behaves of World. When we create an new world,...