We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc1b40a commit 20c1257Copy full SHA for 20c1257
core/src/display_object/edit_text.rs
@@ -1506,6 +1506,11 @@ impl<'gc> EditText<'gc> {
1506
self.0.write(context.gc()).max_chars = value;
1507
}
1508
1509
+ /// Map the position on the screen to caret index.
1510
+ ///
1511
+ /// This method is used exclusively for placing a caret inside text.
1512
+ /// It implements the Flash Player's behavior of placing a caret.
1513
+ /// Characters are divided in half, the last line is extended, etc.
1514
pub fn screen_position_to_index(self, position: Point<Twips>) -> Option<usize> {
1515
let text = self.0.read();
1516
let position = self.global_to_local(position)?;
0 commit comments