feat(Globals): Modified styling of buttons and fields
This commit is contained in:
parent
cc39b5060f
commit
26b2bca8a2
@ -27,27 +27,37 @@ namespace big
|
|||||||
|
|
||||||
for (auto& global : g_globals_service->m_globals)
|
for (auto& global : g_globals_service->m_globals)
|
||||||
{
|
{
|
||||||
|
char label[64];
|
||||||
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
char label[64];
|
sprintf(label, "Freeze##%d", global.get_id());
|
||||||
sprintf(label, "Freeze###freeze_%d", global.get_id());
|
|
||||||
ImGui::Checkbox(label, &global.m_freeze);
|
ImGui::Checkbox(label, &global.m_freeze);
|
||||||
|
|
||||||
|
ImGui::BeginGroup();
|
||||||
|
|
||||||
|
ImGui::Text("Name:");
|
||||||
|
ImGui::Text("Value:");
|
||||||
|
|
||||||
|
ImGui::EndGroup();
|
||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
|
||||||
|
ImGui::BeginGroup();
|
||||||
|
|
||||||
ImGui::Text(global.m_name.c_str());
|
ImGui::Text(global.m_name.c_str());
|
||||||
ImGui::SameLine();
|
|
||||||
|
|
||||||
sprintf(label, "###input_%d", global.get_id());
|
sprintf(label, "###input_%d", global.get_id());
|
||||||
ImGui::PushItemWidth(200.f);
|
ImGui::SetNextItemWidth(200.f);
|
||||||
ImGui::InputInt(label, global.get());
|
ImGui::InputInt(label, global.get());
|
||||||
ImGui::PopItemWidth();
|
|
||||||
|
|
||||||
sprintf(label, "Write###btn_%d", global.get_id());
|
ImGui::EndGroup();
|
||||||
if (ImGui::Button(label))
|
|
||||||
global.write();
|
|
||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
sprintf(label, "Delete##delete_%d", global.get_id());
|
|
||||||
|
ImGui::BeginGroup();
|
||||||
|
|
||||||
|
sprintf(label, "Delete##%d", global.get_id());
|
||||||
if (ImGui::Button(label))
|
if (ImGui::Button(label))
|
||||||
{
|
{
|
||||||
for (int i = 0; i < g_globals_service->m_globals.size(); i++)
|
for (int i = 0; i < g_globals_service->m_globals.size(); i++)
|
||||||
@ -56,6 +66,12 @@ namespace big
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sprintf(label, "Write###%d", global.get_id());
|
||||||
|
if (ImGui::Button(label))
|
||||||
|
global.write();
|
||||||
|
|
||||||
|
ImGui::EndGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::EndTabItem();
|
ImGui::EndTabItem();
|
||||||
|
Reference in New Issue
Block a user