Table of Contents

Class GuiElementDialogTitleBar

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll

A title bar for your GUI.

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

capi ICoreClientAPI

The Client API.

text string

The text on the title bar.

composer GuiComposer

The GuiComposer for the title bar.

OnClose Action

The event fired when the title bar is closed.

font CairoFont

The font of the title bar.

bounds ElementBounds

The bounds of the title bar.

Fields

drawBg

public bool drawBg

Field Value

bool

unscaledCloseIconSize

The size of the close icon in the top right corner of the GUI.

public static int unscaledCloseIconSize

Field Value

int

Properties

Movable

public bool Movable { get; }

Property Value

bool

Methods

ComposeTextElements(Context, ImageSurface)

public override void ComposeTextElements(Context ctx, ImageSurface surface)

Parameters

ctx Context
surface ImageSurface

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

api ICoreClientAPI

The client API

args KeyEvent

The 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

api ICoreClientAPI

The Client API

args MouseEvent

OnMouseMove(ICoreClientAPI, MouseEvent)

The event fired when the mouse is moved.

public override void OnMouseMove(ICoreClientAPI api, MouseEvent args)

Parameters

api ICoreClientAPI

The Client API.

args MouseEvent

The mouse event arguments.

OnMouseUp(ICoreClientAPI, MouseEvent)

The event fired when the mouse is released.

public override void OnMouseUp(ICoreClientAPI api, MouseEvent args)

Parameters

api ICoreClientAPI

The Client API.

args MouseEvent

The 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

api ICoreClientAPI

The Client API

args MouseEvent

The mouse event args.

RenderInteractiveElements(float)

Renders the element as an interactive element.

public override void RenderInteractiveElements(float deltaTime)

Parameters

deltaTime float

The change in time.