Commit Graph

3 Commits

Author SHA1 Message Date
Thomas Sarkanen
6f1d963577 Adding image support to tutorial rich text
Improved text layout support when inserting runs/text or splitting lines on runs that were non-text (images or widgets). The text layout now inserts an extra text run when splitting a non-text run, which avoids issues where text was either being inserted into a non-text run (and vanishing), or an image run was being cloned (and appearing twice).

This also fixes the cursor movement in the multiline editable text when selecting over images or widgets (the cursor would jump to the start of the document as GetTextIndexAt hadn't been implemented. Additionally, it also fixes an issue where Measure was always trying to place the cursor at the end of an image run (ignoring the values of BeginIndex and EndIndex) which made the cursor offset draw in the wrong place.

These changes required the text layout to be able to create a default text run, which involved refactoring the text marshallers as the Slate text run now knows about the default text style, taking that responsibility away from the marshallers

Added tutorial-specific image decorator that accepts a content-relative or engine relative image path.

Added button to tutorial rich text editor to add new images.

All previously-imported images should still 'work'.

reviewed by Jamie.Dale,Nick.Atamas,Justin.Sargent

[CL 2302278 by Thomas Sarkanen in Main branch]
2014-09-18 08:09:29 -04:00
Thomas Sarkanen
e2c6561a7e Asset links in tutorials now open correctly.
Previously they were only opening if the asset had been previously loaded.

[CL 2299446 by Thomas Sarkanen in Main branch]
2014-09-16 10:26:12 -04:00
Thomas Sarkanen
a37b84b8c8 Rich tooltips for tutorial hyperlinks
Refactored handling of decorators into new utility class FTutorialText.
Added tooltip (and rich tooltip) support to hyperlink runs.

#codereview Jamie.Dale

[CL 2294907 by Thomas Sarkanen in Main branch]
2014-09-12 05:28:34 -04:00