I tried a caret tag renderer. It works fine except it seems there is a 1-pixel 
space inserted between two text nodes, even if the caret has zero-size. So I'm 
not quite sure it is the best option.
I still have other options to try, like removing the tag and continuing parsing 
the text while remembering somehow position of the caret, but it feels dirty.

Also, as I was trying to port the multiline editbox, I realized that if we want 
to support the direction keys, home end & co, we should definitely add some way 
to get information about the wrapping. I was thinking of a pointer to a 
wrapinginfo object that could be passed all the way down to the layouting node, 
which would fill it with data. We could put coords of every text node in there, 
including the caret placeholder, so that rendering can be done on top 
afterwards. Its still just an idea, if you have another one please share!
-- 
https://code.launchpad.net/~widelands-dev/widelands/fh1/+merge/177228
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/fh1.

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to