mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2025-04-05 09:00:51 +00:00
fixed shader editor hint popup not scrolling
broken by b37b542b89
because of the renamed InputTextMultiline label
This commit is contained in:
parent
67db6d1857
commit
a158bb06fa
1 changed files with 4 additions and 3 deletions
|
@ -2186,21 +2186,22 @@ static void DrawShaderEdit()
|
|||
}
|
||||
|
||||
// need to get the cursor position before drawing the text edit
|
||||
// so we know where it's top left corner is
|
||||
// so we know where its top left corner is
|
||||
cursorPos = ImGui::GetWindowPos();
|
||||
cursorPos.x += ImGui::GetCursorPos().x;
|
||||
cursorPos.y += ImGui::GetCursorPos().y;
|
||||
|
||||
const char* const editBoxLabel = va("##Shader Code: %s", shader->name);
|
||||
const int callbackFlags =
|
||||
ImGuiInputTextFlags_CallbackCompletion |
|
||||
ImGuiInputTextFlags_CallbackCharFilter |
|
||||
ImGuiInputTextFlags_CallbackAlways;
|
||||
ImGui::InputTextMultiline(
|
||||
va("##Shader Code: %s", shader->name), window.code, sizeof(window.code), inputSize,
|
||||
editBoxLabel, window.code, sizeof(window.code), inputSize,
|
||||
callbackFlags, &ShaderEditCallback);
|
||||
|
||||
ImGuiContext& imguiContext = *GImGui;
|
||||
const char* const multiLineName = va("%s/%s_%08X", imguiContext.CurrentWindow->Name, "##Shader Code", ImGui::GetID("##Shader Code"));
|
||||
const char* const multiLineName = va("%s/%s_%08X", imguiContext.CurrentWindow->Name, editBoxLabel, ImGui::GetID(editBoxLabel));
|
||||
ImGuiWindow* const multiLineWindow = ImGui::FindWindowByName(multiLineName);
|
||||
if(multiLineWindow != NULL)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue