Class GuiElementCustomRender
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
public class GuiElementCustomRender : GuiElement, IDisposable
- Inheritance
-
GuiElementCustomRender
- Implements
- Inherited Members
- Extension Methods
Constructors
GuiElementCustomRender(ICoreClientAPI, ElementBounds, RenderDelegateWithBounds)
Adds a custom drawing element to the GUI
public GuiElementCustomRender(ICoreClientAPI capi, ElementBounds bounds, RenderDelegateWithBounds onRender)
Parameters
capiICoreClientAPIThe Client API
boundsElementBoundsThe bounds of the Element
onRenderRenderDelegateWithBoundsThe event fired when the object is drawn.
Methods
ComposeElements(Context, ImageSurface)
Composes the elements.
public override void ComposeElements(Context ctxStatic, ImageSurface surfaceStatic)
Parameters
ctxStaticContextThe context of the components.
surfaceStaticImageSurface
OnMouseDownOnElement(ICoreClientAPI, MouseEvent)
The event fired when the mouse is pressed while on the element. Called after OnMouseDown and tells the engine that the event is handled.
public override void OnMouseDownOnElement(ICoreClientAPI api, MouseEvent args)
Parameters
apiICoreClientAPIThe Client API
argsMouseEventThe mouse event args.
RenderInteractiveElements(float)
Renders the element as an interactive element.
public override void RenderInteractiveElements(float deltaTime)
Parameters
deltaTimefloatThe change in time.