Table of Contents

Class GuiJsonDialog

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll

This is a dialogue built from JSON files.

public class GuiJsonDialog : GuiDialogGeneric, IDisposable
Inheritance
GuiJsonDialog
Implements
Inherited Members
Extension Methods

Remarks

JSON made this gui. Thanks JSON.

Constructors

GuiJsonDialog(JsonDialogSettings, ICoreClientAPI)

Builds the dialog using the dialog settings from JSON.

public GuiJsonDialog(JsonDialogSettings settings, ICoreClientAPI capi)

Parameters

settings JsonDialogSettings

The dialog settings.

capi ICoreClientAPI

The Client API

GuiJsonDialog(JsonDialogSettings, ICoreClientAPI, bool)

Builds the dialog using the dialog settings from JSON.

public GuiJsonDialog(JsonDialogSettings settings, ICoreClientAPI capi, bool focusFirstElement)

Parameters

settings JsonDialogSettings

The dialog settings.

capi ICoreClientAPI

The Client API

focusFirstElement bool

Should the first element be focused, after building the dialog?

Properties

DebugName

The debug name of the GUI

public override string DebugName { get; }

Property Value

string

PrefersUngrabbedMouse

Gets whether it is preferred for the mouse to be not grabbed while this dialog is opened. If true (default), the Alt button needs to be held to manually grab the mouse.

public override bool PrefersUngrabbedMouse { get; }

Property Value

bool

ToggleKeyCombinationCode

Key Combination for the GUI

public override string ToggleKeyCombinationCode { get; }

Property Value

string

Methods

ComposeDialog(bool)

Composes the dialogue with specifications dictated by JSON.

public void ComposeDialog(bool focusFirstElement = false)

Parameters

focusFirstElement bool

OnMouseDown(MouseEvent)

Fires an event when the mouse is held down.

public override void OnMouseDown(MouseEvent args)

Parameters

args MouseEvent

The mouse events.

OnMouseUp(MouseEvent)

Fires when a mouse button is released.

public override void OnMouseUp(MouseEvent args)

Parameters

args MouseEvent

The mouse button or buttons in question.

Recompose()

Recomposes the GUI.

public override void Recompose()

ReloadValues()

Reloads the values in the GUI.

public void ReloadValues()