Platform IME: add ImGuiPlatformImeData::WantVisible, hide IME when not used. (#2589)

This commit is contained in:
actboy168
2022-01-05 13:20:54 +01:00
committed by ocornut
parent 1cbfe93520
commit 29a8ee0826
4 changed files with 10 additions and 0 deletions

View File

@ -4760,7 +4760,10 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
// Notify OS of text input position for advanced IME (-1 x offset so that Windows IME can cover our cursor. Bit of an extra nicety.)
if (!is_readonly)
{
g.PlatformImeData.WantVisible = true;
g.PlatformImeData.InputPos = ImVec2(cursor_screen_pos.x - 1.0f, cursor_screen_pos.y - g.FontSize);
}
}
}
else