Commit Graph

209 Commits

Author SHA1 Message Date
Nick Atamas
03feb4e7be Slate : Exposed a globally accessible monospace font.
[CL 2350369 by Nick Atamas in Main branch]
2014-11-05 13:48:59 -05:00
Jamie Dale
92c2ef7b70 Made a render thread font cache for Canvas to use
This addresses a crash when trying to draw text from the render thread.

The extra font cache is managed by FEngineFontServices, and its creation is delayed until it is first needed. In Canvas you now use FEngineFontServices (rather than FSlateApplication directly) which will automatically return the correct cache for the current thread.

#codereview Matt.Kuhlenschmidt

[CL 2350206 by Jamie Dale in Main branch]
2014-11-05 13:10:54 -05:00
Justin Sargent
c9d10057e6 Fixed visual regression with scrollbars that prevented certain styling methods.
[CL 2348570 by Justin Sargent in Main branch]
2014-11-04 11:51:50 -05:00
Nick Darnell
258685b4dc UMG - The Widget Reflector can detect UMG widgets as being different than normal slate widgets, and the source link is replaced by a link back to the blueprint asset. This enables the functionality, another coming changelist will hookup the asset loading binding in the editor.
[CL 2348470 by Nick Darnell in Main branch]
2014-11-04 11:11:50 -05:00
Mikolaj Sieluzycki
59df49651b Engine private PCH cleanup.
#codereview Robert.Manuszewski

[CL 2348191 by Mikolaj Sieluzycki in Main branch]
2014-11-04 06:12:25 -05:00
Nick Atamas
b2e33f373b Added experimental Slate.FoldTick variable. Defaults to 0. Results in significant performance savings of up to 35%.
[CL 2347469 by Nick Atamas in Main branch]
2014-11-03 15:59:15 -05:00
Jamie Dale
0b08e6693a Added support for setting a friendly, editor-only, name for sub-font families
These let you specify the purpose of the font family, rather than them all being called "Sub-Font Family #X".

[CL 2347377 by Jamie Dale in Main branch]
2014-11-03 15:49:07 -05:00
Ben Zeigler
02a9e1dd4e Merging Dev -> Main using UE4-Fortnite-To-UE4 from CL 2340802
Includes following engine changes:

Getting display metrics only once at construct time when using SSafeZone. GetDisplayMetrics is expensive in Windows so it is impractical to call it every frame.
- Some AI API improvements, mostly switchig pointer function parameters to references.
- minor refactor of UCrowdFollowingComponent's queryinf functions:
    - IsCrowd*Enabled functions refactored to  IsCrowd*Active
    - implemented IsCrowd*Enabled that return acrual values of relevant properties
- Added a function to CrowdManager to query for location of agents neighbouring given agent
Added support for PS4 touchpad-based cursor
You can now choose to skip synchronously scanning for asset data in object libraries and just use the data that is currently in the asset registry. The data will be refereshed automatically later once the global scan completes. The only applies to non-commandlet editor instances.
Crash fixes for trying to access NULL Metal surfaces on IOS
Slate: Cleaned up some atlas code related to padding and corrected some comments

[CL 2347323 by Ben Zeigler in Main branch]
2014-11-03 15:47:28 -05:00
Nick Darnell
31c41e3bfa Editor - Making the breadcrumb bar now internally use a scrollbox in order to always bias having the most child path visible. Enhancing the SScrollBox so that it has functions you can call to scroll to the end/start. Fixing several styling issues with the border shadow of the scroll boxes, it now is much smaller in terms of original image, and is a BoxBrush now, so that it doesn't try to desire 64 su, as the minimum size of a h or v scroll box.
[CL 2347248 by Nick Darnell in Main branch]
2014-11-03 15:28:43 -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
Nick Whiting
20541726f1 #vr Cleaning up / renaming / commenting on SWindow and viewport independent sizing functions
[CL 2345106 by Nick Whiting in Main branch]
2014-10-30 12:48:48 -04:00
Richard TalbotWatkin
5bc43386df Fixed error in TSlotlessChildren::AsArrayCopy which was generating an array copy with duplicate elements.
#jira UE-1389 - EDITOR: MATERIAL EDITOR: Closing a material without saving prompts user to save twice

[CL 2345102 by Richard TalbotWatkin in Main branch]
2014-10-30 12:47:58 -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
Justin Sargent
cc46fd8699 SWindow: Added two new options to SWindow to allow developers to create windows without a layout border about the edge of the window while still allowing for a user resize area.
[CL 2345033 by Justin Sargent in Main branch]
2014-10-30 12:29:05 -04:00
Jamie Dale
746477368a Converted composite fonts to store their embedded TTF/OTF font data as "bulk data"
This allows the data to be compressed and lazy loaded, so the embedded font data is now only loaded when FreeType needs to load it into a face.

[CL 2344987 by Jamie Dale in Main branch]
2014-10-30 12:26:46 -04:00
Nick Whiting
c426818943 #vr Integrating latest from Oculus branch, updating to 0.4.3 runtimes
[CL 2344973 by Nick Whiting in Main branch]
2014-10-30 12:26:08 -04:00
Jamie Dale
5270f53661 CIS fix
[CL 2342277 by Jamie Dale in Main branch]
2014-10-28 10:17:30 -04:00
Jamie Dale
f7430ac704 Initial support for composite fonts for Slate, UMG, and Canvas
Slate now has the concept of composite fonts and font families (via FCompositeFont and FTypeface). A composite font is a font that contains a default font family, as well as any number of sub-font families which should be used for a given set of character ranges. This change will greatly improve the localization support for fonts.

UFont assets can now use two forms of caching "offline" (which is the way they have always worked historically), and "runtime" (which utilizes the Slate font cache to cache glyphs on demand). These runtime cached UFont assets are now the only way to specify which font to use for a UMG widget, and address the previous issues about ensuring that the required font files were staged for your game.

The Slate font cache now works on FFontData instances, rather than filenames. This allows the UFont asset to embed a blob of TTF or OTF font data inside it, rather than require the fonts be loaded from files on disk.

The Canvas text renderer has been updated to support runtime cached UFont assets. This gives our legacy Canvas based tools the same improved font localization support as the rest of the Slate-based editor UI.

UFont asset creation has been changed to use runtime caching by default, and additionally, you can now import a TTF or OTF file via the Content Browser and it will automatically create a UFont asset. If you still want an offline cached UFont asset, you can just change the cache type in the font editor, and the usual font picker dialog will appear and allow you to generate a font texture atlas.

[CL 2342203 by Jamie Dale in Main branch]
2014-10-28 09:02:03 -04:00
Nick Atamas
da13439eeb Slate : further unification of even routing logic.
- All event types are now routed by FEventRouter.
- All replies are now based on a single FReplyBase, s.t. we can reason about them uniformly.
- Unified Focus and Pointer path routing.
- Removed all instances of TransformPointerEvent outside of FEventRouter.

[CL 2342192 by Nick Atamas in Main branch]
2014-10-28 08:41:55 -04:00
Nick Atamas
7b1d2edc07 Cleaning up event routing code after the addition of 3D WidgetComponent and hit-testing of 3D Widgets.
- Renamed FVirtualCursorPosition to FVirtualPointerPosition; we are going with Pointer as a generic name for all things Mouse, Touch, and Stylus.
- Slate's FArrangedWidget no longer has a VirtualPointerPosition; this is now stored in FWidgetAndPointer.
- WidgetPaths are aware of a virtual pointer position associated with every arranged widget.

[CL 2340420 by Nick Atamas in Main branch]
2014-10-24 17:47:24 -04:00
Nick Darnell
5ec9878c06 Slate - Adding PreciseClick for mouse interaction with SButton to allow for drag/droppable buttons.
[CL 2337203 by Nick Darnell in Main branch]
2014-10-22 13:36:53 -04:00
Nick Darnell
1bdb62f218 Slate/UMG - Bringing back no draw type, it has a purpose in UMG. Otherwise there is no other way to not draw some built in aspect of an existing widget.
[CL 2337143 by Nick Darnell in Main branch]
2014-10-22 13:36:05 -04:00
Dan Hertzka
c850a8e4c4 UMG 3D first pass
#codereview nick.atamas, matt.kuhlenschmidt

[CL 2336084 by Dan Hertzka in Main branch]
2014-10-21 14:59:48 -04:00
Cody Haskell
1c8c2aa756 #UE4
- Making Sort work on TPanelChildren

[CL 2335037 by Cody Haskell in Main branch]
2014-10-20 18:30:16 -04:00
Cody Haskell
a1154cc3dd Back out changelist 2334875
[CL 2335004 by Cody Haskell in Main branch]
2014-10-20 18:00:27 -04:00