Class UIRenderProcessor
The processor in charge of updating and drawing the entities having UI components.
public class UIRenderProcessor : EntityProcessor<UIComponent, RenderUIElement>, IEntityComponentRenderProcessor
- Inheritance
-
UIRenderProcessor
- Implements
- Inherited Members
Constructors
UIRenderProcessor()
Initializes a new instance of the UIRenderProcessor class.
public UIRenderProcessor()
Properties
UIRoots
public List<RenderUIElement> UIRoots { get; }
Property Value
VisibilityGroup
public VisibilityGroup VisibilityGroup { get; set; }
Property Value
Methods
Draw(RenderContext)
Performs work related to this processor.
public override void Draw(RenderContext gameTime)
Parameters
gameTime
RenderContext
GenerateComponentData(Entity, UIComponent)
Generates associated data to the given entity.
protected override RenderUIElement GenerateComponentData(Entity entity, UIComponent component)
Parameters
entity
EntityThe entity.
component
UIComponent
Returns
- RenderUIElement
The associated data.
IsAssociatedDataValid(Entity, UIComponent, RenderUIElement)
Checks if the current associated data is valid, or if readding the entity is required.
protected override bool IsAssociatedDataValid(Entity entity, UIComponent component, RenderUIElement associatedData)
Parameters
entity
EntityThe entity.
component
UIComponentassociatedData
RenderUIElementThe associated data.
Returns
- bool
True if the change in associated data requires the entity to be readded, false otherwise.
OnEntityComponentAdding(Entity, UIComponent, RenderUIElement)
Run when a matching entity is added to this entity processor.
protected override void OnEntityComponentAdding(Entity entity, UIComponent uiComponent, RenderUIElement renderUIElement)
Parameters
entity
EntityThe entity.
uiComponent
UIComponentrenderUIElement
RenderUIElement
OnEntityComponentRemoved(Entity, UIComponent, RenderUIElement)
Run when a matching entity is removed from this entity processor.
protected override void OnEntityComponentRemoved(Entity entity, UIComponent uiComponent, RenderUIElement renderUIElement)
Parameters
entity
EntityThe entity.
uiComponent
UIComponentrenderUIElement
RenderUIElement