Commit Graph

15 Commits

Author SHA1 Message Date
Nick Darnell
90e793745c Slate - ESlateCheckBoxState has been renamed to ECheckBoxState.
[CL 2384008 by Nick Darnell in Main branch]
2014-12-10 14:24:09 -05:00
Ben Marsh
149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00
Chris Gagnon
0e6d657c3d Refactor to unify keyboard and controller input and focus.
Native controller navigation support.

[CL 2345039 by Chris Gagnon in Main branch]
2014-10-30 12:29:36 -04:00
Thomas Sarkanen
8011ba0c1b Adding external link indicator to tutorial hyperlinks
Slate changes:
Allowed hyperlink decorator and hyperlink run to be more easily derived from by moving some functions/variables to protected.

Added new run & decorator for hyperlinks in tutorials that add an icon to the end of the run if required.
Only use icon-style run if in display mode (not in edit mode).

reviewed by Jamie.Dale

[CL 2322460 by Thomas Sarkanen in Main branch]
2014-10-08 06:07:52 -04:00
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
465d6fef0c Cleaned up hyperlink tooltip API a little
Post-code review, removed accessors & moved delegates into constructor.

[CL 2294987 by Thomas Sarkanen in Main branch]
2014-09-12 06:48:53 -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
James Golding
d20bf8e668 Fix non-unity in STutorialEditableText.cpp
#codereview thomas.sarkanen

[CL 2286149 by James Golding in Main branch]
2014-09-05 08:25:07 -04:00
Thomas Sarkanen
fa824aad40 Added more hyperlink types for tutorials
Added asset, code, tutorial and UDN hyperlinks. Tweaked UI to use combo box instead of the large amount of radio buttons it was using before.
Made sure importer & content use correct text styles.
Defaulted to rich text for content.

[CL 2284444 by Thomas Sarkanen in Main branch]
2014-09-04 09:59:45 -04:00
Thomas Sarkanen
7b3ae59c60 Simplified rich text editor for tutorials.
Removed ability to independently set font size & colour etc. and replaced with a set of font styles we can use (and style appropriately). Added legacy code to deal with old-style text as best it can.

[CL 2282800 by Thomas Sarkanen in Main branch]
2014-09-03 06:25:58 -04:00
Jamie Dale
4819f62b3e Converted STextBlock to use an FTextLayout
This solves a wrapping issue where STextBlock would incorrectly consume new-line characters when wrapping, as well as allowing it to use custom wrapping behavior (eg, CamelCase wrapping for asset names in the content browser).

This change also implements FString -> FText passthrough for SLATE_TEXT_ATTRIBUTE (it was previously performing FText -> FString passthrough, however this didn't fit well with the fact that FText has a more efficient method of comparing whether a bound text attribute has changed (see FTextSnapshot), so can quickly work out that the FTextLayout doesn't need updating).

This change adds FTextBlockLayout to handle the text layout cache for text block types (STextBlock and SRichTextBlock) and serves a dual purpose of moving the duplicated caching logic into a single place, as well as hiding it from the widget (so allowing the cache to mutate, even when called from immutable widget functions).

This change also increases the unification between the STextBlock and SRichTextBlock construction parameters, by allowing STextBlock to specify a Justification, Margin, and LineHeightPercentage, and allowing SRichTextBlock to specify its HighlightText as an attribute.

ReviewedBy Nick.Atamas, Justin.Sargent

[CL 2280351 by Jamie Dale in Main branch]
2014-09-01 06:28:16 -04:00
Ben Marsh
abd570b7a9 Move GetSolutionFilepath() out of Core and into DesktopPlatform.
[CL 2278050 by Ben Marsh in Main branch]
2014-08-29 15:31:27 -04:00
Thomas Sarkanen
8dc16308f3 Added tutorials button in top bar of editor & sub-editors
Icon is only visible if content is available for the editor in question.
Split editor settings into two groups - one is persistent settings and one is progress/state.
Tutorials record their dismissed state, so users can permenantly disable the 'nag' for a particular tutorial.
Tutorial content now solidifies when the mouse is hovered over it, so it can be made easier to read.
Fixed crash on startup if an intro tutorial was displaying rich text.
Also fixed crash for TTP# 345094, where a zero-length tutorial was being accessed.

[CL 2275934 by Thomas Sarkanen in Main branch]
2014-08-28 06:22:40 -04:00
Max Preussner
f167dce37e Slate: Moved TestSuite and ColorPicker into new module AppFramework
The AppFramework module is intended to be used for compound widgets and UI related classes that are too specific (not basic enough) for Slate, but also not Editor specific (reusable in non-Editor applications and games). The test suite has been moved in its entirety for now, but core widget specific test classes will eventually be split off and moved back into Slate, so that they can live alongside of their corresponding widgets.

Other changes:
- moved to "include what you use" scheme for SColorPicker
- broke out color picker related widgets that may be reusable
- added forward declarations to reduce header include dependencies

#CodeReview: saul.abreu

[CL 2275496 by Max Preussner in Main branch]
2014-08-27 20:35:19 -04:00
Thomas Sarkanen
ac41c0f17f CIS fix - files I missed
[CL 2256056 by Thomas Sarkanen in Main branch]
2014-08-14 07:42:47 -04:00