UIRenderFeature Class
Namespace: Stride.Rendering.UIAssembly: Stride.UI.dll
public class UIRenderFeature : RootRenderFeature, IComponent, IReferencable, ICollectorHolder, IGraphicsRendererCore, IDisposable
              | Name | Description | |
|---|---|---|
| Constructors | ||
| UIRenderFeature() | ||
| Properties | ||
| SupportedRenderObjectType | ||
| UIElementUnderMouseCursor | Represents the UI-element thats currently under the mouse cursor. Only elements with CanBeHitByUser == true are taken into account. Last processed element_state / ?UIComponent? with a valid element will be used.  | 
                          |
| Methods | ||
| Draw(RenderDrawContext, RenderView, RenderViewStage, Int32, Int32) | ||
| GetElementAtScreenPosition(UIElement, ref Ray, ref Matrix, ref Vector3) | Gets the element with which the clickRay intersects, or null if none is found  | 
                          |
| GetElementsAtPosition(UIElement, ref Ray, ref Matrix) | Gets all elements that the given   | 
                          |
| GetRenderer(UIElement) | ||
| InitializeCore() | ||
| RegisterRenderer(UIElement, ElementRenderer) | ||
| RegisterRendererFactory(Type, IElementRendererFactory) | ||
Constructors
UIRenderFeature()
public UIRenderFeature()
              Properties
SupportedRenderObjectType
public override Type SupportedRenderObjectType { get; }
              Property Value
| Type | Description | 
|---|---|
| System.Type | 
Overrides
UIElementUnderMouseCursor
Represents the UI-element thats currently under the mouse cursor. Only elements with CanBeHitByUser == true are taken into account. Last processed element_state / ?UIComponent? with a valid element will be used.
public UIElement UIElementUnderMouseCursor { get; }
              Property Value
| Type | Description | 
|---|---|
| UIElement | 
Methods
Draw(RenderDrawContext, RenderView, RenderViewStage, Int32, Int32)
public override void Draw(RenderDrawContext context, RenderView renderView, RenderViewStage renderViewStage, int startIndex, int endIndex)
              Parameters
| Type | Name | Description | 
|---|---|---|
| RenderDrawContext | context | |
| RenderView | renderView | |
| RenderViewStage | renderViewStage | |
| System.Int32 | startIndex | |
| System.Int32 | endIndex | 
Overrides
GetElementAtScreenPosition(UIElement, ref Ray, ref Matrix, ref Vector3)
Gets the element with which the clickRay intersects, or null if none is found
public static UIElement GetElementAtScreenPosition(UIElement rootElement, ref Ray clickRay, ref Matrix worldViewProj, ref Vector3 intersectionPoint)
              Parameters
| Type | Name | Description | 
|---|---|---|
| UIElement | rootElement | The root UIElement from which it should test  | 
                  
| Ray | clickRay | Ray from the click in object space of the ui component in (-Resolution.X/2 .. Resolution.X/2, -Resolution.Y/2 .. Resolution.Y/2) range  | 
                  
| Matrix | worldViewProj | |
| Vector3 | intersectionPoint | Intersection point between the ray and the element  | 
                  
Returns
| Type | Description | 
|---|---|
| UIElement | The UIElement with which the ray intersects  | 
                  
GetElementsAtPosition(UIElement, ref Ray, ref Matrix)
Gets all elements that the given ray intersects.
public static ICollection<UIRenderFeature.HitTestResult> GetElementsAtPosition(UIElement rootElement, ref Ray ray, ref Matrix worldViewProj)
              Parameters
| Type | Name | Description | 
|---|---|---|
| UIElement | rootElement | The root UIElement from which it should test  | 
                  
| Ray | ray | Ray from the click in object space of the ui component in (-Resolution.X/2 .. Resolution.X/2, -Resolution.Y/2 .. Resolution.Y/2) range  | 
                  
| Matrix | worldViewProj | 
Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.ICollection<UIRenderFeature.HitTestResult> | A collection of all elements hit by this ray, or an empty collection if no hit.  | 
                  
GetRenderer(UIElement)
public ElementRenderer GetRenderer(UIElement element)
              Parameters
| Type | Name | Description | 
|---|---|---|
| UIElement | element | 
Returns
| Type | Description | 
|---|---|
| ElementRenderer | 
InitializeCore()
protected override void InitializeCore()
              Overrides
RegisterRenderer(UIElement, ElementRenderer)
public void RegisterRenderer(UIElement element, ElementRenderer renderer)
              Parameters
| Type | Name | Description | 
|---|---|---|
| UIElement | element | |
| ElementRenderer | renderer | 
RegisterRendererFactory(Type, IElementRendererFactory)
public void RegisterRendererFactory(Type uiElementType, IElementRendererFactory factory)
              Parameters
| Type | Name | Description | 
|---|---|---|
| System.Type | uiElementType | |
| IElementRendererFactory | factory |