Commit Graph

28 Commits

Author SHA1 Message Date
Nick Atamas
38902f0b0f Slate enabled test case now includes render transforms.
[CL 2325962 by Nick Atamas in Main branch]
2014-10-10 17:48:30 -04:00
Max Preussner
bec3dd66ac Editor: Fixed color picker hex input resulting in gamma corrected value
Based on GitHub PR# 280 by Fienzine (https://github.com/EpicGames/UnrealEngine/pull/280)

[CL 2324578 by Max Preussner in Main branch]
2014-10-09 17:18:17 -04:00
Matthew Griffin
45637d612e Added an SWebBrowser widget
Web Browser widget displays a web page and allows for some optional basic controls.
Added initialisation and update of Web Browser module to Slate Application so that each web browser window doesn't have to manage this individually.
Added example usage of the widget to STestSuite so that it can be used via the SlateViewer app.
Fixed error in name of CEF3Utils module.

[CL 2319730 by Matthew Griffin in Main branch]
2014-10-06 10:05:03 -04:00
Dmitry Rekman
c88d7bedc2 Fix crash when opening tutorial on Linux.
- Caused by class name collision: we currently export all the names (i.e. visibility=default) in non-Shipping configurations because this is needed for callstack generation. If there are two (or more) classes named the same in different dynamic libraries, this can cause problems during run-time, because the names will be resolved pretty much arbitrarily (depending on the order of loading the said libraries)
- This particular issue seems to have involved FTextStyleDecorator::Create() static method, which, instead of creating an instance of FTextStyleDecorator from IntroTutorials module, created FTextStyleDecorator from the test suite.
- Solution for this one is to rename one of classes to something different.

#codereview Josh.Adams, Jamie.Dale

[CL 2312074 by Dmitry Rekman in Main branch]
2014-09-27 23:43:07 -04:00
Richard TalbotWatkin
ad5f245995 Material Editor now opens Color Picker with Advanced section automatically expanded.
#ttp 345475 - NUX:Material Editor: Vector parameter alpha channel is in the "advanced" part of the color picker.
#branch UE4
#proj Editor.MaterialEditor, Runtime.AppFramework
#add Added extra construction parameter to SColorPicker (ExpandAdvancedSection) and added it as an option to SColorPicker::OpenColorPicker.
#reviewedby Matt.Kuhlenschmidt

[CL 2310372 by Richard TalbotWatkin in Main branch]
2014-09-25 17:33:36 -04:00
Wes Hunt
a78cef4ea0 Converted SWidget::RenderTransform into a TOptional for performance reasons.
* Allows code to skip the expensive stuff when no render transform is used. Specifically, skips render transform related concatenate calls in FGeometry ctor.
* UMG now sets a NULL RenderTransform when it detects the transform is identity.
TTP#346674: Slate: Editor performance has regressed in debug and release.
TTP#346490: MAIN: Performance drop when gathering resources
#codereview:nick.atamas,nick.darnell

[CL 2307703 by Wes Hunt in Main branch]
2014-09-23 19:06:06 -04:00
Wes Hunt
959a806189 Support for a ScissorRectBox that ensures child widgets are clipped even under render transforms by using hardware scissor rect. #BUN
* This is a hack for the UMG designer to ensure any render transforms in designed widgets do not leak outside the designer. Implemented in a low-level hacky way so we don't have to change any public APIs because clipping control can and will change in better ways going forward.
* SlateViewer now uses it for all it's views as a test, and the UMG designer uses it.
* ElementBatcher now uses a new hash function that incorporates the ScissorRect, and slightly improves the efficiency, definitely improving the accuracy.

#TTP346004: UMG: Scaling a widget will result in it scaling outside of the graph
#codereview:nick.darnell,matt.kuhlenschmidt

[CL 2303045 by Wes Hunt in Main branch]
2014-09-18 16:45:23 -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
Jamie Dale
98a2c23f74 Fixed text justification not working correctly when the UI was scaled
The width used for justification is the larger of the "desired size" (as fixed wrapping widths force the desired size to that width), or the "actual size" (in the case that the text is smaller than its containing widget, and the text widget is set to fill width).

The "actual size" wasn't being scaled before being used to offset the text blocks, and also wasn't taking into account the text layout margin. Both of these issues lead to some incorrect offsets being calculated.

Also added a test case for STextBlock justification to the widget gallery in Slate Viewer.

ReviewedBy Nick.Darnell, Nick.Atamas

[CL 2299261 by Jamie Dale in Main branch]
2014-09-16 05:10:53 -04:00
Max Preussner
ea679d36cb Editor: Workaround for color picker themes crash on shutdown
The problem is that the color picker has a global static instance of the color themes widget. By the time that widget is being destroyed as part of static shutdown, Slate and ICU are already unloaded. Ideally, we wouldn't have a global variable here at all. Some further research is needed to understand why it was added in the first place. In the meantime, the variable is being changed to a weak pointer, so it gets destroyed when the last color picker instance gets destroyed.

#CodeReview: jamie.dale, saul.abreu

[CL 2298812 by Max Preussner in Main branch]
2014-09-15 17:42:51 -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
Nick Atamas
440aad30b6 Slate : Deprecated .AspectRatio() and removed all references.
[CL 2294436 by Nick Atamas in Main branch]
2014-09-11 20:21:09 -04:00
Saul Abreu
6ed6c7b06d Corrected conflicting LOCTEXT keys (RestoreExpansionButton) in STableViewTesting.cpp.
[CL 2289804 by Saul Abreu in Main branch]
2014-09-08 15:31:53 -04:00
bruce nesbit
d60a5de509 Converted widget .Tag instances for tutorials to use MetaData
[CL 2286138 by bruce nesbit in Main branch]
2014-09-05 07:39:52 -04:00
Saul Abreu
771718ec3d Backed out my own change, Fricker's fix seems to work.
[CL 2284773 by Saul Abreu in Main branch]
2014-09-04 13:30:33 -04:00
Saul Abreu
3e1749aad2 Another potential fix for the Mac error in SMultipleOptionTable.h.
[CL 2284756 by Saul Abreu in Main branch]
2014-09-04 13:15:55 -04:00
Mike Fricker
e7667c391d Fixed Clang compile error with SMultipleOptionTable
#codereview saul.abreu

[CL 2284750 by Mike Fricker in Main branch]
2014-09-04 13:15:29 -04:00
Saul Abreu
c3d1d49d9d Additional compilation solutions for SMultipleOptionTable.h.
[CL 2284610 by Saul Abreu in Main branch]
2014-09-04 11:35:06 -04:00
Saul Abreu
099957b606 Possible resolution for Mac compilation error regarding FSuperRowType in SMultipleOptionTable's row class widget.
[CL 2284544 by Saul Abreu in Main branch]
2014-09-04 10:54:56 -04:00
Saul Abreu
3c0d128a31 Generic SMultipleOptionTable widget. Used for project packaging settings.
[CL 2283716 by Saul Abreu in Main branch]
2014-09-03 19:05:40 -04:00
Wes Hunt
00ff8d4e14 Adding RenderTransformPivot to SWidget, which allows you to specify a pivot in normalized local space. Fairly trivial change to concatenation logic in FGeometry, but does imply some additional math every time we arrange children. Most of the changes are due to places where people call SWidget::Construct, which makes this look more painful to add than it really was.
#codereview:nick.atamas,matt.kuhlenschmidt,nick.darnell

[CL 2283206 by Wes Hunt in Main branch]
2014-09-03 13:32:41 -04:00
Max Preussner
f3913a4a03 Editor: moved SFilePathPicker to DesktopWidgets module, because AppFramework cannot use Developer functionality, such as IDesktopPlatform
[CL 2282071 by Max Preussner in Main branch]
2014-09-02 17:47:49 -04:00
Max Preussner
98ca3f7310 fixed initialization order
[CL 2281982 by Max Preussner in Main branch]
2014-09-02 16:42:25 -04:00
Max Preussner
65e2abbb76 Editor: Refactored file path picker into a reusable widget
[CL 2281860 by Max Preussner in Main branch]
2014-09-02 15:22:15 -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