Table of Contents

Class DialogPresenter

Namespace
OmegaGUI
Assembly
OmegaGUI.dll

Displays a Dialog model using Dialog rendering widgets.

public sealed class DialogPresenter : IDisposable
Inheritance
object
DialogPresenter
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

manager GuiManager

The GuiManager used to interface with the Engine

dialog Dialog

The dialog to be displayed

location Point

The location of the dialog on the screen

lua Lua

The 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

manager GuiManager

The GuiManager used to interface with the Engine

filename string

The filename of the XML file to load

location Point

The location of the dialog on the screen

lua Lua

The scripting engine to execute event handlers.

Properties

Disposed

Has this dialog been disposed?

[Browsable(false)]
public bool Disposed { get; }

Property Value

bool

Model

The data model describing the dialog

public Dialog Model { get; }

Property Value

Dialog

Name

Text value to make it easier to identify a particular dialog

public string? Name { get; set; }

Property Value

string

Render

The rendering widgets used to display the dialog

public Dialog Render { get; }

Property Value

Dialog

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

name string

Returns

Control

Exceptions

ArgumentNullException

name is null.

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 string

The Lua file to import

SetLocation(int, int)

Changes the dialog's on-screen position.

public void SetLocation(int x, int y)

Parameters

x int
y int

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()