This interface defines how to draw this component to property panel.
67 {
69
70 std::vector<std::string> tagBuffer(
m_Tags.begin(),
m_Tags.end());
71
72 ImGui::Spacing();
73 ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2{ 0, 3.0f });
75
76 {
78
79 for(int i = 0; i < tagBuffer.size(); i++)
80 {
81 std::stringstream ss;
82 ss << "Tag[" << i << "]";
84 ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x - ImGuiH::GetLineItemSize().x);
85 char buffer[256] = {};
86 strcpy_s(buffer, sizeof(buffer), tagBuffer[i].c_str());
87 if (ImGui::InputText("##", buffer, sizeof(buffer)))
88 {
89 m_Tags.erase(tagBuffer[i]);
90 m_Tags.insert(std::string(buffer));
91 }
92 ImGui::PopItemWidth();
93 ImGui::SameLine();
95 });
96 }
97 }
98
99 ImGui::PopStyleVar();
100 ImGui::Spacing();
101 }
#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.
std::set< std::string > m_Tags
The tags this component handled.