mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-27 16:17:12 +03:00
Trenchbroom parser work with entities
Fixed lighting Fixed global position system Fixed child deletion system. editor work for custom entities registration
This commit is contained in:
28
Editor/src/ImGuiTextHelper.h
Normal file
28
Editor/src/ImGuiTextHelper.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user