21
src/Tick.cpp
21
src/Tick.cpp
@@ -11,6 +11,9 @@
|
||||
auto App::tick() -> void
|
||||
{
|
||||
static std::pmr::string text_input_data;
|
||||
m_ime.bound_text = &text_input_data;
|
||||
m_ime.bound_id = 1;
|
||||
process_pending_text_input();
|
||||
|
||||
if (!m_visible || m_gl.edpy == EGL_NO_DISPLAY
|
||||
|| m_gl.esurf == EGL_NO_SURFACE)
|
||||
@@ -38,13 +41,17 @@ auto App::tick() -> void
|
||||
}
|
||||
ImGuiGuard gui_scope(m_gui, rune, m_kbd.ctrl(), m_kbd.shift());
|
||||
|
||||
m_gui->text_input(1, text_input_data,
|
||||
{
|
||||
0,
|
||||
0,
|
||||
static_cast<float>(GetScreenWidth()),
|
||||
static_cast<float>(GetScreenHeight()),
|
||||
});
|
||||
Rectangle const input_rect {
|
||||
0.0f,
|
||||
0.0f,
|
||||
static_cast<float>(GetScreenWidth()),
|
||||
static_cast<float>(GetScreenHeight()),
|
||||
};
|
||||
auto result = m_gui->text_input(1, text_input_data, input_rect);
|
||||
if (result.test(1))
|
||||
m_ime.surrounding_dirty = true;
|
||||
|
||||
update_text_input_state(text_input_data, 1, input_rect);
|
||||
}
|
||||
|
||||
EndDrawing();
|
||||
|
||||
Reference in New Issue
Block a user