From b70377212b455a29c2e193622d6db07bb965119f Mon Sep 17 00:00:00 2001 From: wootguy Date: Tue, 30 Apr 2024 05:13:56 -0700 Subject: [PATCH] allow long key values in the smart edit tab forgot to increase this to match the raw edit tab limits --- src/editor/Gui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/editor/Gui.cpp b/src/editor/Gui.cpp index 3a3bb93b..92df1594 100644 --- a/src/editor/Gui.cpp +++ b/src/editor/Gui.cpp @@ -2104,8 +2104,8 @@ void Gui::drawKeyvalueEditor_SmartEditTab(Entity* ent) { ImGui::Columns(2, "smartcolumns", false); // 4-ways, with border - static char keyNames[128][64]; - static char keyValues[128][64]; + static char keyNames[MAX_KEYS_PER_ENT][MAX_KEY_LEN]; + static char keyValues[MAX_KEYS_PER_ENT][MAX_VAL_LEN]; float paddingx = style.WindowPadding.x + style.FramePadding.x; float inputWidth = (ImGui::GetWindowWidth() - (paddingx * 2)) * 0.5f; @@ -2225,7 +2225,7 @@ void Gui::drawKeyvalueEditor_SmartEditTab(Entity* ent) { InputChangeCallback::keyValueChanged, &inputData[i]); } else { - ImGui::InputText(("##val" + to_string(i) + "_" + to_string(app->pickCount)).c_str(), keyValues[i], 64, + ImGui::InputText(("##val" + to_string(i) + "_" + to_string(app->pickCount)).c_str(), keyValues[i], MAX_VAL_LEN, ImGuiInputTextFlags_CallbackAlways, InputChangeCallback::keyValueChanged, &inputData[i]); }