Files
Nuake/Editor/src/ImGuiTextHelper.h
Antoine Pilote c7dc3cc476 Trenchbroom parser work with entities
Fixed lighting
Fixed global position system
Fixed child deletion system.
editor work for custom entities registration
2021-06-23 17:37:54 -04:00

29 lines
671 B
C++

#pragma once
#include <vcruntime_string.h>
#include <string>
#include <src/Vendors/imgui/imgui.h>
void ImGuiTextSTD(const std::string& label, std::string& value)
{
char buffer[256];
memset(buffer, 0, sizeof(buffer));
std::strncpy(buffer, value.c_str(), sizeof(buffer));
if (ImGui::InputText(label.c_str(), buffer, sizeof(buffer)))
{
value = std::string(buffer);
}
}
void ImGuiTextMultiline(const std::string& label, std::string& value)
{
char buffer[256];
memset(buffer, 0, sizeof(buffer));
std::strncpy(buffer, value.c_str(), sizeof(buffer));
if (ImGui::InputTextMultiline(label.c_str(), buffer, sizeof(buffer)))
{
value = std::string(buffer);
}
}