Begin render Property.
Search String.
End if not a select entity.
Render Datails.
End render Property.
Begin render Property.
Search String.
End if not a select entity.
Render Datails.
End render Property.
13 {
15
20
21 ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(2.0f, 4.0f));
22
26 static std::string searchString;
27 static bool isEnableSearch = false;
28
32 {
34
35 ImGui::Spacing();
37 static char search[256] = {};
38 if (ImGui::InputTextWithHint(
"##",
ICON_TEXT(ICON_MD_SEARCH, Search), search, 128))
39 {
40 searchString = std::string(search);
41 if (searchString.size() == 0) isEnableSearch = false;
42 else isEnableSearch = true;
43 }
44 ImGui::PopItemWidth();
45
50 ImGui::Spacing();
51 }
52
57 {
59
60 ImGui::PopStyleVar();
62
63 return;
64 }
65
69 {
71
72 {
73 ImGui::PushID("ImguiProperty::Add");
74
75 ImGui::Columns(2, 0, false);
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);
83 ImGui::NextColumn();
84
85 std::string ss;
88 char text[128] = "";
89 if (ImGui::InputTextWithHint(
"##",
ICON_TEXT_ROW(
" ", ss.c_str()), text, 128)) {}
90 ImGui::PopItemWidth();
91
92 ImGui::Columns(1);
93 ImGui::PopID();
94 }
95
96 {
97 ImGui::PushID("ImguiProperty::Prim Path");
98 ImGui::Columns(2, 0, false);
100 ImGui::Text("Prim Path");
101 ImGui::NextColumn();
102
103 std::stringstream ss;
106 char textpath[128] = "";
107 if (ImGui::InputTextWithHint(
"##",
ICON_TEXT_ROW(
" ", ss.str().c_str()), textpath, 128)) {}
108 ImGui::PopItemWidth();
109
110 ImGui::Columns(1);
111 ImGui::PopID();
112 }
113
114 {
115 ImGui::PushID("ImguiProperty::Instanceable");
116 ImGui::Columns(2, 0, false);
118 ImGui::Text("Instanceable");
119 ImGui::NextColumn();
120
121 static bool isChecked;
123 ImGui::Columns(1);
124 ImGui::PopID();
125 }
126 }
127
131 {
133
136
137 DrawComponent<TransformComponent> ("Transform", entity);
138 DrawComponent<CameraComponent> ("Camera", entity);
139 DrawComponent<DirectionalLightComponent>("DirectionalLight", entity);
140 DrawComponent<PointLightComponent> ("PointLight", entity);
141 DrawComponent<MeshComponent> ("Mesh", entity);
142 DrawComponent<NativeScriptComponent> ("NativeScript", entity);
143 DrawComponent<SkyBoxComponent> ("SkyBox", entity);
144 DrawComponent<SpriteComponent> ("Sprite", entity);
145 DrawComponent<LandscapeComponent> ("Landscape", entity);
146 DrawComponent<ParticleComponent> ("Particle", entity);
147 DrawComponent<EntityComponent> ("Attachment", entity);
148 DrawComponent<TagComponent> ("Tag", entity);
149 DrawComponent<UUIDComponent> ("UUID", entity);
150
151 if (ImGui::BeginPopupContextWindow(0, ImGuiPopupFlags_MouseButtonRight))
152 {
153 if (ImGui::BeginMenu("Add Component"))
154 {
155 if (ImGui::MenuItem("CameraComponent"))
156 {
158 }
159 if (ImGui::MenuItem("DirectionalLightComponent"))
160 {
162 }
163 if (ImGui::MenuItem("LandscapeComponent"))
164 {
166 }
167 if (ImGui::MenuItem("MeshComponent"))
168 {
170 }
171 if (ImGui::MenuItem("NativeScriptComponent"))
172 {
174 }
175 if (ImGui::MenuItem("ParticleComponent"))
176 {
178 }
179 if (ImGui::MenuItem("PointLightComponent"))
180 {
182 }
183 if (ImGui::MenuItem("SkyBoxComponent"))
184 {
186 }
187 if (ImGui::MenuItem("SpriteComponent"))
188 {
190 }
191 ImGui::MenuItem("WidgetComponent");
192
193 ImGui::EndMenu();
194 }
195 ImGui::EndPopup();
196 }
197 }
198
202 ImGui::PopStyleVar();
204 }
#define ICON_TEXT(icon, text)
#define ICON_TEXT_ROW(icon, text)
#define SPICES_PROFILE_ZONEN(...)
#define SPICES_PROFILE_ZONE
std::shared_ptr< World > m_World
The shared pointer of specific world.
scl::linked_unordered_map< int, std::string > m_PickEntityID
static ImVec2 GetLineItemSize()
Get Line Width's Square Size.
static void Checkbox(bool *isChecked)
ImGuiHelper Style Checkbox.
void Begin(float alpha=1.0f, ImGuiWindowFlags flags=0)
Begin a common slate.
FrameInfo & m_FrameInfo
The FrameData reference.
ImVec2 m_PanelSize
This slate's size.
V * end()
Get the end element of this container.
size_t size()
The container's element size.
static auto AsyncTask(ThreadPoolEnum pool, F &&func, Args &&... args) -> std::future< decltype(func(std::forward< Args >(args)...))>