Commit Graph

40 Commits

Author SHA1 Message Date
Nick Atamas
5984aebe9c Slate : Added -perftest option to SlateViewer. Added button in WidgetReflector that copies Slate Perf Stats to clipboard.
#codereview Wes.Hunt

[CL 2353749 by Nick Atamas in Main branch]
2014-11-07 18:01:32 -05:00
Matthew Griffin
586f30f65e Ensure loading spinner isn't shown if page will never load
Reversed the conditions of the check so that the loading spinner is only shown if the browser window is valid and it hasn't been painted yet.

[CL 2353101 by Matthew Griffin in Main branch]
2014-11-07 10:30:01 -05:00
Matthew Griffin
955088ccd9 Adding a viewport controls help popup using the web browser to display html.
Also fixed non-unity build errors

[CL 2352904 by Matthew Griffin in Main branch]
2014-11-07 09:52:15 -05:00
Matthew Griffin
98cbfe5555 Adding a loading spinner to SWebBrowser to be shown before page is first rendered.
Also ignore changes to viewport size that can't be seen, to avoid the whole page being rendered again when it becomes visible.

[CL 2351745 by Matthew Griffin in Main branch]
2014-11-06 15:23:27 -05:00
Richard TalbotWatkin
c7ec62ee03 Fixed crash when entering an empty string in the hex value of the color picker.
#jira UE-4994 - Crash when leaving Hex value blank in color picker

[CL 2351384 by Richard TalbotWatkin in Main branch]
2014-11-06 15:09:14 -05:00
Jamie Dale
2c059a6a68 Fixed some shadow offset issues
UE-4766 - Text actors don't render on mobile devices

Fixed places where the baseline was being converted between signed and unsigned values. Baselines are typically negative, and there was a case where arithmetic was being performed on an unsigned baseline value that was causing the text to be entirely clipped on mobile platforms.

The baseline adjustment was also the wrong way around, and were letting positive shadow offsets clip the text off the top of its clipping region. This should only be done for negative shadow offsets (to move the baseline to compensate for the shadow). This was causing noticable clipping issues in UMG.

Shadow offsets also weren't repecting scale, which was most noticable when zooming in UMG. The shadow offset now takes scale into account so that it remains consistent at different zoom levels.

ReviewedBy Justin.Sargent

[CL 2345276 by Jamie Dale in Main branch]
2014-10-30 17:05:23 -04: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
Max Preussner
1338d142d8 AppFramework: Moving towards "include what you use"; moved files into correct folder; some formatting fixes
[CL 2340590 by Max Preussner in Main branch]
2014-10-24 21:08:08 -04:00
Matt Kuhlenschmidt
43aafaacd3 Always show advanced section for color pickers
[CL 2340061 by Matt Kuhlenschmidt in Main branch]
2014-10-24 13:51:23 -04:00
Justin Sargent
e09324c771 Adding the new still in development/experimental Responsive Layout widget.
[CL 2331854 by Justin Sargent in Main branch]
2014-10-16 13:28:42 -04:00
Wes Hunt
31e2bb00ac Removed a bunch of stuff from Slate standard include, created SlateBasics.h
* Moved Slate.h into SlateBasics.h and began shifting less commonly used headers into SlateExtras.h.
* Slate.h now simply includes SlateBasics.h and SlateExtras.h.
* Slate.h includes a deprecated warning now to indicate that SlateBasics.h + specific includes should be used instead.
* Moved dozens of inlined functions using Slate widgets into .cpp files to avoid header dependencies.
* All code samples now include SlateBasics.h and SlateExtras.h so future shifts will not break most those projects, but not trigger the deprecation warning of including Slate.h.
#BUN

[CL 2329610 by Wes Hunt in Main branch]
2014-10-14 22:50:06 -04:00
Matthew Griffin
95ebced6ae Moving Web Browser widget from Slate to App Framework
[CL 2328359 by Matthew Griffin in Main branch]
2014-10-14 10:28:04 -04:00
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