Skip to content

Commit

Permalink
Allow selection of a single character on a TextField line
Browse files Browse the repository at this point in the history
  • Loading branch information
hughsando committed Mar 4, 2024
1 parent ea37f6b commit 090733d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion project/src/common/TextField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ int TextField::PointToChar(UserPoint inPoint) const
if ( (line.mY0+line.mMetrics.height) > inPoint.y && line.mChars)
{
if (line.mChars==1)
return line.mChar0;
return line.mChar0 + (inPoint.x>mCharPos[line.mChar0 + 1].x);

// Find the char
for(int c=0; c<line.mChars;c++)
Expand Down

0 comments on commit 090733d

Please sign in to comment.