Computes and returns the carret 2D coordinates based on the cursorPos
.
const string text = "the quick brown fox"; const uint qCharPos = 4; // find the position of the letter 'q': const vector2 carretPos(ComputeCarretPosition("Verdana20.fnt", text, qCharPos)); const vector2 textPos(20,40); DrawText(textPos, text, "Verdana20.fnt", 0xFFFFFFFF); // draw a sprite over the 'q' character DrawSprite("sprites/circle.png", textPos + carretPos, 0xFFFFFFFF);