Commit Graph

37 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
Nick Darnell
90e793745c Slate - ESlateCheckBoxState has been renamed to ECheckBoxState.
[CL 2384008 by Nick Darnell in Main branch]
2014-12-10 14:24:09 -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
Matthew Griffin
f1c4513760 Renaming FVector ClampSize and SafeNormal functions for clarity
Used DEPRECATED Macro to keep old names around in case I've missed anything

[CL 2370785 by Matthew Griffin in Main branch]
2014-11-26 10:01:12 -05:00
Ben Cosh
3650f14795 This change makes the comment bubbles interactive widgets which allow the user to double click the comment to edit and have extra optional pinning and visibility options.
#UE-2764 - ROCKET: TASK: K2: PUNTABLE: Allow double clicking on comment bubble to edit it.
#Branch UE4
#Proj Engine, UnrealEd, Slate, GraphEditor, BehaviourTreeEditor, EnvironmentQueryEditor, EditorStyle, ReferenceViewer, WorldBrowser

#codereview Nick.Atamas

[CL 2346951 by Ben Cosh in Main branch]
2014-11-03 10:40:57 -05:00
Thomas Sarkanen
22df8494db Fixed crash selecting sub-nodes in Behavior Trees
Crash was caused by the removal of the call to UpdateGraphNode() in SGraphPanel::AddNode(). This meant that sub-nodes didnt get a valid parent panal pointer set.
Allowing nodes to override SetOwner() lets BT sub-nodes correctly recieve their parent.
Also removed previous checks put in place to try to prevent the crash.

#codereview Mieszko.Zielinski

[CL 2332786 by Thomas Sarkanen in Main branch]
2014-10-17 05:01:49 -04:00
Mieszko Zielinski
7a4baf714d Fixed BTEditor crashing on selecting a service node #UE4
#codereview thomas.sarkanen, nick.atamas

[CL 2332267 by Mieszko Zielinski in Main branch]
2014-10-16 18:45:09 -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
Phillip Kavan
812df33807 [347817] BP perf - Removed a redundant node construction pass on graph panel updates.
- Cuts update timings roughly in half.
- Fixed issue that this change prevously had introduced: we just needed to ensure that all pin widgets are enabled/disabled when the owning node widget is enabled/disabled.

[CL 2329052 by Phillip Kavan in Main branch]
2014-10-14 15:43:17 -04:00
Michael Noland
4e663a66b1 GraphEditor: Fix some node titles (such as material nodes) having extra blank lines due to \\r injected by the text builder class
[CL 2299010 by Michael Noland in Main branch]
2014-09-15 21:53:46 -04:00
Michael Noland
fa7eb3328f GraphEditor: Make various padding values adjustable to iterate on more compact nodes (WIP / Experimental)
#codereview nick.whiting

[CL 2299009 by Michael Noland in Main branch]
2014-09-15 21:48:46 -04:00
Michael Noland
fff6984e40 GraphEditor: Pad the height of multi-line node titles to be a multiple of the graph snap grid taller than single-line nodes, so the pins will still line up if you place the node N cell snaps above
[CL 2298950 by Michael Noland in Main branch]
2014-09-15 19:53:19 -04:00
Thomas Sarkanen
ff9594e679 Right-click menu operations on Behavior Tree sub-nodes now work
Added new GetNodeUnderMouse() call to SGraphNode. This gives each node type the option of returning child nodes, rather than always operating on the top-level node.

TTP# 346150 - AI: BEHAVIORTREE: Unable to delete decorator and service using right click menu

[CL 2293617 by Thomas Sarkanen in Main branch]
2014-09-11 07:02:40 -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
Mike Beach
1b87f7d3ee Deprecating EdGraphNode's GetTooltip() (in exchange for one that returns FText over FString).
[CL 2283396 by Mike Beach in Main branch]
2014-09-03 18:14:09 -04:00
bruce nesbit
a923c042f5 Revised several graphnode tags for tutorial widgets.
Added tutorial widget support for autofocus (for BP nodes

[CL 2276100 by bruce nesbit in Main branch]
2014-08-28 09:38:24 -04:00
Nick Atamas
057f48f25b Slate: Removed legacy operator() from FArrangedWidgets in favor of operator[]. Fixed uses cases.
[CL 2270701 by Nick Atamas in Main branch]
2014-08-25 12:51:49 -04:00
Olaf Piesche
4e21704ff4 adding nullptr check
[CL 2256743 by Olaf Piesche in Main branch]
2014-08-14 15:50:32 -04:00
Olaf Piesche
a8ce05faa8 Changed FindBlueprintForGraphChecked to FindBlueprintForGraph to prevent asserts from firing
#codereview: bruce.nesbit

[CL 2256706 by Olaf Piesche in Main branch]
2014-08-14 15:49:56 -04:00
bruce nesbit
504df3b51d Fixed Assert in SGraphNode
[CL 2256319 by bruce nesbit in Main branch]
2014-08-14 11:29:36 -04:00
bruce nesbit
768c776bea Tweaked tags
#codereview Thomas.Sarkanen

[CL 2254511 by bruce nesbit in Main branch]
2014-08-13 09:22:55 -04:00
bruce nesbit
6b7fae845b Several tutorial tweaks:
Added some tags to several BP nodes (for use by tutorial)
Added provision to open relevant editor for highlighted widget
Added support for highlighting blueprints nodes

#codereview Thomas.Sarkanen

[CL 2254285 by bruce nesbit in Main branch]
2014-08-13 03:41:45 -04:00
Michael Trepka
5bd6255fde More Clang compile warning fixes
[CL 2237347 by Michael Trepka in Main branch]
2014-07-30 14:51:27 -04:00