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
manager
GuiManagerThe GuiManager used to interface with the Engine
dialog
DialogThe dialog to be displayed
location
PointThe location of the dialog on the screen
lua
LuaThe 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
manager
GuiManagerThe GuiManager used to interface with the Engine
filename
stringThe filename of the XML file to load
location
PointThe location of the dialog on the screen
lua
LuaThe 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
name
string
Returns
Exceptions
- ArgumentNullException
name
isnull
.- 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
filename
stringThe Lua file to import
MsgBox(string)
public void MsgBox(string text)
Parameters
text
string
MsgBox(string, MsgBoxType, Action<MsgBoxResult>)
public void MsgBox(string text, MsgBoxType type, Action<MsgBoxResult> callback)
Parameters
text
stringtype
MsgBoxTypecallback
Action<MsgBoxResult>
MsgBox(string, Action<MsgBoxResult>)
public void MsgBox(string text, Action<MsgBoxResult> callback)
Parameters
text
stringcallback
Action<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()