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
ICoreClientAPIThe Client API.
text
stringThe text on the title bar.
composer
GuiComposerThe GuiComposer for the title bar.
OnClose
ActionThe event fired when the title bar is closed.
font
CairoFontThe font of the title bar.
bounds
ElementBoundsThe 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
ctx
Contextsurface
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
ICoreClientAPIThe client API
args
KeyEventThe 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
ICoreClientAPIThe 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
ICoreClientAPIThe Client API.
args
MouseEventThe mouse event arguments.
OnMouseUp(ICoreClientAPI, MouseEvent)
The event fired when the mouse is released.
public override void OnMouseUp(ICoreClientAPI api, MouseEvent args)
Parameters
api
ICoreClientAPIThe Client API.
args
MouseEventThe 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
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.