Class Dialog
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
ColorCaption
Used for XML serialization.
public XColor ColorCaption
Field Value
ColorText
Used for XML serialization.
public XColor ColorText
Field Value
Properties
Animate
Shall this dialog use animations?
public bool Animate { get; set; }
Property Value
BackgroundColor
The dialog's background color
public Color BackgroundColor { get; set; }
Property Value
ButtonStyles
A list of all custom button styles available in the dialog
public Collection<ButtonStyle> ButtonStyles { get; }
Property Value
CaptionColor
The dialog's caption bar color
public Color CaptionColor { get; set; }
Property Value
CaptionHeight
The height of caption displayed at the top of this dialog
public int CaptionHeight { get; set; }
Property Value
CaptionText
The caption text displayed at the top of this dialog
public string CaptionText { get; set; }
Property Value
Controls
A list of all controls on the dialog
[Browsable(false)]
public BindingList<Control> Controls { get; }
Property Value
EffectiveScale
The effective scale resulting from the user-defined and automatic scaling to fullscreen
[Browsable(false)]
public float EffectiveScale { get; }
Property Value
FontName
The name of font for text on controls - no auto-update
public string FontName { get; set; }
Property Value
FontSize
The font size
public uint FontSize { get; set; }
Property Value
Fullscreen
Shall this dialog be auto-scaled to fill the complete screen? - no auto-update
public bool Fullscreen { get; set; }
Property Value
this[string]
public Control this[string name] { get; }
Parameters
name
string
Property Value
Exceptions
- ArgumentNullException
name
isnull
.- 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
OnShow
A script to be run when the dialog is first shown
[FileType("Lua")]
public string? OnShow { get; set; }
Property Value
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
ResourceCulture
The culture used for loading the assembly resources
public static CultureInfo ResourceCulture { get; set; }
Property Value
Scale
A factor by which all sizes are multiplied, is ignored in fullscreen mode
public float Scale { get; set; }
Property Value
Shift
A set of coordinates by which all control positions are shifted
public Point Shift { get; set; }
Property Value
Size
The initial size of the dialog, used for auto-scaling fullscreen dialogs - no auto-update
public Size Size { get; set; }
Property Value
TextColor
The color of text on the dialog - no auto-update
public Color TextColor { get; set; }
Property Value
TextureFile
The file containing the texture for controls on this dialog - no auto-update
public string TextureFile { get; set; }
Property Value
TextureFileValid
public bool TextureFileValid { get; }
Property Value
Visible
Is this dialog currently visible?
[Browsable(false)]
public bool Visible { get; set; }
Property Value
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
stringThe 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
stringtype
MsgBoxTypecallback
Action<MsgBoxResult>
PickControls(Rectangle)
Finds Controls within a certain area
public ICollection<Control> PickControls(Rectangle area)
Parameters
area
RectangleThe 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