Responsible for visualizing data from described by FScenario.
More...
#include <VisualRenderer.h>
|
| UVisualRenderer (const FObjectInitializer &ObjectInitializer=FObjectInitializer::Get()) |
|
virtual void | DrawScene (const FScenario *Scene) |
| Assembles widgets for the scene.
|
|
bool | IsTransitionInProgress () const |
|
bool | TryDrawTransition (const FScenario *From, const FScenario *To) |
| Tries to start and visualize transition material with backgrounds from specified scenes.
|
|
void | ForceStopTransition () |
| Unconditionally stops ongoing transition.
|
|
|
virtual TSharedRef< SWidget > | RebuildWidget () override |
| Constructs underlying slate widget and widgets needed for drawing scenes.
|
|
virtual void | NativeOnInitialized () override |
| Initializes renderer properties and transition animation.
|
|
virtual void | OnAnimationFinished_Implementation (const UWidgetAnimation *Animation) override |
| Finishes transition.
|
|
void | ForEachSprite (TFunction< void(UVisualSprite *Sprite)> Action) |
| Iterates over each UVisualSprite in the canvas panel.
|
|
|
TObjectPtr< UWidgetAnimation > | Transition |
| Widget animation used to drive transition between scenes.
|
|
const FScenario * | FinalScene |
| Scene that will be displayed after transition ends.
|
|
TObjectPtr< UBackgroundVisualImage > | Background |
| Persistent widget that displays scene background.
|
|
TObjectPtr< UCanvasPanel > | Canvas |
| Persistent widget that holds background and all sprites of the scene.
|
|
Responsible for visualizing data from described by FScenario.
Renderer supports custom transitions between scene backgrounds that are defined by FBackground::TransitionMaterial. Transition is driven by widget animation and can be configured in UVisualUSettings class.
- Note
- not blueprintable
◆ DrawScene()
void UVisualRenderer::DrawScene |
( |
const FScenario * | Scene | ) |
|
|
virtual |
Assembles widgets for the scene.
- Parameters
-
◆ ForEachSprite()
void UVisualRenderer::ForEachSprite |
( |
TFunction< void(UVisualSprite *Sprite)> | Action | ) |
|
|
protected |
Iterates over each UVisualSprite in the canvas panel.
- Parameters
-
Action | callable that will be executed for each sprite |
◆ IsTransitionInProgress()
bool UVisualRenderer::IsTransitionInProgress |
( |
| ) |
const |
◆ OnAnimationFinished_Implementation()
void UVisualRenderer::OnAnimationFinished_Implementation |
( |
const UWidgetAnimation * | Animation | ) |
|
|
overrideprotectedvirtual |
Finishes transition.
- Parameters
-
Animation | finished transition animation |
◆ RebuildWidget()
TSharedRef< SWidget > UVisualRenderer::RebuildWidget |
( |
| ) |
|
|
overrideprotectedvirtual |
Constructs underlying slate widget and widgets needed for drawing scenes.
Renderer always has a canvas panel to which visual sprites are added, and one persistent visual image for scene background.
- Returns
- underlying slate widget
- See also
- UVisualRenderer::Background UVisualRenderer::Canvas
◆ TryDrawTransition()
Tries to start and visualize transition material with backgrounds from specified scenes.
Logical transition between scenes is handled by UVisualController.
- Parameters
-
From | scene which is drawn currently |
To | scene that will be drawn after transition ends |
- Returns
true
for started transition
- See also
- UVisualRenderer::Transition
◆ FinalScene
Scene that will be displayed after transition ends.
It temporarily used during transition process. It is invalid when transition does not occur.
◆ Transition
TObjectPtr<UWidgetAnimation> UVisualRenderer::Transition |
|
private |
Widget animation used to drive transition between scenes.
It can be configured in UVisualUSettings.
- Note
- Transient. It will not be serialized.
The documentation for this class was generated from the following files:
- VisualRenderer.h
- VisualRenderer.cpp