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
JsonDialogSettingsThe dialog settings.
capi
ICoreClientAPIThe 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
JsonDialogSettingsThe dialog settings.
capi
ICoreClientAPIThe Client API
focusFirstElement
boolShould 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
focusFirstElement
bool
OnMouseDown(MouseEvent)
Fires an event when the mouse is held down.
public override void OnMouseDown(MouseEvent args)
Parameters
args
MouseEventThe mouse events.
OnMouseUp(MouseEvent)
Fires when a mouse button is released.
public override void OnMouseUp(MouseEvent args)
Parameters
args
MouseEventThe mouse button or buttons in question.
Recompose()
Recomposes the GUI.
public override void Recompose()
ReloadValues()
Reloads the values in the GUI.
public void ReloadValues()