|
|
@@ -7,6 +7,7 @@
|
|
|
|
|
|
#include <imgui.h>
|
|
|
#include <imgui_internal.h>
|
|
|
+#include <string>
|
|
|
#include <vector>
|
|
|
|
|
|
#include "saura/cmd/sandbox/client/client.hpp"
|
|
|
@@ -223,6 +224,7 @@ struct SandboxApp : AppBase {
|
|
|
|
|
|
if (ImGui::BeginPopupModal("CreateClientPopup", NULL,
|
|
|
ImGuiWindowFlags_AlwaysAutoResize)) {
|
|
|
+ ClientInfo tmp_client;
|
|
|
// Тип
|
|
|
{
|
|
|
static const char *items[] = {"Вариант 1", "Вариант 2",
|
|
|
@@ -269,14 +271,16 @@ struct SandboxApp : AppBase {
|
|
|
|
|
|
// ФИО
|
|
|
this->mem_arena_temp->begin(this->def_mem_arena.get());
|
|
|
- uint8_t *buf = this->mem_arena_temp->push(1024);
|
|
|
+ uint64_t full_name_size = 65;
|
|
|
+ uint8_t *full_name = this->mem_arena_temp->push(full_name_size);
|
|
|
{
|
|
|
|
|
|
- ImGui::InputText("ФИО", (char *)buf, sizeof(buf));
|
|
|
+ ImGui::InputText("ФИО", (char *)full_name, full_name_size);
|
|
|
}
|
|
|
|
|
|
if (ImGui::Button("Close", ImVec2(120, 0))) {
|
|
|
- spdlog::info("ФИО: {}", (char *)buf);
|
|
|
+ tmp_client.full_name = (char *)full_name;
|
|
|
+ spdlog::info("ФИО: {}", tmp_client.full_name.c_str());
|
|
|
this->mem_arena_temp->pop_zero();
|
|
|
ImGui::CloseCurrentPopup();
|
|
|
}
|