2
3
4
5
17
18
21 ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(2.0f, 4.0f));
24
25
26 static std::string searchString;
27 static bool isEnableSearch =
false;
30
31
36 ImGui::PushItemWidth(m_PanelSize.x - ImGuiH::GetLineItemSize().x * 2.0f - ImGui::GetStyle().WindowPadding.x);
37 static char search[256] = {};
38 if (ImGui::InputTextWithHint(
"##",
ICON_TEXT(ICON_MD_SEARCH, Search), search, 128))
40 searchString = std::string(search);
41 if (searchString.size() == 0) isEnableSearch =
false;
42 else isEnableSearch =
true;
44 ImGui::PopItemWidth();
46 ImGui::SameLine(m_PanelSize.x - ImGuiH::GetLineItemSize().x * 2.0f);
47 ImGui::Button(ICON_MD_FILTER_ALT, ImGuiH::GetLineItemSize());
48 ImGui::SameLine(m_PanelSize.x - ImGuiH::GetLineItemSize().x * 1.0f);
49 ImGui::Button(ICON_MD_REORDER, ImGuiH::GetLineItemSize());
54
55
67
68
73 ImGui::PushID(
"ImguiProperty::Add");
75 ImGui::Columns(2, 0,
false);
76 ImGui::SetColumnWidth(0, ImGuiH::GetLineItemSize().x * 4.0f);
77 ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.16f, 0.16f, 0.16f, 1.0f));
78 ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(0.619f, 0.619f, 0.619f, 1.0f));
79 ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(0.408f, 0.451f, 0.18f, 1.0f));
80 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.341f, 0.486f, 0.353f, 1.0f));
81 ImGui::Button(
ICON_TEXT(ICON_MD_ADD, Add));
82 ImGui::PopStyleColor(4);
87 ImGui::PushItemWidth(m_PanelSize.x - ImGuiH::GetLineItemSize().x * 4.0f);
89 if (ImGui::InputTextWithHint(
"##",
ICON_TEXT_ROW(
" ", ss.c_str()), text, 128)) {}
90 ImGui::PopItemWidth();
97 ImGui::PushID(
"ImguiProperty::Prim Path");
98 ImGui::Columns(2, 0,
false);
99 ImGui::SetColumnWidth(0, ImGuiH::GetLineItemSize().x * 4.0f);
100 ImGui::Text(
"Prim Path");
103 std::stringstream ss;
105 ImGui::PushItemWidth(m_PanelSize.x - ImGuiH::GetLineItemSize().x * 4.0f);
106 char textpath[128] =
"";
107 if (ImGui::InputTextWithHint(
"##",
ICON_TEXT_ROW(
" ", ss.str().c_str()), textpath, 128)) {}
108 ImGui::PopItemWidth();
115 ImGui::PushID(
"ImguiProperty::Instanceable");
116 ImGui::Columns(2, 0,
false);
117 ImGui::SetColumnWidth(0, ImGuiH::GetLineItemSize().x * 4.0f);
118 ImGui::Text(
"Instanceable");
121 static bool isChecked;
129
130
134 entt::entity item =
static_cast<entt::entity>(*m_FrameInfo.m_PickEntityID.end_k());
135 Entity entity(item, m_FrameInfo.m_World.get());
151 if (ImGui::BeginPopupContextWindow(0, ImGuiPopupFlags_MouseButtonRight))
153 if (ImGui::BeginMenu(
"Add Component"))
155 if (ImGui::MenuItem(
"CameraComponent"))
157 AsyncTask(ThreadPoolEnum::Game, [=]() { Entity(item, m_FrameInfo.m_World.get()).AddComponent<CameraComponent>(); });
159 if (ImGui::MenuItem(
"DirectionalLightComponent"))
161 AsyncTask(ThreadPoolEnum::Game, [=]() { Entity(item, m_FrameInfo.m_World.get()).AddComponent<DirectionalLightComponent>(); });
163 if (ImGui::MenuItem(
"LandscapeComponent"))
165 AsyncTask(ThreadPoolEnum::Game, [=]() { Entity(item, m_FrameInfo.m_World.get()).AddComponent<LandscapeComponent>(); });
167 if (ImGui::MenuItem(
"MeshComponent"))
169 AsyncTask(ThreadPoolEnum::Game, [=]() { Entity(item, m_FrameInfo.m_World.get()).AddComponent<MeshComponent>(); });
171 if (ImGui::MenuItem(
"NativeScriptComponent"))
173 AsyncTask(ThreadPoolEnum::Game, [=]() { Entity(item, m_FrameInfo.m_World.get()).AddComponent<NativeScriptComponent>(); });
175 if (ImGui::MenuItem(
"ParticleComponent"))
177 AsyncTask(ThreadPoolEnum::Game, [=]() { Entity(item, m_FrameInfo.m_World.get()).AddComponent<ParticleComponent>(); });
179 if (ImGui::MenuItem(
"PointLightComponent"))
181 AsyncTask(ThreadPoolEnum::Game, [=]() { Entity(item, m_FrameInfo.m_World.get()).AddComponent<PointLightComponent>(); });
183 if (ImGui::MenuItem(
"SkyBoxComponent"))
185 AsyncTask(ThreadPoolEnum::Game, [=]() { Entity(item, m_FrameInfo.m_World.get()).AddComponent<SkyBoxComponent>(); });
187 if (ImGui::MenuItem(
"SpriteComponent"))
189 AsyncTask(ThreadPoolEnum::Game, [=]() { Entity(item, m_FrameInfo.m_World.get()).AddComponent<SpriteComponent>(); });
191 ImGui::MenuItem(
"WidgetComponent");
200
201
202 ImGui::PopStyleVar();
#define ICON_TEXT(icon, text)
#define ICON_TEXT_ROW(icon, text)
#define SPICES_PROFILE_ZONEN(...)
#define SPICES_PROFILE_ZONE
CameraComponent Class. This class defines the specific behaves of CameraComponent.
DirectionalLightComponent Class. This class defines the specific behaves of DirectionalLightComponent...
EntityComponent Class. This class defines the specific behaves of EntityComponent.
Entity Class. This class defines the specific behaves of Entity.
static void Checkbox(bool *isChecked)
ImGuiHelper Style Checkbox.
The ImGuiH Class. This class defines helper function for slate render.
virtual void OnRender() override
This interface is called On SlateRenderer Render.
The ImguiProperty Class. This class defines how to render a Property.
FrameInfo & m_FrameInfo
The FrameData reference.
LandscapeComponent Class. This class defines the specific behaves of LandscapeComponent.
MeshComponent Class. This class defines the specific behaves of MeshComponent.
NativeScriptComponent Class. This class defines the specific behaves of NativeScriptComponent....
ParticleComponent Class. This class defines the specific behaves of ParticleComponent.
PointLightComponent Class. This class defines the specific behaves of PointLightComponent.
SkyBoxComponent Class. This class defines the specific behaves of SkyBoxComponent.
SpriteComponent Class. This class defines the specific behaves of SpriteComponent.
TagComponent Class. This class defines the specific behaves of TagComponent.
UUIDComponent Class. This class defines the specific behaves of UUIDComponent.