Class Dialog
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
managerDialogManagerThe 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
managerDialogManagerThe OmegaGUI.Render.Dialog.DialogManager instance that provides the resources for rendering of this dialog
defaultTextColorColor4The 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
managerDialogManagerThe OmegaGUI.Render.Dialog.DialogManager instance that provides the resources for rendering of this dialog
defaultTextColorColor4The default color of text on this dialog
defaultTexturestringThe texture file containing the controls
defaultFontstringThe name of default font for text on controls
defaultFontSizeuintThe default font size
Fields
BlackColorValue
public static readonly Color4 BlackColorValue
Field Value
- Color4
IsMinimized
public bool IsMinimized
Field Value
IsUsingKeyboardInput
public bool IsUsingKeyboardInput
Field Value
IsUsingMouseInput
public bool IsUsingMouseInput
Field Value
IsUsingNonUserEvents
public bool IsUsingNonUserEvents
Field Value
TransparentWhite
public static readonly Color4 TransparentWhite
Field Value
- Color4
WheelDelta
public const int WheelDelta = 120
Field Value
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
DefaultFontSize
public uint DefaultFontSize { get; set; }
Property Value
Height
Dialogs height
public int Height { get; set; }
Property Value
Location
The dialog's location
public Point Location { get; set; }
Property Value
Width
Dialogs width
public int Width { get; set; }
Property Value
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
Returns
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
Returns
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
Returns
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
Returns
AddControl(Control)
Adds a control to the dialog
public void AddControl(Control control)
Parameters
controlControl
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
Returns
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
Returns
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
Returns
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
Returns
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
Returns
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
Returns
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
Returns
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
Returns
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
Returns
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
Returns
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
Returns
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
Returns
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
Returns
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
Returns
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
Returns
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
Returns
ClearFocus()
Clears focus of the dialog
public static void ClearFocus()
ClearRadioButtonGroup(uint)
Clears the radio button group
public void ClearRadioButtonGroup(uint groupIndex)
Parameters
groupIndexuint
DrawRectangle(Rectangle, Color4, bool)
Draw a rectangle
public void DrawRectangle(Rectangle rect, Color4 color, bool filled)
Parameters
DrawSprite(Element, Rectangle)
Draw a sprite
public void DrawSprite(Element element, Rectangle rect)
Parameters
DrawText(string, Element, Rectangle)
Draw's some text
public void DrawText(string text, Element element, Rectangle rect)
Parameters
DrawText(string, Element, Rectangle, bool)
Draw's some text
public void DrawText(string text, Element element, Rectangle rect, bool shadow)
Parameters
GetControlAtPoint(Point)
Returns the control located at a point (if one exists)
public Control GetControlAtPoint(Point pt)
Parameters
ptPoint
Returns
GetDefaultElement(ControlType, uint)
Gets the default element
public Element GetDefaultElement(ControlType ctype, uint index)
Parameters
ctypeControlTypeindexuint
Returns
GetFont(uint)
Shared resource access. Indexed fonts and textures are shared among all the controls.
public FontNode GetFont(uint index)
Parameters
indexuint
Returns
GetTexture(uint)
Shared resource access. Indexed fonts and textures are shared among all the controls.
public TextureNode GetTexture(uint index)
Parameters
indexuint
Returns
InitializeControl(Control)
Initializes a control
public void InitializeControl(Control control)
Parameters
controlControl
MessageProc(IntPtr, WindowMessage, IntPtr, IntPtr)
Handle messages for this dialog
public bool MessageProc(IntPtr hWnd, WindowMessage msg, IntPtr wParam, IntPtr lParam)
Parameters
hWndIntPtrmsgWindowMessagewParamIntPtrlParamIntPtr
Returns
- bool
trueif the message was handled and no further processing is necessary
OnRender(float)
Render the dialog
public void OnRender(float elapsedTime)
Parameters
elapsedTimefloat
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
controlControl
SetBackgroundColors(Color4)
Called to set dialog's border colors
public void SetBackgroundColors(Color4 allCorners)
Parameters
allCornersColor4
SetBackgroundColors(Color4, Color4, Color4, Color4)
Called to set dialog's border colors
public void SetBackgroundColors(Color4 topLeft, Color4 topRight, Color4 bottomLeft, Color4 bottomRight)
Parameters
topLeftColor4topRightColor4bottomLeftColor4bottomRightColor4
SetCaptionColor(Color4)
public void SetCaptionColor(Color4 color)
Parameters
colorColor4
SetCaptionText(string)
Called to set dialog's caption
public void SetCaptionText(string text)
Parameters
textstring
SetDefaultElement(ControlType, uint, Element)
Sets the default element
public void SetDefaultElement(ControlType ctype, uint index, Element e)
Parameters
ctypeControlTypeindexuinteElement
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
SetRefreshTime(float)
Set the static refresh time
public static void SetRefreshTime(float time)
Parameters
timefloat
SetSize(int, int)
Called to set dialog's size
public void SetSize(int w, int h)
Parameters
SetTexture(uint, string)
Shared resource access. Indexed fonts and textures are shared among all the controls.
public void SetTexture(uint index, string filename)
Parameters
Events
Resize
public event EventHandler? Resize