SpiecsEngine
 
Loading...
Searching...
No Matches

◆ DrawThis()

void Spices::UUIDComponent::DrawThis ( )
overridevirtual

This interface defines how to draw this component to property panel.

Reimplemented from Spices::Component.

Definition at line 22 of file UUIDComponent.cpp.

23 {
25
26 ImGui::Spacing();
27 ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2{ 0, 3.0f });
28 float columeWidth = ImGuiH::GetLineItemSize().x * 6.5f;
29
30 {
31 SPICES_PROFILE_ZONEN("UUIDComponent UUID");
32
33 ImGuiH::DrawPropertyItem("UUID", columeWidth, nullptr, [&]() {
34 ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x - ImGuiH::GetLineItemSize().x);
35 char buffer[256] = {};
36 ImGui::InputTextWithHint("##", ICON_TEXT_ROW(" ", std::to_string(m_uuid).c_str()), buffer, sizeof(buffer));
37 ImGui::PopItemWidth();
38 ImGui::SameLine();
40 });
41 }
42
43 ImGui::PopStyleVar();
44 ImGui::Spacing();
45 }
#define ICON_TEXT_ROW(icon, text)
Definition ImguiHelper.h:25
#define SPICES_PROFILE_ZONEN(...)
#define SPICES_PROFILE_ZONE
static ImVec2 GetLineItemSize()
Get Line Width's Square Size.
static bool DrawResetIcon(const bool &isMove)
Draw Reset Icon.
static void DrawPropertyItem(const std::string &itemName, float columeWidth, std::function< void()> nameFunc, std::function< void()> valFunc)
Draw a single property.
UUID m_uuid
The uuid this component handled.
std::string to_string(GFSDK_Aftermath_Result result)
Convert GFSDK_Aftermath_Result to string.