Table of Contents

Class Dialog

Namespace
OmegaGUI.Render
Assembly
OmegaGUI.dll

A dialog model containing DirectX-based controls

public class Dialog
Inheritance
Dialog
Derived
Inherited Members
Extension Methods

Constructors

Dialog(DialogManager)

Create a new instance of the dialog class

public Dialog(DialogManager manager)

Parameters

manager DialogManager

The OmegaGUI.Render.Dialog.DialogManager instance that provides the resources for rendering of this dialog

Dialog(DialogManager, Color4)

Create a new instance of the dialog class

public Dialog(DialogManager manager, Color4 defaultTextColor)

Parameters

manager DialogManager

The OmegaGUI.Render.Dialog.DialogManager instance that provides the resources for rendering of this dialog

defaultTextColor Color4

The default color of text on this dialog

Dialog(DialogManager, Color4, string, string, uint)

Create a new instance of the dialog class

public Dialog(DialogManager manager, Color4 defaultTextColor, string defaultTexture, string defaultFont, uint defaultFontSize)

Parameters

manager DialogManager

The OmegaGUI.Render.Dialog.DialogManager instance that provides the resources for rendering of this dialog

defaultTextColor Color4

The default color of text on this dialog

defaultTexture string

The texture file containing the controls

defaultFont string

The name of default font for text on controls

defaultFontSize uint

The default font size

Fields

BlackColorValue

public static readonly Color4 BlackColorValue

Field Value

Color4

IsMinimized

public bool IsMinimized

Field Value

bool

IsUsingKeyboardInput

public bool IsUsingKeyboardInput

Field Value

bool

IsUsingMouseInput

public bool IsUsingMouseInput

Field Value

bool

IsUsingNonUserEvents

public bool IsUsingNonUserEvents

Field Value

bool

TransparentWhite

public static readonly Color4 TransparentWhite

Field Value

Color4

WheelDelta

public const int WheelDelta = 120

Field Value

int

WhiteColorValue

public static readonly Color4 WhiteColorValue

Field Value

Color4

Properties

CaptionHeight

The height of the caption bar at the top of the dialog

public int CaptionHeight { get; set; }

Property Value

int

DefaultFontSize

public uint DefaultFontSize { get; set; }

Property Value

uint

Height

Dialogs height

public int Height { get; set; }

Property Value

int

Location

The dialog's location

public Point Location { get; set; }

Property Value

Point

Width

Dialogs width

public int Width { get; set; }

Property Value

int

Methods

AddButton(int, string, int, int, int, int)

Adds a button control to the dialog

public Button AddButton(int id, string text, int x, int y, int w, int h)

Parameters

id int
text string
x int
y int
w int
h int

Returns

Button

AddButton(int, string, int, int, int, int, Keys, bool)

Adds a button control to the dialog

public Button AddButton(int id, string text, int x, int y, int w, int h, Keys hotkey, bool isDefault)

Parameters

id int
text string
x int
y int
w int
h int
hotkey Keys
isDefault bool

Returns

Button

AddCheckBox(int, string, int, int, int, int, bool)

Adds a checkbox control to the dialog

public CheckBox AddCheckBox(int id, string text, int x, int y, int w, int h, bool ischecked)

Parameters

id int
text string
x int
y int
w int
h int
ischecked bool

Returns

CheckBox

AddCheckBox(int, string, int, int, int, int, bool, Keys, bool)

Adds a checkbox to the dialog

public CheckBox AddCheckBox(int id, string text, int x, int y, int w, int h, bool ischecked, Keys hotkey, bool isDefault)

Parameters

id int
text string
x int
y int
w int
h int
ischecked bool
hotkey Keys
isDefault bool

Returns

CheckBox

AddControl(Control)

Adds a control to the dialog

public void AddControl(Control control)

Parameters

control Control

AddDropdownList(int, int, int, int, int)

Adds a dropdown list control to the dialog

public DropdownList AddDropdownList(int id, int x, int y, int w, int h)

Parameters

id int
x int
y int
w int
h int

Returns

DropdownList

AddDropdownList(int, int, int, int, int, Keys, bool)

Adds a dropdown list control to the dialog

public DropdownList AddDropdownList(int id, int x, int y, int w, int h, Keys hotkey, bool isDefault)

Parameters

id int
x int
y int
w int
h int
hotkey Keys
isDefault bool

Returns

DropdownList

AddGroupBox(int, int, int, int, int, Color4, Color4)

Adds a group box control to the dialog

public GroupBox AddGroupBox(int id, int x, int y, int w, int h, Color4 borderColor, Color4 fillCo)

Parameters

id int
x int
y int
w int
h int
borderColor Color4
fillCo Color4

Returns

GroupBox

AddListBox(int, int, int, int, int)

Adds a listbox control to the dialog

public ListBox AddListBox(int id, int x, int y, int w, int h)

Parameters

id int
x int
y int
w int
h int

Returns

ListBox

AddListBox(int, int, int, int, int, ListBoxStyle)

Adds a listbox control to the dialog

public ListBox AddListBox(int id, int x, int y, int w, int h, ListBoxStyle style)

Parameters

id int
x int
y int
w int
h int
style ListBoxStyle

Returns

ListBox

AddPictureBox(int, int, int, int, int, Element)

Adds a picture box control to the dialog

public PictureBox AddPictureBox(int id, int x, int y, int w, int h, Element fill)

Parameters

id int
x int
y int
w int
h int
fill Element

Returns

PictureBox

AddRadioButton(int, uint, string, int, int, int, int, bool)

Adds a radio button control to the dialog

public RadioButton AddRadioButton(int id, uint groupId, string text, int x, int y, int w, int h, bool ischecked)

Parameters

id int
groupId uint
text string
x int
y int
w int
h int
ischecked bool

Returns

RadioButton

AddRadioButton(int, uint, string, int, int, int, int, bool, Keys, bool)

Adds a radiobutton to the dialog

public RadioButton AddRadioButton(int id, uint groupId, string text, int x, int y, int w, int h, bool ischecked, Keys hotkey, bool isDefault)

Parameters

id int
groupId uint
text string
x int
y int
w int
h int
ischecked bool
hotkey Keys
isDefault bool

Returns

RadioButton

AddScrollBar(int, int, int, int, int)

Adds a scroll bar control to the dialog

public ScrollBar AddScrollBar(int id, int x, int y, int w, int h)

Parameters

id int
x int
y int
w int
h int

Returns

ScrollBar

AddScrollBar(int, int, int, int, int, int, int, int, bool)

Adds a scroll bar control to the dialog

public ScrollBar AddScrollBar(int id, int x, int y, int w, int h, int min, int max, int initialValue, bool isDefault)

Parameters

id int
x int
y int
w int
h int
min int
max int
initialValue int
isDefault bool

Returns

ScrollBar

AddSlider(int, int, int, int, int)

Adds a slider control to the dialog

public Slider AddSlider(int id, int x, int y, int w, int h)

Parameters

id int
x int
y int
w int
h int

Returns

Slider

AddSlider(int, int, int, int, int, int, int, int, bool)

Adds a slider control to the dialog

public Slider AddSlider(int id, int x, int y, int w, int h, int min, int max, int initialValue, bool isDefault)

Parameters

id int
x int
y int
w int
h int
min int
max int
initialValue int
isDefault bool

Returns

Slider

AddStatic(int, string, int, int, int, int)

Adds a static text control to the dialog

public Label AddStatic(int id, string text, int x, int y, int w, int h)

Parameters

id int
text string
x int
y int
w int
h int

Returns

Label

AddStatic(int, string, int, int, int, int, bool)

Adds a static text control to the dialog

public Label AddStatic(int id, string text, int x, int y, int w, int h, bool isDefault)

Parameters

id int
text string
x int
y int
w int
h int
isDefault bool

Returns

Label

AddTextBox(int, string, int, int, int, int)

Adds an edit box control to the dialog

public TextBox AddTextBox(int id, string text, int x, int y, int w, int h)

Parameters

id int
text string
x int
y int
w int
h int

Returns

TextBox

AddTextBox(int, string, int, int, int, int, bool)

Adds an edit box control to the dialog

public TextBox AddTextBox(int id, string text, int x, int y, int w, int h, bool isDefault)

Parameters

id int
text string
x int
y int
w int
h int
isDefault bool

Returns

TextBox

ClearFocus()

Clears focus of the dialog

public static void ClearFocus()

ClearRadioButtonGroup(uint)

Clears the radio button group

public void ClearRadioButtonGroup(uint groupIndex)

Parameters

groupIndex uint

DrawRectangle(Rectangle, Color4, bool)

Draw a rectangle

public void DrawRectangle(Rectangle rect, Color4 color, bool filled)

Parameters

rect Rectangle
color Color4
filled bool

DrawSprite(Element, Rectangle)

Draw a sprite

public void DrawSprite(Element element, Rectangle rect)

Parameters

element Element
rect Rectangle

DrawText(string, Element, Rectangle)

Draw's some text

public void DrawText(string text, Element element, Rectangle rect)

Parameters

text string
element Element
rect Rectangle

DrawText(string, Element, Rectangle, bool)

Draw's some text

public void DrawText(string text, Element element, Rectangle rect, bool shadow)

Parameters

text string
element Element
rect Rectangle
shadow bool

GetControlAtPoint(Point)

Returns the control located at a point (if one exists)

public Control GetControlAtPoint(Point pt)

Parameters

pt Point

Returns

Control

GetDefaultElement(ControlType, uint)

Gets the default element

public Element GetDefaultElement(ControlType ctype, uint index)

Parameters

ctype ControlType
index uint

Returns

Element

GetFont(uint)

Shared resource access. Indexed fonts and textures are shared among all the controls.

public FontNode GetFont(uint index)

Parameters

index uint

Returns

FontNode

GetTexture(uint)

Shared resource access. Indexed fonts and textures are shared among all the controls.

public TextureNode GetTexture(uint index)

Parameters

index uint

Returns

TextureNode

InitializeControl(Control)

Initializes a control

public void InitializeControl(Control control)

Parameters

control Control

MessageProc(IntPtr, WindowMessage, IntPtr, IntPtr)

Handle messages for this dialog

public bool MessageProc(IntPtr hWnd, WindowMessage msg, IntPtr wParam, IntPtr lParam)

Parameters

hWnd IntPtr
msg WindowMessage
wParam IntPtr
lParam IntPtr

Returns

bool

true if the message was handled and no further processing is necessary

OnRender(float)

Render the dialog

public void OnRender(float elapsedTime)

Parameters

elapsedTime float

Refresh()

Refresh the dialog

public void Refresh()

RemoveAllControls()

Removes all controls from this dialog

public void RemoveAllControls()

RequestFocus(Control)

Request that this control has focus

public static void RequestFocus(Control control)

Parameters

control Control

SetBackgroundColors(Color4)

Called to set dialog's border colors

public void SetBackgroundColors(Color4 allCorners)

Parameters

allCorners Color4

SetBackgroundColors(Color4, Color4, Color4, Color4)

Called to set dialog's border colors

public void SetBackgroundColors(Color4 topLeft, Color4 topRight, Color4 bottomLeft, Color4 bottomRight)

Parameters

topLeft Color4
topRight Color4
bottomLeft Color4
bottomRight Color4

SetCaptionColor(Color4)

public void SetCaptionColor(Color4 color)

Parameters

color Color4

SetCaptionText(string)

Called to set dialog's caption

public void SetCaptionText(string text)

Parameters

text string

SetDefaultElement(ControlType, uint, Element)

Sets the default element

public void SetDefaultElement(ControlType ctype, uint index, Element e)

Parameters

ctype ControlType
index uint
e Element

SetFont(uint, string, uint, FontWeight)

Shared resource access. Indexed fonts and textures are shared among all the controls.

public void SetFont(uint index, string faceName, uint fontHeight, FontWeight weight)

Parameters

index uint
faceName string
fontHeight uint
weight FontWeight

SetRefreshTime(float)

Set the static refresh time

public static void SetRefreshTime(float time)

Parameters

time float

SetSize(int, int)

Called to set dialog's size

public void SetSize(int w, int h)

Parameters

w int
h int

SetTexture(uint, string)

Shared resource access. Indexed fonts and textures are shared among all the controls.

public void SetTexture(uint index, string filename)

Parameters

index uint
filename string

Events

Resize

public event EventHandler Resize

Event Type

EventHandler