mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-09 20:08:57 +03:00
Fixed lighting Fixed global position system Fixed child deletion system. editor work for custom entities registration
29 lines
671 B
C++
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);
|
|
}
|
|
}
|