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
- capiICoreClientAPI
- The Client API. 
- textstring
- The text on the title bar. 
- composerGuiComposer
- The GuiComposer for the title bar. 
- OnCloseAction
- The event fired when the title bar is closed. 
- fontCairoFont
- The font of the title bar. 
- boundsElementBounds
- The bounds of the title bar. 
Fields
drawBg
public bool drawBgField Value
unscaledCloseIconSize
The size of the close icon in the top right corner of the GUI.
public static int unscaledCloseIconSizeField Value
Properties
Movable
public bool Movable { get; }Property Value
Methods
ComposeTextElements(Context, ImageSurface)
public override void ComposeTextElements(Context ctx, ImageSurface surface)Parameters
- ctxContext
- surfaceImageSurface
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
- apiICoreClientAPI
- The client API 
- argsKeyEvent
- 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
- apiICoreClientAPI
- The Client API 
- argsMouseEvent
OnMouseMove(ICoreClientAPI, MouseEvent)
The event fired when the mouse is moved.
public override void OnMouseMove(ICoreClientAPI api, MouseEvent args)Parameters
- apiICoreClientAPI
- The Client API. 
- argsMouseEvent
- The mouse event arguments. 
OnMouseUp(ICoreClientAPI, MouseEvent)
The event fired when the mouse is released.
public override void OnMouseUp(ICoreClientAPI api, MouseEvent args)Parameters
- apiICoreClientAPI
- The Client API. 
- argsMouseEvent
- 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
- apiICoreClientAPI
- The Client API 
- argsMouseEvent
- The mouse event args. 
RenderInteractiveElements(float)
Renders the element as an interactive element.
public override void RenderInteractiveElements(float deltaTime)Parameters
- deltaTimefloat
- The change in time.