SpiecsEngine
 
Loading...
Searching...
No Matches
ImguiViewportToolBar.cpp
Go to the documentation of this file.
1/**
2* @file ImguiViewportToolBar.cpp.
3* @brief The ImguiViewportToolBar Class Implementation.
4* @author Spices.
5*/
6
7#include "Pchheader.h"
9#include "World/World/World.h"
10
11#include <imgui_internal.h>
12
13namespace Spices {
14
16 const std::string& panelName,
17 FrameInfo& frameInfo,
18 ImguiSlate* owner
19 )
20 : ImguiSlate(panelName, frameInfo)
21 , m_Owner(owner)
22 {}
23
25 {
27
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]);
35
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;
44
45 const ImVec2 StartPos = ImVec2(m_Owner->GetPanelPos().x + 5.0f, m_Owner->GetPanelPos().y + 5.0f);
46 ImGui::SetNextWindowPos(StartPos);
47
48 bool open = true;
49 std::stringstream lss;
50 lss << m_Owner->GetName() << "_" << "Left ToolBar";
51 Begin(lss.str().c_str(), 0.0f, window_flags);
52
53 ImVec2 ItemSize = ImGuiH::GetLineItemSize() * 1.5f;
54 ItemSize.x *= 4.0f;
55 const float offset = ImGui::GetStyle().WindowPadding.y;
56
57 if (ImGui::Button(ICON_MD_TUNE, ImGuiH::GetLineItemSize() * 1.5f))
58 {
60 m_RenderMenuOn = false;
61 m_ViewMenuOn = false;
62 m_CameraMenuOn = false;
63 m_LightMenuOn = false;
64 m_WayPointOn = false;
65 }
66 ImGui::SameLine();
67
68
69 static std::string renderingMode[5] = {
70 "Rasterization",
71 "RTX-Real-Time",
72 "RTX-Interactive(Path Tracing)",
73 "RTX-Accurate(lray)",
74 "Pixar-Storm"
75 };
76
77 static int rendererSelected = 0;
78
79 {
80 SPICES_PROFILE_ZONEN("ImguiViewportToolBar::RendererMode");
81
82 std::string buttonName;
84 {
85 case RendererType::Rasterization:
86 buttonName = ICON_TEXT(ICON_MD_LIGHTBULB, Rasterization);
87 break;
88 case RendererType::PathTracing:
89 buttonName = ICON_TEXT(ICON_MD_LIGHTBULB, RTX - Interactive);
90 break;
91 }
92
93 if (ImGui::Button(buttonName.c_str(), ItemSize))
94 {
95 m_OptionMenuOn = false;
97 m_ViewMenuOn = false;
98 m_CameraMenuOn = false;
99 m_LightMenuOn = false;
100 m_WayPointOn = false;
101 }
102
103 ImGui::SameLine();
104 }
105
106 if (ImGui::Button(ICON_MD_REMOVE_RED_EYE, ImGuiH::GetLineItemSize() * 1.5f))
107 {
108 m_OptionMenuOn = false;
109 m_RenderMenuOn = false;
111 m_CameraMenuOn = false;
112 m_LightMenuOn = false;
113 m_WayPointOn = false;
114
115 }
116 ImGui::SameLine();
117 if (ImGui::Button(ICON_TEXT(ICON_MD_VIDEO_CAMERA_FRONT, Perspective), ItemSize))
118 {
119 m_OptionMenuOn = false;
120 m_RenderMenuOn = false;
121 m_ViewMenuOn = false;
123 m_LightMenuOn = false;
124 m_WayPointOn = false;
125 }
126 ImGui::SameLine();
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)))
129 {
130 }
131 ImGui::PopStyleVar();
132 End();
133
134 ImVec2 NextPos = StartPos;
135 NextPos.x += m_Owner->GetPanelSize().x - ItemSize.x - ItemSize.y - 10.0f;
136 ImGui::SetNextWindowPos(NextPos);
137
138 std::stringstream rss;
139 rss << m_Owner->GetName() << "_" << "Right ToolBar";
140 Begin(rss.str().c_str(), 0.0f, window_flags);
141 if (ImGui::Button(ICON_TEXT(ICON_MD_SUNNY, Stage Lights), ItemSize))
142 {
143 m_OptionMenuOn = false;
144 m_RenderMenuOn = false;
145 m_ViewMenuOn = false;
146 m_CameraMenuOn = false;
148 m_WayPointOn = false;
149
150 }
151 ImGui::SameLine();
152 if (ImGui::Button(ICON_MD_LOCATION_ON, ImGuiH::GetLineItemSize() * 1.5f))
153 {
154 m_OptionMenuOn = false;
155 m_RenderMenuOn = false;
156 m_ViewMenuOn = false;
157 m_CameraMenuOn = false;
158 m_LightMenuOn = false;
160
161 }
162 End();
163
164 ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(4.0f, 4.0f));
165 ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(6.0f, 6.0f));
166 //ImGui::PushItemFlag(ImGuiItemFlags_SelectableDontClosePopup, true);
167
168 if (m_OptionMenuOn)
169 {
170 ImGui::SetNextWindowPos(StartPos + ImVec2(offset, ItemSize.y + 2.0f + offset));
171
172 bool open;
173
174 ImGui::Begin("##", &open, window_flags);
176
177 if (ImGui::BeginMenu("Navigation"))
178 {
180
181 ImGui::BeginGroup();
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);
190 ImGui::EndGroup();
191
192 if (ImGui::MenuItem("Navigation Speed Scalar")) {}
193 if (ImGui::MenuItem("Lock Navigation Height")) {}
194 if (ImGui::MenuItem("Gamepad Camera Control")) {}
195 ImGui::Separator();
196 if (ImGui::MenuItem("Object Centric Navigation")) {}
197 if (ImGui::MenuItem("Double Click Sets Interest")) {}
198 ImGui::Separator();
199 if (ImGui::MenuItem("Inertia Mode")) {}
200 if (ImGui::MenuItem("Camera Inertia")) {}
201 ImGui::Separator();
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")) {}
206 ImGui::Separator();
207 if (ImGui::MenuItem("Animation clamp")) {}
208
209 ImGui::EndMenu();
210 }
211
212 if (ImGui::BeginMenu("Selection"))
213 {
214 if (ImGui::MenuItem("Selection Color")) {}
215 if (ImGui::MenuItem("Selection Line Width")) {}
216 if (ImGui::MenuItem("Bounding Box Color")) {}
217
218 ImGui::EndMenu();
219 }
220
221 if (ImGui::BeginMenu("Grid"))
222 {
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")) {}
227
228 ImGui::EndMenu();
229 }
230
231 if (ImGui::BeginMenu("Gizmos"))
232 {
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")) {}
239
240 ImGui::EndMenu();
241 }
242
243 if (ImGui::BeginMenu("Viewport"))
244 {
245 if (ImGui::MenuItem("Render Resolution Custom")) {}
246 // todo here.
247 if (ImGui::MenuItem("Custom Resolution")) {}
248 if (ImGui::MenuItem("Render Scale")) {}
249 if (ImGui::MenuItem("Fill Viewport")) {}
250
251 ImGui::EndMenu();
252 }
253
254 if (ImGui::BeginMenu("Viewport UI"))
255 {
256 if (ImGui::MenuItem("UI Background Opacity")) {}
257 if (ImGui::MenuItem("UI Control Brightness")) {}
258
259 ImGui::EndMenu();
260 }
261
262 if (ImGui::BeginMenu("Manipulator Transform"))
263 {
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")) {}
268
269 ImGui::EndMenu();
270 }
271
272 ImGui::Separator();
273 ImGui::MenuItem("Reset To Defaults");
274 ImGui::Separator();
275 ImGui::MenuItem("Preferences");
276
277 ImGui::End();
278 }
279
280 if (m_RenderMenuOn)
281 {
282 ImGui::SetNextWindowPos(StartPos + ImVec2(ItemSize.y + offset, ItemSize.y + 2.0f + offset));
283
284 bool open;
285 ImGui::Begin("##", &open, window_flags);
287
288 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Rasterization)))
289 {
291 }
292 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, RTX-Real-Time))) {}
293 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, RTX-Interactive(Path Tracing))))
294 {
297 }
298 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, RTX-Accurate(lray)))) {}
299 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Pixar-Storm))) {}
300 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.5f, 0.5f, 0.5f, 1.0f));
301 ImGui::SeparatorText("Rendering Settings");
302 ImGui::PopStyleColor();
303 if (ImGui::BeginMenu(ICON_TEXT(ICON_EMPTY, Load from Preset)))
304 {
305 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Draft))) {}
306 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Medium))) {}
307 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Final))) {}
308 ImGui::Separator();
309 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Load Preset From File))) {}
310
311 ImGui::EndMenu();
312 }
313 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Save Current as Preset))) {}
314 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Reset to Defaults))) {}
315 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.5f, 0.5f, 0.5f, 1.0f));
316 ImGui::SeparatorText("Rendering Mode");
317 ImGui::PopStyleColor();
318 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Default))) {}
319 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Wireframe))) {}
320 if (ImGui::BeginMenu(ICON_TEXT(ICON_EMPTY, Debug View)))
321 {
322 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Off))) {}
323 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, 3D Motion Vectors[WARNING: Flashing Colors]))) {}
324 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Barycentrics))) {}
325 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Beauty After Tonemap))) {}
326 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Beauty Before Tonemap))) {}
327 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Depth))) {}
328 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Instance ID))) {}
329 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Interpolated Normal))) {}
330 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Heat Map: Any Hit))) {}
331 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Heat Map: Intersection))) {}
332 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Heat Map: Timing))) {}
333 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, SDG: Cross Correspondence))) {}
334 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, SDG: Motion))) {}
335 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Semantic ID))) {}
336 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Tangent U))) {}
337 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Tangent V))) {}
338 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Texture Coordinates 0))) {}
339 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Texture Coordinates 1))) {}
340 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Triangle Normal))) {}
341 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Triangle Normal(OctEnc)))) {}
342 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Wireframe))) {}
343 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT Adaptive Sampling Error[WARNING: Flashing Colors]))) {}
344 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT Denoised Result))) {}
345 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT Noisy Result))) {}
346 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT AOV Background))) {}
347 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT AOV Diffuse Filter))) {}
348 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT AOV Direct illumation))) {}
349 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT AOV Global illumation))) {}
350 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT AOV Reflections))) {}
351 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT AOV Reflection Filter))) {}
352 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT AOV Refractions))) {}
353 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT AOV Refraction Filter))) {}
354 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT AOV Self-illumination))) {}
355 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT AOV Volumes))) {}
356 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT AOV World Normal))) {}
357 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT AOV World Postion))) {}
358 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT AOV Z-Depth))) {}
359 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT AOV Multimatte0))) {}
360 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT AOV Multimatte1))) {}
361 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT AOV Multimatte2))) {}
362 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT AOV Multimatte3))) {}
363 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT AOV Multimatte4))) {}
364 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT AOV Multimatte5))) {}
365 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT AOV Multimatte6))) {}
366 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, PT AOV Multimatte7))) {}
367
368 ImGui::EndMenu();
369 }
370 ImGui::Separator();
371 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Camera Light))) {}
372 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Disable Materials(White Mode)))) {}
373 ImGui::Separator();
374 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Preferences))) {}
375
376 ImGui::End();
377 }
378
379 if (m_ViewMenuOn)
380 {
381 ImGui::SetNextWindowPos(StartPos + ImVec2(ItemSize.y + ItemSize.x + 2.0f * offset, ItemSize.y + 2.0f + offset));
382
383 bool open;
384 ImGui::Begin("##", &open, window_flags);
386
387 if (ImGui::BeginMenu(ICON_TEXT(ICON_EMPTY, Heads Up Display)))
388 {
389 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, FPS))) {}
390 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Device Memory))) {}
391 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Process Memory))) {}
392 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Resolution))) {}
393 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Progress))) {}
394 ImGui::Separator();
395 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Camera Speed))) {}
396
397 ImGui::EndMenu();
398 }
399 if (ImGui::BeginMenu(ICON_TEXT(ICON_EMPTY, Show By Type)))
400 {
401 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Camera))) {}
402 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Lights))) {}
403 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Skeletons))) {}
404 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Audio))) {}
405 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Waypoint))) {}
406 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Units))) {}
407 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Measurements))) {}
408 ImGui::Separator();
409 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Meshes))) {}
410 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, NavMesh))) {}
411 if (ImGui::BeginMenu(ICON_TEXT(ICON_EMPTY, Physics)))
412 {
413 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Joints))) {}
414 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Simulation Settings))) {}
415 if (ImGui::BeginMenu(ICON_TEXT(ICON_EMPTY, Colliders)))
416 {
417 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, None))) {}
418 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Selected))) {}
419 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, All))) {}
420 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Simplify at Distance))) {}
421 ImGui::Separator();
422 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Normals))) {}
423
424 ImGui::EndMenu();
425 }
426 if (ImGui::BeginMenu(ICON_TEXT(ICON_EMPTY, Mesh Properties)))
427 {
428 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, None))) {}
429 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Selected))) {}
430 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, All))) {}
431
432 ImGui::EndMenu();
433 }
434 if (ImGui::BeginMenu(ICON_TEXT(ICON_EMPTY, Tendons)))
435 {
436 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, None))) {}
437 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Selected))) {}
438 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, All))) {}
439
440 ImGui::EndMenu();
441 }
442 if (ImGui::BeginMenu(ICON_TEXT(ICON_EMPTY, Deformable Body)))
443 {
444 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, None))) {}
445 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Selected))) {}
446 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, All))) {}
447 ImGui::Separator();
448 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Simulation))) {}
449 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Collision))) {}
450
451 ImGui::EndMenu();
452 }
453 if (ImGui::BeginMenu(ICON_TEXT(ICON_EMPTY, Attachments)))
454 {
455 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, None))) {}
456 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Selected))) {}
457 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, All))) {}
458 ImGui::Separator();
459 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Hide Actor 0))) {}
460 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Hide Actor 1))) {}
461
462 ImGui::EndMenu();
463 }
464 if (ImGui::BeginMenu(ICON_TEXT(ICON_EMPTY, Particles)))
465 {
466 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, None))) {}
467 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Selected))) {}
468 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, All))) {}
469 ImGui::Separator();
470 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Particles))) {}
471 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Flush Surface))) {}
472 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Cloth Particles))) {}
473 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Cloth Mesh))) {}
474 ImGui::Separator();
475 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Diffuse Particles))) {}
476
477 ImGui::EndMenu();
478 }
479 ImGui::EndMenu();
480 }
481
482 ImGui::EndMenu();
483 }
484 if (ImGui::BeginMenu(ICON_TEXT(ICON_EMPTY, Show By Purpose)))
485 {
486 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Guide))) {}
487 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Proxy))) {}
488 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Render))) {}
489
490 ImGui::EndMenu();
491 }
492 ImGui::Separator();
493 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Selection Outline))) {}
494 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Axis))) {}
495 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Grid))) {}
496
497 ImGui::End();
498 }
499
500 if (m_CameraMenuOn)
501 {
502 ImGui::SetNextWindowPos(StartPos + ImVec2(2.0f * ItemSize.y + ItemSize.x + 3.0f * offset, ItemSize.y + 2.0f + offset));
503
504 bool open;
505 ImGui::Begin("##", &open, window_flags);
507
508 if (ImGui::BeginMenu(ICON_TEXT(ICON_EMPTY, Cameras)))
509 {
510 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, No camera))) {}
511
512 ImGui::EndMenu();
513 }
514 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Perspective))) {}
515 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Top))) {}
516 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Front))) {}
517 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Right))) {}
518 ImGui::Separator();
519 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Sequencer Camera Sync))) {}
520 ImGui::Separator();
521 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Create from View))) {}
522
523 ImGui::End();
524 }
525
526 if (m_LightMenuOn)
527 {
528 ImGui::SetNextWindowPos(NextPos + ImVec2(offset, ItemSize.y + 2.0f + offset));
529
530 bool open;
531 ImGui::Begin("##", &open, window_flags);
533
534 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Lights Off))) {}
535 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Camera Light))) {}
536 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Stage Lights))) {}
537 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.5f, 0.5f, 0.5f, 1.0f));
538 ImGui::SeparatorText("Light Rigs");
539 ImGui::PopStyleColor();
540 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Colored Lights))) {}
541 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Dafault))) {}
542 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Grey Studio))) {}
543 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Sunny Sky))) {}
544 ImGui::Separator();
545 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Use auto light rig on startup))) {}
546 ImGui::Separator();
547 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Add Current Light Rig to Stage))) {}
548 ImGui::End();
549 }
550
551 //ImGui::PopItemFlag();
552 ImGui::PopStyleVar(2);
553 ImGui::PopStyleColor(7);
554 }
555}
#define ICON_TEXT(icon, text)
Definition ImguiHelper.h:24
#define ICON_EMPTY
Definition ImguiHelper.h:26
#define SPICES_PROFILE_ZONEN(...)
#define SPICES_PROFILE_ZONE
static FrameInfo & Get()
Get FrameInfo.
Definition FrameInfo.cpp:14
RendererType m_RendererType
The renderer type of current world.
Definition FrameInfo.h:99
FrameInfo Class. This class defines the FrameInfo data.
Definition FrameInfo.h:32
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.
Definition ImguiHelper.h:61
void End()
End a slate.
ImguiSlate(const std::string &panelName, FrameInfo &frameInfo)
Constructor Function. Init with Slate's name.
Definition ImguiUtils.h:35
const std::string & GetName() const
Get this panel Name.
Definition ImguiUtils.h:144
This Class defines the basic behaves of specific slate. When we add an new Slate, we need inherit fro...
Definition ImguiUtils.h:27
ImguiSlate * m_Owner
The owner, usually is a ImguiViewport class.
ImguiViewportToolBar(const std::string &panelName, FrameInfo &frameInfo, ImguiSlate *owner)
Constructor Function.
virtual void OnRender() override
This interface is called On SlateRenderer Render.
@ FrushStableFrame
Definition World.h:48
World Class. This class defines the basic behaves of World. When we create an new world,...
Definition World.h:41
RendererType
Definition FrameInfo.h:22