Commit Graph

13 Commits

Author SHA1 Message Date
Jamie Dale
bbb0624bff Fixed code relying on SLATE_TEXT_ATTRIBUTE for tooltips.
UETOOL-213 - Minimize Slate FString -> FText conversion (remove SLATE_TEXT_ATTRIBUTE)

This fixes any editor/engine specific code that was passing text to Slate as FString rather than FText.

[CL 2401019 by Jamie Dale in Main branch]
2015-01-08 11:35:01 -05:00
Jamie Dale
a569f6b356 Fixed code relying on SLATE_TEXT_ATTRIBUTE for STextBlock.
UETOOL-213 - Minimize Slate FString -> FText conversion (remove SLATE_TEXT_ATTRIBUTE)

This fixes any editor/engine specific code that was passing text to Slate as FString rather than FText.

[CL 2399803 by Jamie Dale in Main branch]
2015-01-07 09:52:40 -05:00
Dan Hertzka
c042ddcb94 ---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.

While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
    1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
        - Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
    2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.

- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
    - Examples include animation, async operations that update periodically, progress updates, loading bars, etc.

- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.

- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
    - There are THREE ways to unregister an active tick:
        1. Return EActiveTickReturnType::StopTicking from the active tick function
        2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
        3. Destroy the widget responsible for the active tick

- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
    - The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)

- The FCurveSequence API has been updated to work with the active tick system
    - Playing a curve sequence now requires that you pass the widget being animated by the sequence
    - The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
    - GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.

[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
John Abercrombie
4e9ac6444a Merging using UE4-Fortnite-To-UE4 @ CL 2382284
[CL 2388856 by John Abercrombie in Main branch]
2014-12-15 15:29:48 -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
Olaf Piesche
a7eccc4333 Fix for a compilation error. This may be temporary - it's the only way I know of right now to fix a missing symbol error for NAME_DefaultPinLabelStyle.
[CL 2335071 by Olaf Piesche in Main branch]
2014-10-20 19:15:26 -04:00
Maciej Mroz
c44c59dc71 Fix for crash in FKnotNetCollector
[CL 2282941 by Maciej Mroz in Main branch]
2014-09-03 09:51:48 -04:00
Ben Cosh
34f4d6d5fd Modified the dragdrop operations in the blueprint graphs to respect read only attributes set on either graphs or nodes.
#TTP 334976 - BLUEPRINTS: Drag-dropping can still create nodes in read-only graphs (e.g., during PIE or when viewing an anim parent graph)
#Branch UE4
#Proj GraphEditor

#Add added SGraphPanel::IsGraphEditable so nodes and objects placed in the graph can easily determine if the graph is read only.
#Change Modified SGraphPanel::OnDragLeave to restore the tooltip if a FDecoratedDragDropOp has been modified to indicate that the graph is read only.
#Change Modified SGraphPanel::OnDragOver to change the icon on the tooltip to a lined circle if the graph is read only.
#Change Modified SGraphPanel::OnDrop to exit without changes if the graph is read only.
#Change Modified FGraphEditorDragDropAction to present feedback to the user if the drag drop target is invalid. this is activated by setting FGraphEditorDragDropAction::SetDropTargetValid, this just collpases the active icon and displays a lined circle with the same tooltip when set to false.
#Add added SGraphNode::IsNodeEditable to determine if the node is currently editable, based on an evaluation of the IsEditable attribute and the parent graphs IsGraphEditable.
#Change modified SGraphNode::OnDragOver to display a lined circle if the parent graph or the node is read only.
#Change modified SGraphNode::OnDrop to exit without changes if the parent graph or the node is read only.
#Change modified SGraphPin::OnDrop to exit without changes if the parent graph or the owner node is read only.

ReviewedBy Chris.Wood, Nick.Whiting

[CL 2109030 by Ben Cosh in Main branch]
2014-06-18 05:04:59 -04:00
Max Preussner
8fec9bafc3 Settings: moved graph editor settings into GraphEditor module; added 'Graph Editor' settings section to Settings UI
Settings specific to Anim, Blueprint and Material Editor should probably be broken out into their own settings classes in the respective modules at some point. It feels a little strange that the GraphEditor needs to be aware of specific pin and node title types. At this time I did not want to refactor the existing graph editors though, and since many of the properties are currently being shared, pulling these settings out of UEditorUserSettings is at least a good first step. In the future I would like to see settings sections for specific graph based editors instead of having a generic 'Graph Editor' section that is shared by some or all editors.

I exposed various color settings in the UI as many users seem to be quite excited about customizing their Editor. If you think that some settings should be added or removed, please feel free to make any desired changes or let me know. Thanks!

#CodeReview: nick.whiting

[CL 2079703 by Max Preussner in Main branch]
2014-05-20 19:00:53 -04:00
Michael Noland
6046bb9cc9 Blueprints: Add reroute nodes to help organize wires
- Clean up FDragConnection construction and add a factory function in SGraphPin to extend it for some pins
- Clean up arguments to FOnGetContextMenuFor in SGraphPanel
- Various modifications to SGraphPin to permit implementation of wire knots/reroute nodes
#codereview nick.whiting

[CL 2074801 by Michael Noland in Main branch]
2014-05-15 17:34:14 -04:00
Andrew Rodham
07b90d1da2 #ttp 331268 - SLATE: Replace instances of DragDrop::IsTypeMatch with FDragDropEvent::GetOperationAs()
#summary  Replaced instances of DragDrop::IsTypeMatch with FDragDropEvent::GetOperationAs()
#note Please change any instances of DragDrop::IsTypeMatch for the templated FDragDropEvent::GetOperationAs<>() or FDragDropOperation::IsOfType<>() where necessary
#proj Editor
#branch UE4
#reviewedby Nick.Atamas

[CL 2042222 by Andrew Rodham in Main branch]
2014-04-23 18:00:50 -04:00
Nick Darnell
b96d695522 * FDragDropOperation now inherits from TSharedFromThis, no need to do it on subclasses any more. I've removed it from the subclasses that were also doing it.
* FDecoratedDragDropOp's Hover text is now FText, instead of FString.

[CL 2041690 by Nick Darnell in Main branch]
2014-04-23 17:55:20 -04:00
Tim Sweeney
324683ce78 Engine source (Main branch up to CL 2026164) 2014-03-14 14:13:41 -04:00