Class DialogPresenter
- Namespace
- OmegaGUI
- Assembly
- OmegaGUI.dll
public sealed class DialogPresenter : IDisposable
- Inheritance
-
objectDialogPresenter
- Implements
Constructors
DialogPresenter(GuiManager, Dialog, Point, Lua?)
Creates a new dialog presenter for a Dialog
public DialogPresenter(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.
DialogPresenter(GuiManager, string, Point, Lua?)
Creates a new dialog presenter from an XML file
public DialogPresenter(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
Disposed
Has this dialog been disposed?
[Browsable(false)]
public bool Disposed { get; }
Property Value
Model
The data model describing the dialog
public Dialog Model { get; }
Property Value
Name
Text value to make it easier to identify a particular dialog
public string? Name { get; set; }
Property Value
Render
The rendering widgets used to display the dialog
public Dialog Render { get; }
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()
~DialogPresenter()
protected ~DialogPresenter()
GetControl(string)
Gets the first Control in this DialogPresenter 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
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()