Class GuiElementDialogTitleBar
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
A title bar for your GUI. Open in GitHub
public class GuiElementDialogTitleBar : GuiElementTextBase, IDisposable
- Inheritance
-
GuiElementDialogTitleBar
- Implements
- Inherited Members
- Extension Methods
Constructors
GuiElementDialogTitleBar(ICoreClientAPI, string, GuiComposer, Action, CairoFont, ElementBounds)
Creates a new title bar.
public GuiElementDialogTitleBar(ICoreClientAPI capi, string text, GuiComposer composer, Action OnClose = null, CairoFont font = null, ElementBounds bounds = null)
Parameters
capiICoreClientAPIThe Client API.
textstringThe text on the title bar.
composerGuiComposerThe GuiComposer for the title bar.
OnCloseActionThe event fired when the title bar is closed.
fontCairoFontThe font of the title bar.
boundsElementBoundsThe bounds of the title bar.
Fields
drawBg
public bool drawBg
Field Value
unscaledCloseIconSize
The size of the close icon in the top right corner of the GUI.
public static int unscaledCloseIconSize
Field Value
Properties
Movable
public bool Movable { get; }
Property Value
Methods
ComposeTextElements(Context, ImageSurface)
public override void ComposeTextElements(Context ctx, ImageSurface surface)
Parameters
ctxContextsurfaceImageSurface
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public override void Dispose()
OnFocusLost()
The event fired when the element looses focus.
public override void OnFocusLost()
OnKeyDown(ICoreClientAPI, KeyEvent)
The event fired when a key is held down.
public override void OnKeyDown(ICoreClientAPI api, KeyEvent args)
Parameters
apiICoreClientAPIThe client API
argsKeyEventThe key event arguments.
OnMouseDown(ICoreClientAPI, MouseEvent)
The event fired when the mouse is down the element is around. Fires before OnMouseDownOnElement, however OnMouseDownOnElement is called within the base function.
public override void OnMouseDown(ICoreClientAPI api, MouseEvent args)
Parameters
apiICoreClientAPIThe Client API
argsMouseEvent
OnMouseMove(ICoreClientAPI, MouseEvent)
The event fired when the mouse is moved.
public override void OnMouseMove(ICoreClientAPI api, MouseEvent args)
Parameters
apiICoreClientAPIThe Client API.
argsMouseEventThe mouse event arguments.
OnMouseUp(ICoreClientAPI, MouseEvent)
The event fired when the mouse is released.
public override void OnMouseUp(ICoreClientAPI api, MouseEvent args)
Parameters
apiICoreClientAPIThe Client API.
argsMouseEventThe arguments for the mouse event.
OnMouseUpOnElement(ICoreClientAPI, MouseEvent)
The event fired when the mouse is released on the element. Called after OnMouseUp.
public override void OnMouseUpOnElement(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.