This utilizes the message bus to allow you to take widget snapshots from any remote target that hosts the WidgetSnapshotService.
[CL 2709439 by Jamie Dale in Main branch]
Major changes:
- The widget reflector UI now uses tabs. The hierarchy and stats views have been moved to tabs, and new tabs have been added to support picking widgets from a snapshot.
- The widget reflector node trees are no longer using UObject types. The idea here was to make the serialization easier, but it didn't work and I ended up using JSON instead.
- When you take or load a widget snapshot, you're now shown the screenshot of the window associated with that snapshot, and are able to pick widgets from it as you would do with a live tree.
API changes:
- The tab spawners for the widget reflector and atlas visualizers are now registered automatically when the SlateReflector module is loaded. These are now the only way to create these windows.
- The tabbed layout within the widget reflector has made it impossible to create the widget reflector unless spawned via a tab manager. To this end, the following functions have been removed from ISlateReflectorModule:
- GetWidgetReflector
- GetAtlasVisualizer
- GetTextureAtlasVisualizer
- GetFontAtlasVisualizer
- These functions used to be used to create a raw widget reflector or atlas viewer widget.
- If you were doing this because you were placing it into your own window, you can take advantage of the fact that the widget reflector tab spawner is always available, and use the global tab manager to create your window and place a spawned widget reflector tab inside it - SummonPerfTestSuite in SPerfSuite.cpp provides an example of this.
- If you were doing this in the handler of your own widget reflector tab spawner, you can either just use the standard widget reflector tab spawner instead (you need to load the SlateReflector module once, and then "WidgetReflector" will be available to spawn via the global tab manager), or you can just use the DisplayWidgetReflector function of ISlateReflectorModule (which will internally do the same thing).
[CL 2661609 by Jamie Dale in Main branch]
Moved the existing atlas visualizer out of the Slate RHI renderer and instead made the resource manager for each renderer implement the ISlateAtlasProvider interface to provide information about its current texture atlases. FSlateFontCache implements ISlateAtlasProvider for the font atlas viewer.
Improved the atlas visualizer and added support for zooming and panning of the atlas pages. This helps greatly when viewing font atlases as they can be as large as 2048x2048.
#codereview Matt.Kuhlenschmidt
[CL 2371483 by Jamie Dale in Main branch]
* 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]
Please note that file comments had no purpose in nearly all cases and just added visual clutter. The two files that had meaningful file comments had their comments moved into the corresponding classes. There are still hundreds of file comments left in other files that will be removed over time.
Also cleaned up some random stuff along the way:
- relative paths to public headers within the same module are no longer necessary (automatically discovered by UBT now)
- header guards are deprecated, use #pragma once instead (all compilers support it now)
- space between multiple template brackets is no longer required (all compilers support >> now)
- NULL to nullptr, OVERRIDE to override
- spelling errors, whitespace, line breaks
[CL 2104067 by Max Preussner in Main branch]
Other Updates:
- The WidgetReflector is now in its own module as well. It will be converted to a plug-in later.
- The Public API of both Slate and SlateCore has largely been reorganized for better discoverabilty. More cleanup work is needed.
- Added a lot of missing API documentation and fixed existing ones. More and better documentation is needed.
- Removed dead code, fixed a couple things I stubled upon, and conformed to coding guidelines (NULL vs nullptr, line breaks, etc.)
Upgrade Notes:
- The Slate Remote Server is currently disabled - will be re-enabled shortly!
- If your module previously had a module dependency to 'Slate', it now also needs a PrivateModuleDependency to 'SlateCore' in its Build.cs file.
- If your module exposes in any of its Public header files types that are now declared in SlateCore, it needs a PublicModuleDependency to 'SlateCore'
- The ToolTip property type on SWidget has changed from SToolTip to IToolTip; change local variables to TSharedPtr<IToolTip> instead of TSharedPtr<SToolTip> where needed
- IToolTip is not a widget. If you need access to the actual widget that represents the tool tip, use IToolTip::AsWidget(); If you need access to the tool tip's content, use IToolTip::GetContentWidget()
Troubleshooting:
- After syncing to this changelist you may have to clean your /Engine/Intermediate/Build/ directory and rebuild your entire project
- If in your project you are getting linker errors for unresolved types that are now declared in SlateCore, you may be missing a dependency to 'SlateCore'
- If in the Engine code you are getting linker errors for unresolved types that are now declared in SlateCore, you may need to rebuild the entire Engine
[CL 2057118 by Max Preussner in Main branch]