Class GuiElementSwitchOld
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
public class GuiElementSwitchOld : GuiElementTextBase, IDisposable
- Inheritance
-
GuiElementSwitchOld
- Implements
- Inherited Members
- Extension Methods
Constructors
GuiElementSwitchOld(ICoreClientAPI, Action<bool>, ElementBounds)
public GuiElementSwitchOld(ICoreClientAPI capi, Action<bool> OnToggled, ElementBounds bounds)
Parameters
capi
ICoreClientAPIOnToggled
Action<bool>bounds
ElementBounds
Fields
On
public bool On
Field Value
Methods
ComposeElements(Context, ImageSurface)
Composes the elements.
public override void ComposeElements(Context ctxStatic, ImageSurface surface)
Parameters
ctxStatic
ContextThe context of the components.
surface
ImageSurfaceThe surface of the GUI.
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
api
ICoreClientAPIThe Client API
args
MouseEventThe mouse event args.
RenderInteractiveElements(float)
Renders the element as an interactive element.
public override void RenderInteractiveElements(float deltaTime)
Parameters
deltaTime
floatThe change in time.