Implement Renderer::find_cursor_position

This commit is contained in:
Héctor Ramón Jiménez 2020-03-25 13:57:02 +01:00
parent b30ddf90d2
commit 30f02345a8
3 changed files with 61 additions and 50 deletions

View file

@ -36,10 +36,10 @@ impl text_input::Renderer for Renderer {
fn offset(
&self,
text_bounds: Rectangle,
font: Font,
size: u16,
value: &text_input::Value,
state: &text_input::State,
font: Font,
) -> f32 {
if state.is_focused() {
let cursor = state.cursor();
@ -69,8 +69,8 @@ impl text_input::Renderer for Renderer {
bounds: Rectangle,
text_bounds: Rectangle,
cursor_position: Point,
size: u16,
font: Font,
size: u16,
placeholder: &str,
value: &text_input::Value,
state: &text_input::State,