Class GuiJsonDialog
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
This is a dialogue built from JSON files. Open in GitHub
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
settingsJsonDialogSettingsThe dialog settings.
capiICoreClientAPIThe Client API
GuiJsonDialog(JsonDialogSettings, ICoreClientAPI, bool)
Builds the dialog using the dialog settings from JSON.
public GuiJsonDialog(JsonDialogSettings settings, ICoreClientAPI capi, bool focusFirstElement)
Parameters
settingsJsonDialogSettingsThe dialog settings.
capiICoreClientAPIThe Client API
focusFirstElementboolShould the first element be focused, after building the dialog?
Properties
DebugName
The debug name of the GUI
public override string DebugName { get; }
Property Value
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
ToggleKeyCombinationCode
Key Combination for the GUI
public override string ToggleKeyCombinationCode { get; }
Property Value
Methods
ComposeDialog(bool)
Composes the dialogue with specifications dictated by JSON.
public void ComposeDialog(bool focusFirstElement = false)
Parameters
focusFirstElementbool
OnMouseDown(MouseEvent)
Fires an event when the mouse is held down.
public override void OnMouseDown(MouseEvent args)
Parameters
argsMouseEventThe mouse events.
Recompose()
Recomposes the GUI.
public override void Recompose()
ReloadValues()
Reloads the values in the GUI.
public void ReloadValues()