SpiecsEngine
 
Loading...
Searching...
No Matches
ImguiUtilities.cpp
Go to the documentation of this file.
1/**
2* @file ImguiUtilities.cpp.
3* @brief The ImguiUtilities Class Implementation.
4* @author Spices.
5*/
6
7#include "Pchheader.h"
9#include "Systems/SlateSystem.h"
10#include "Debugger/ImguiDebugger.h"
11#include "Statistics/ImguiStatistics.h"
12
13namespace Spices {
14
16 const std::string& panelName ,
17 FrameInfo& frameInfo
18 )
19 : ImguiSlate(panelName, frameInfo)
20 {
22
23 /**
24 * @brief Instance.
25 */
26 m_ImguiDebugger = SlateSystem::GetRegister()->Register<ImguiDebugger>(false, "Debugger");
27 m_ImguiStatistics = SlateSystem::GetRegister()->Register<ImguiStatistics>(false, "Statistics");
28 }
29
31 {
33
34 /**
35 * @brief Begin render Utilities.
36 */
37 std::stringstream ss;
38 ss << ICON_EMPTY << " " << m_PanelName.c_str();
39 if (ImGui::BeginMenu(ss.str().c_str()))
40 {
41 /**
42 * @brief Render Profiler.
43 */
44 if (ImGui::MenuItem(ICON_TEXT(ICON_MD_CHECK, Actions))) {}
45 if (ImGui::MenuItem(ICON_TEXT(ICON_MD_CHECK, Activity Progress))) {}
46 if (ImGui::MenuItem(ICON_TEXT(ICON_MD_CHECK, Asset Validator))) {}
47 if (ImGui::MenuItem(ICON_TEXT(ICON_MD_CHECK, Console))) {}
48 if (ImGui::BeginMenu(ICON_TEXT(ICON_MD_CHECK, Debugger))) { m_ImguiDebugger->OnRender(); }
49 if (ImGui::MenuItem(ICON_TEXT(ICON_MD_CHECK, Scene Optimizer))) {}
50 if (ImGui::BeginMenu(ICON_TEXT(ICON_MD_CHECK, Statistics))) { m_ImguiStatistics->OnRender(); }
51 if (ImGui::MenuItem(ICON_TEXT(ICON_MD_CHECK, USD Paths))) {}
52
53 /**
54 * @brief End render Utilities.
55 */
56 ImGui::EndMenu();
57 }
58 }
59}
#define ICON_TEXT(icon, text)
Definition ImguiHelper.h:24
#define ICON_EMPTY
Definition ImguiHelper.h:26
#define SPICES_PROFILE_ZONE
FrameInfo Class. This class defines the FrameInfo data.
Definition FrameInfo.h:32
ImguiSlate(const std::string &panelName, FrameInfo &frameInfo)
Constructor Function. Init with Slate's name.
Definition ImguiUtils.h:35
std::string m_PanelName
This slate's name.
Definition ImguiUtils.h:161
This Class defines the basic behaves of specific slate. When we add an new Slate, we need inherit fro...
Definition ImguiUtils.h:27
virtual void OnRender() override
This interface is called On SlateRenderer Render.
ImguiUtilities(const std::string &panelName, FrameInfo &frameInfo)
Constructor Function.
The ImguiUtilities Class. This class defines how to render a Utilities.