Table of Contents

Class Dialog

Namespace
OmegaGUI.Model
Assembly
OmegaGUI.dll

An XML-serializable dialog view

public class Dialog : ICloneable<Dialog>
Inheritance
Dialog
Implements
Inherited Members
Extension Methods

Fields

ColorBackground

Used for XML serialization.

public XColor ColorBackground

Field Value

XColor

ColorCaption

Used for XML serialization.

public XColor ColorCaption

Field Value

XColor

ColorText

Used for XML serialization.

public XColor ColorText

Field Value

XColor

Properties

Animate

Shall this dialog use animations?

public bool Animate { get; set; }

Property Value

bool

BackgroundColor

The dialog's background color

public Color BackgroundColor { get; set; }

Property Value

Color

ButtonStyles

A list of all custom button styles available in the dialog

public Collection<ButtonStyle> ButtonStyles { get; }

Property Value

Collection<ButtonStyle>

CaptionColor

The dialog's caption bar color

public Color CaptionColor { get; set; }

Property Value

Color

CaptionHeight

The height of caption displayed at the top of this dialog

public int CaptionHeight { get; set; }

Property Value

int

CaptionText

The caption text displayed at the top of this dialog

public string CaptionText { get; set; }

Property Value

string

Controls

A list of all controls on the dialog

[Browsable(false)]
public BindingList<Control> Controls { get; }

Property Value

BindingList<Control>

EffectiveScale

The effective scale resulting from the user-defined and automatic scaling to fullscreen

[Browsable(false)]
public float EffectiveScale { get; }

Property Value

float

FontName

The name of font for text on controls - no auto-update

public string FontName { get; set; }

Property Value

string

FontSize

The font size

public uint FontSize { get; set; }

Property Value

uint

Fullscreen

Shall this dialog be auto-scaled to fill the complete screen? - no auto-update

public bool Fullscreen { get; set; }

Property Value

bool

this[string]

Gets the first Control in this Dialog with the specified name

public Control this[string name] { get; }

Parameters

name string

Property Value

Control

Exceptions

ArgumentNullException

name is null.

KeyNotFoundException

An element with the specified key does not exist in the dictionary.

NeedsUpdate

A flag to determine whether the model counterpart to this dialog vuew needs to be recreated to reflect changes made to properties

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

Property Value

bool

OnShow

A script to be run when the dialog is first shown

[FileType("Lua")]
public string? OnShow { get; set; }

Property Value

string

OnUpdate

A script to be run after the dialog was first shown and whenever it needs to update its output

[FileType("Lua")]
public string? OnUpdate { get; set; }

Property Value

string

ResourceCulture

The culture used for loading the assembly resources

public static CultureInfo ResourceCulture { get; set; }

Property Value

CultureInfo

Scale

A factor by which all sizes are multiplied, is ignored in fullscreen mode

public float Scale { get; set; }

Property Value

float

Shift

A set of coordinates by which all control positions are shifted

public Point Shift { get; set; }

Property Value

Point

Size

The initial size of the dialog, used for auto-scaling fullscreen dialogs - no auto-update

public Size Size { get; set; }

Property Value

Size

TextColor

The color of text on the dialog - no auto-update

public Color TextColor { get; set; }

Property Value

Color

TextureFile

The file containing the texture for controls on this dialog - no auto-update

public string TextureFile { get; set; }

Property Value

string

TextureFileValid

public bool TextureFileValid { get; }

Property Value

bool

Visible

Is this dialog currently visible?

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

Property Value

bool

Methods

Clone()

Creates a deep copy of this dialog. You need to call GenerateRender(DialogManager) on it before it can be used for rendering.

public Dialog Clone()

Returns

Dialog

The cloned dialog.

FromContent(string)

Loads a dialog from an XML file via the ContentManager.

public static Dialog FromContent(string id)

Parameters

id string

The ID of the file to load from

Returns

Dialog

The loaded dialog

MsgBox(string, MsgBoxType, Action<MsgBoxResult>)

public void MsgBox(string text, MsgBoxType type, Action<MsgBoxResult> callback)

Parameters

text string
type MsgBoxType
callback Action<MsgBoxResult>

PickControls(Rectangle)

Finds Controls within a certain area

public ICollection<Control> PickControls(Rectangle area)

Parameters

area Rectangle

The coordinate area to look in

Returns

ICollection<Control>

A list of all Controls with the area.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Events

ScriptFired

Occurs whenever one of the controls fires a script

public event ScriptExecution? ScriptFired

Event Type

ScriptExecution