Class DialogRenderer
- Namespace
- OmegaGUI
- Assembly
- OmegaGUI.dll
public sealed class DialogRenderer : IDisposable
- Inheritance
-
DialogRenderer
- Implements
- Inherited Members
- Extension Methods
Constructors
DialogRenderer(GuiManager, Dialog, Point, Lua?)
Creates a new dialog renderer for a Dialog
public DialogRenderer(GuiManager manager, Dialog dialog, Point location = default, Lua? lua = null)
Parameters
managerGuiManagerThe GuiManager used to interface with the Engine
dialogDialogThe dialog to be displayed
locationPointThe location of the dialog on the screen
luaLuaThe scripting engine to execute event handlers.
DialogRenderer(GuiManager, string, Point, Lua?)
Creates a new dialog renderer from an XML file
public DialogRenderer(GuiManager manager, string filename, Point location = default, Lua? lua = null)
Parameters
managerGuiManagerThe GuiManager used to interface with the Engine
filenamestringThe filename of the XML file to load
locationPointThe location of the dialog on the screen
luaLuaThe scripting engine to execute event handlers.
Properties
DialogModel
The dialog to be displayed
public Dialog DialogModel { get; }
Property Value
DialogRender
The rendering system used to display DialogModel
public Dialog DialogRender { get; }
Property Value
Disposed
Has this dialog been disposed?
[Browsable(false)]
public bool Disposed { get; }
Property Value
Name
Text value to make it easier to identify a particular dialog
public string? Name { get; set; }
Property Value
Methods
Close()
Closes the dialog
public void Close()
Dispose()
Removes the Engine hooks and queues the LuaInterface.Lua interpreter for disposal
public void Dispose()
~DialogRenderer()
protected ~DialogRenderer()
GetControl(string)
Gets the first Control in this DialogRenderer with the specified name
public Control GetControl(string name)
Parameters
namestring
Returns
Exceptions
- ArgumentNullException
nameisnull.- KeyNotFoundException
An element with the specified key does not exist in the dictionary.
ImportLua(string)
Imports an external Lua script into the GUI's Lua instance
public void ImportLua(string filename)
Parameters
filenamestringThe Lua file to import
MsgBox(string)
public void MsgBox(string text)
Parameters
textstring
MsgBox(string, MsgBoxType, Action<MsgBoxResult>?)
public void MsgBox(string text, MsgBoxType type, Action<MsgBoxResult>? callback)
Parameters
textstringtypeMsgBoxTypecallbackAction<MsgBoxResult>
MsgBox(string, Action<MsgBoxResult>?)
public void MsgBox(string text, Action<MsgBoxResult>? callback)
Parameters
textstringcallbackAction<MsgBoxResult>
SetLocation(int, int)
Changes the dialog's on-screen position.
public void SetLocation(int x, int y)
Parameters
Show()
Show the dialog
public void Show()
ShowModal()
Show the dialog with exclusive mouse handling
public void ShowModal()
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Update()
Update the dialog output
public void Update()