Compute cursor position for a text input widget.
X position of the input field
Y position of the input field
Character offset of cursor within the input value
Optional prefix before the editable area (e.g., label)
Cursor position in screen coordinates
Compute cursor position for a text input widget.