SecondHalfGames / yakui

yakui is a declarative Rust UI library for games
Apache License 2.0
222 stars 18 forks source link

IME: Position input window near textbox #122

Open LPGhatguy opened 7 months ago

LPGhatguy commented 7 months ago

In applications that support system IME, the composition box is placed near the text cursor. We should support handling that information in yakui-core and relay it to the windowing library in libraries like yakui-winit.

image

stolen-programmer commented 7 months ago

I am reviewing the code drawn by the cursor

I don't quite understand why the cursor will shift upwards

Oh no, I actually forgot to set the position of the input method

stolen-programmer commented 7 months ago

I checked the code of Winit and found that setting the input area is simple, but we need an input location

This position should be provided by the input box and passed to the Winit backend for setting

Set the input area when the input box obtains focus

But I don't know much about yakui

LPGhatguy commented 7 months ago

Thank you for looking into that! I'll see what I can do about exposing the information we need from yakui. It should be easy enough.