Vertices Engine
v1.9.2.92
A Cross Platform game engine developed by Virtex Edge Design.
|
The most basic UI control which all other controls inherit from. More...
Public Member Functions | |
virtual Type | GetBaseGuiType () |
A string that is set in the base class of many items. | |
int | GetScaledSize (float i) |
Scales an Integer by the Screen Scaler Size. This is used to keep GUI and Item Sizes consistent across different Screen Sizes and Resolutions. | |
virtual void | OnLocalizationChanged () |
void | SetLocalisedText (string key, string postface="") |
virtual string | FilterTextInput (string input) |
virtual void | OnTextChanged () |
Called on text change. | |
virtual void | OnFontSet () |
virtual void | OnShadowStatusChange () |
Called when ever the DoShadow Property is changed. Override to change values for child elements. | |
virtual void | OnItemPositionChange () |
virtual void | ResetLayout () |
vxUIControl () | |
Initializes a new instance of the VerticesEngine.UI.vxUIControl class. | |
vxUIControl (Vector2 position) | |
Initializes a new instance of the VerticesEngine.UI.vxUIControl class. | |
void | Dispose () |
Call this to dispose the UI control. This should only be called by the vxUIManager or the vxCanvas | |
virtual void | NotHover () |
When the Mouse is NOT over the GUIItem. | |
virtual void | Hover () |
When the Mouse is over the GUIItem. | |
virtual void | Select () |
When the GUIItem is Selected. | |
virtual void | OnGUIManagerAdded (vxUIManager UIManager) |
virtual void | OnLayoutInvalidated () |
This is called whenever the layout is changed, content changed, or any method has been called which requires the control to be re-layedout. | |
virtual void | PlaySound (SoundEffect SoundEffect, float Volume=1, float Pitch=0) |
Plays the speciefied Sound Effect. Note this is to encapsulate the Sound Playing in one place around a try-catch block. Although this is not the ideal way of doing it, it allows for better cross-platform support since different platforms, namely mobile, have different maximums of letting sound effects play at the same time. | |
void | UpdateUI () |
virtual void | Draw () |
Draws the GUI Item. | |
Color | GetStateColour (vxColourTheme theme) |
virtual void | DrawText () |
Draws the GUI Items text. This is kept seperate for effiecency when using Sprite Sheets. | |
void | SetToolTip (string ToolTipText) |
virtual void | DrawToolTip () |
If Possible, will draw the Tool Tip. | |
virtual void | DrawBorder () |
Vector2 | GetCenteredTextPosition (SpriteFont font, string text) |
Gets the centered text position. | |
void | DrawDebugPoint (Vector2 Pos) |
Draws the debug point. | |
void | DrawDebugPoint (Vector2 Pos, Color color) |
Draws the debug point. | |
bool | TryConvertKeyboardInput (KeyboardState keyboard, KeyboardState oldKeyboard, out char key) |
Tries to convert keyboard input to characters and prevents repeatedly returning the same character if a key was pressed last frame, but not yet unpressed this frame. | |
Public Attributes | |
float | PositionDifference = 0 |
object | UserData |
Object variable which allows arbitary data too be passed between methods. | |
vxUIManager | UIManager |
The owning GUI Manger. | |
vxUIControlTheme | Theme = vxUIControlTheme.GetDefault() |
The item theme. | |
bool | IsVisible = true |
Gets or sets a value indicating whether this instance is visible. | |
string | Name = "<name>" |
Name Of GUI Item to help Identify it, not to be confused with Text. | |
string | LocalisationKey |
string | PreviousText = "" |
Vector2 | TextSize = new Vector2() |
float | Opacity = 1 |
Gets or sets the opacity of the current GUI Item. | |
float | TransitionAlpha = 1 |
A transition Alpha which can be controled by an owning control such as a Dialog or Message Box. | |
bool | DoSelectionBorder = true |
Do selection border. | |
bool | DoBorder = false |
Gets or sets the opacity of the current GUI Item. | |
int | BorderSize = 1 |
The size of the border. | |
Vector2 | ShadowOffset = new Vector2(5, 5) |
The shadow offset. | |
float | ShadowTransparency = 0.5f |
The shadow transparency. | |
Color | ShadowColour = Color.Black |
The shadow colour. | |
bool | ToggleState |
Toggle State of the GUI Item. Note: IsTogglable must be set too true. | |
float | Alpha = 1 |
Gets or sets the alpha of the GUI Item. | |
float | HoverAlpha = 0 |
Gets or sets the hover alpha. | |
float | HoverAlphaReq = 0 |
Gets or sets the requested hover alpha for smoothing. | |
float | HoverAlphaMax = 1 |
Gets or sets the hover alpha max. | |
float | HoverAlphaMin = 0 |
Gets or sets the hover alpha minimum. | |
float | HoverAlphaDeltaSpeed = 4 |
Gets or sets the hover alpha delta speed of smoothing. | |
Vector2 | OriginalPosition = Vector2.Zero |
Position Of GUI Item. | |
Vector2 | Padding = new Vector2(5) |
Padding Of GUI Item. | |
bool | IsFullWidth = false |
bool | IsFullHeight = false |
Rectangle | BorderBounds = Rectangle.Empty |
The border bounds of the gui item. | |
Color | BorderColour = Color.Black |
The border colour. | |
Vector4 | BoundingRectangleMargins = new Vector4(0) |
int | Index = 0 |
Element Index. | |
int | GUIIndex = 0 |
The index in the gui system. | |
ScreenState | ScreenState = ScreenState.TransitionOn |
bool | DisableTouchSelectOnScroll = false |
This bool holds a value of whether or not Select should be disabled if the item is moved a certain distance in between 'TouchLocationState.Pressed' and 'TouchLocationState.Released'. The threshold distance is 'DisableScrollThreshold'. | |
float | DisableScrollThreshold = 5 |
The disable scroll threshold. This is only used if 'DisableTouchSelectOnScroll' is true. | |
vxEnumClickType | ClickType = vxEnumClickType.OnPress |
bool | IsUpdateable = true |
Is this item Updatable. | |
string | ToolTipText = "" |
bool | IsToolTipEnabled = false |
Are Tooltips Enabled for this GUI Item. | |
int | ToolTipeCount = 0 |
int | ToolTipMax = 15 |
The amount of update calls with this item recieving focus before it'll show the Tool Tip if it's Enabled. | |
float | ToolTipAlpha = 0 |
Protected Member Functions | |
void | Click () |
Forces a click event. | |
virtual void | OnEnableStateChanged () |
Called when the elabled state changes. | |
virtual void | OnDisposed () |
Called when this UI control is disposed. | |
Properties | |
GraphicsDevice | GraphicsDevice [get] |
Viewport | Viewport [get] |
float | GetScalerAvg [get] |
vxEnumGUIElementState | State [get] |
Gets the state. | |
vxSpriteBatch | SpriteBatch [get] |
Gets the sprite batch. | |
Texture2D | DefaultTexture [get] |
Gets the default texture. | |
string | Text [get, set] |
Text Of GUI Item. | |
SpriteFont | Font [get, set] |
Text Of GUI Item. | |
bool | IsShadowVisible [get, set] |
Should the image draw a shadow. | |
bool | HasFocus [get, set] |
Gets or sets a value indicating whether this instance has focus. | |
bool | CaptureInput [get, set] |
Gets or sets a value indicating whether this instance has focus. | |
bool | IsTogglable [get, set] |
Is the Item a Toggleable? | |
bool | IsSelected [get, set] |
Returns Whether or not the item is Selected. | |
bool | IsEnabled [get, set] |
Returns Whether or not the item is Enabled. | |
Vector2 | Position [get, set] |
Position Of GUI Item. | |
int | Width [get, set] |
Width Of GUI Item. | |
int | Height [get, set] |
Width Of GUI Item. | |
Rectangle | Bounds [get, set] |
Bounding Rectangle Of GUI Item. | |
vxUIItemOrientation | ItemOrientation [get, set] |
GUI Item Orientation. | |
bool | IsOrientationHorizontal [get] |
MouseState | PreviousMouseState [get] |
Previous Mouse State. | |
bool | HasMouseBeenUpYet [get, set] |
Gets a value indicating whether the mouse left button been up yet. | |
Events | |
EventHandler< vxUIControlClickEventArgs > | Clicked |
Event Raised when the item is clicked. | |
EventHandler< vxUIControlClickEventArgs > | DoubleClicked |
Occurs when double clicked. | |
EventHandler< vxUIManagerItemAddEventArgs > | AddedToGUIManager |
Event Raised when this item is added to a GUI Manager. | |
EventHandler< EventArgs > | OnInitialHover |
Event Raised when the Mouse First Begins too Hover over this item. | |
EventHandler< EventArgs > | EnabledStateChanged |
Occurs when enabled state changed. | |
EventHandler< EventArgs > | PositionChanged |
Event raised when Item Position is Changed. | |
EventHandler< EventArgs > | ItemOreintationChanged |
Event Raised when Item Orientation is Changed. | |
The most basic UI control which all other controls inherit from.
VerticesEngine.UI.vxUIControl.vxUIControl | ( | Vector2 | position | ) |
Initializes a new instance of the VerticesEngine.UI.vxUIControl class.
position | This Items Start Position. Note that the 'OriginalPosition' variable will be set to this value as well. |
|
virtual |
Draws the GUI Item.
Reimplemented in VerticesEngine.Editor.UI.vxSelectionBox, VerticesEngine.UI.Controls.vxManageImportedEntityUIItem, VerticesEngine.Localization.UI.vxLocComboBoxItem, VerticesEngine.Net.UI.vxServerListItem, VerticesEngine.Net.UI.vxServerLobbyPlayerItem, VerticesEngine.UI.Dialogs.vxContextMenuControl, VerticesEngine.UI.Dialogs.vxContextMenuItem, VerticesEngine.UI.Dialogs.vxContextMenuSplitter, VerticesEngine.UI.Controls.vxPropertyControlTextbox, VerticesEngine.UI.Controls.vxPropertyGroup, VerticesEngine.UI.Controls.vxPropertyItemBaseClass, VerticesEngine.UI.Controls.vxPropertyControlCheckBox, VerticesEngine.UI.Controls.vxPropertyControlColour, VerticesEngine.UI.Controls.vxSliderMarker, VerticesEngine.UI.Controls.vxPropertyControlFloatRange, VerticesEngine.UI.Controls.vxPropertyControlGameObject, VerticesEngine.UI.Controls.vxPropertyControlTexture2D, VerticesEngine.UI.Controls.vxRibbonButtonControl, VerticesEngine.UI.Controls.vxRibbonContextualTabPage, VerticesEngine.UI.Controls.vxRibbonControl, VerticesEngine.UI.Controls.vxRibbonControlGroup, VerticesEngine.UI.Controls.vxRibbonDropdownControl, VerticesEngine.UI.Controls.vxRibbonLabelControl, VerticesEngine.UI.Controls.vxRibbonTabPage, VerticesEngine.UI.Controls.vxRibbonToolbar, VerticesEngine.UI.Controls.vxRibbonToolbarButtonControl, VerticesEngine.UI.Controls.vxRibbonToolbarSplitterControl, VerticesEngine.UI.Controls.vxSettingsGUIItem, VerticesEngine.UI.Controls.vxButtonControl, VerticesEngine.UI.Controls.vxButtonImageControl, VerticesEngine.UI.Controls.vxComboBox, VerticesEngine.UI.Controls.vxComboBoxItem, VerticesEngine.UI.Controls.vxImage, VerticesEngine.UI.Controls.vxIncrementControl, VerticesEngine.UI.Controls.vxKeyBindingSettingsGUIItem, VerticesEngine.UI.Controls.vxLabel, VerticesEngine.UI.Controls.vxListView, VerticesEngine.UI.Controls.vxListViewScrollBar, VerticesEngine.UI.Controls.vxListViewItem, VerticesEngine.UI.Controls.vxListViewSpliter, VerticesEngine.UI.Controls.vxMenuEntry, VerticesEngine.UI.Controls.vxNotification, VerticesEngine.UI.Controls.vxPanel, VerticesEngine.UI.Controls.vxSandboxImportedItemButton, VerticesEngine.UI.Controls.vxSandboxItemButton, VerticesEngine.UI.Controls.vxScrollBar, VerticesEngine.UI.Controls.vxScrollPanel, VerticesEngine.UI.Controls.vxScrollPanelComboxBoxItem, VerticesEngine.UI.Controls.vxScrollPanelIncrementItem, VerticesEngine.UI.Dialogs.vxScrollPanelItem, VerticesEngine.UI.Controls.vxScrollPanelSliderItem, VerticesEngine.UI.Controls.vxScrollPanelSpliter, VerticesEngine.UI.Controls.vxSlider, VerticesEngine.UI.Controls.vxSlideTabControl, VerticesEngine.UI.Controls.vxSlideTabPage, VerticesEngine.UI.Controls.vxSlideTabPageTab, VerticesEngine.UI.Controls.vxSpinnerControl, VerticesEngine.UI.Controls.vxTabControl, VerticesEngine.UI.Controls.vxTabPageTab, VerticesEngine.UI.Controls.vxTabPageControl, VerticesEngine.UI.Controls.vxTextbox, VerticesEngine.UI.Controls.vxToggleImageButton, VerticesEngine.UI.Controls.vxToolbar, VerticesEngine.UI.Controls.vxToolbarButton, VerticesEngine.UI.Controls.vxToolbarSpliter, VerticesEngine.UI.Controls.vxTreeControl, VerticesEngine.UI.Controls.vxTreeNode, VerticesEngine.UI.Controls.vxTxtrPaintToolbarButton, VerticesEngine.UI.Dialogs.vxFileExplorerDirectoryItem, VerticesEngine.UI.Dialogs.vxFileExplorerItem, VerticesEngine.UI.Dialogs.vxFileExplorerURLBar, VerticesEngine.UI.Dialogs.vxFileExplorerURLBarButton, VerticesEngine.UI.Dialogs.vxModDialoglItem, VerticesEngine.UI.Dialogs.vxFileDialogItem, VerticesEngine.Workshop.UI.vxCommunityWorkshopResultsDialogItem, and VerticesEngine.Workshop.UI.vxWorkshopDialogItem.
void VerticesEngine.UI.vxUIControl.DrawDebugPoint | ( | Vector2 | Pos | ) |
Draws the debug point.
Pos | Position. |
void VerticesEngine.UI.vxUIControl.DrawDebugPoint | ( | Vector2 | Pos, |
Color | color ) |
Draws the debug point.
Pos | Position. |
color | Color. |
|
virtual |
Draws the GUI Items text. This is kept seperate for effiecency when using Sprite Sheets.
Reimplemented in VerticesEngine.Localization.UI.vxLocComboBox, VerticesEngine.UI.Controls.vxPropertyGroup, VerticesEngine.UI.Controls.vxPropertyItemBaseClass, VerticesEngine.UI.Controls.vxPropertyControlCheckBox, VerticesEngine.UI.Controls.vxPropertyControlColour, VerticesEngine.UI.Controls.vxComboBox, VerticesEngine.UI.Controls.vxSandboxImportedItemButton, VerticesEngine.UI.Controls.vxSandboxItemButton, VerticesEngine.UI.Controls.vxScrollPanelComboxBoxItem, and VerticesEngine.UI.Controls.vxScrollPanelSpliter.
|
virtual |
A string that is set in the base class of many items.
Reimplemented in VerticesEngine.UI.Dialogs.vxScrollPanelItem.
Vector2 VerticesEngine.UI.vxUIControl.GetCenteredTextPosition | ( | SpriteFont | font, |
string | text ) |
Gets the centered text position.
font | Font. |
text | This GUI Items Text. |
int VerticesEngine.UI.vxUIControl.GetScaledSize | ( | float | i | ) |
Scales an Integer by the Screen Scaler Size. This is used to keep GUI and Item Sizes consistent across different Screen Sizes and Resolutions.
i | The index. |
|
virtual |
When the Mouse is NOT over the GUIItem.
Reimplemented in VerticesEngine.UI.Controls.vxTextbox.
|
protectedvirtual |
Called when this UI control is disposed.
Reimplemented in VerticesEngine.UI.Controls.vxPropertyGroup, VerticesEngine.UI.Controls.vxPropertyItemBaseClass, VerticesEngine.UI.Controls.vxPanel, VerticesEngine.UI.Controls.vxSandboxImportedItemButton, VerticesEngine.UI.Controls.vxSandboxItemButton, VerticesEngine.UI.Controls.vxScrollPanel, VerticesEngine.UI.Controls.vxSlideTabControl, VerticesEngine.UI.Controls.vxSlideTabPage, VerticesEngine.UI.Controls.vxTabControl, VerticesEngine.UI.Controls.vxTabPageControl, and VerticesEngine.UI.Controls.vxToggleImageButton.
|
protectedvirtual |
Called when the elabled state changes.
Reimplemented in VerticesEngine.UI.Controls.vxPropertyControlCheckBox, and VerticesEngine.UI.Controls.vxSpinnerControl.
|
virtual |
This is called whenever the layout is changed, content changed, or any method has been called which requires the control to be re-layedout.
Reimplemented in VerticesEngine.UI.Dialogs.vxContextMenuSplitter, VerticesEngine.UI.Controls.vxComboBox, and VerticesEngine.UI.Controls.vxTextbox.
|
virtual |
Called when ever the DoShadow Property is changed. Override to change values for child elements.
Reimplemented in VerticesEngine.UI.Controls.vxSpinnerControl.
|
virtual |
Called on text change.
Reimplemented in VerticesEngine.UI.Dialogs.vxContextMenuItem, VerticesEngine.UI.Dialogs.vxContextMenuSplitter, VerticesEngine.UI.Controls.vxLabel, and VerticesEngine.UI.Controls.vxTextbox.
|
virtual |
Plays the speciefied Sound Effect. Note this is to encapsulate the Sound Playing in one place around a try-catch block. Although this is not the ideal way of doing it, it allows for better cross-platform support since different platforms, namely mobile, have different maximums of letting sound effects play at the same time.
SoundEffect | Sound effect. |
Volume | Volume. |
|
virtual |
When the GUIItem is Selected.
Reimplemented in VerticesEngine.UI.Controls.vxListView, VerticesEngine.UI.Controls.vxScrollBar, VerticesEngine.UI.Controls.vxScrollPanel, VerticesEngine.UI.Controls.vxSlideTabPage, VerticesEngine.UI.Controls.vxTextbox, and VerticesEngine.UI.Controls.vxToolbar.
bool VerticesEngine.UI.vxUIControl.TryConvertKeyboardInput | ( | KeyboardState | keyboard, |
KeyboardState | oldKeyboard, | ||
out char | key ) |
Tries to convert keyboard input to characters and prevents repeatedly returning the same character if a key was pressed last frame, but not yet unpressed this frame.
keyboard | The current KeyboardState |
oldKeyboard | The KeyboardState of the previous frame |
key | When this method returns, contains the correct character if conversion succeeded. Else contains the null, (000), character. |
float VerticesEngine.UI.vxUIControl.Alpha = 1 |
Gets or sets the alpha of the GUI Item.
The alpha.
bool VerticesEngine.UI.vxUIControl.DoBorder = false |
Gets or sets the opacity of the current GUI Item.
The opacity.
float VerticesEngine.UI.vxUIControl.HoverAlpha = 0 |
Gets or sets the hover alpha.
The hover alpha.
float VerticesEngine.UI.vxUIControl.HoverAlphaDeltaSpeed = 4 |
Gets or sets the hover alpha delta speed of smoothing.
The hover alpha delta speed.
float VerticesEngine.UI.vxUIControl.HoverAlphaMax = 1 |
Gets or sets the hover alpha max.
The hover alpha max.
float VerticesEngine.UI.vxUIControl.HoverAlphaMin = 0 |
Gets or sets the hover alpha minimum.
The hover alpha minimum.
float VerticesEngine.UI.vxUIControl.HoverAlphaReq = 0 |
Gets or sets the requested hover alpha for smoothing.
The hover alpha req.
bool VerticesEngine.UI.vxUIControl.IsVisible = true |
Gets or sets a value indicating whether this instance is visible.
true
if this instance is visible; otherwise, false
.
float VerticesEngine.UI.vxUIControl.Opacity = 1 |
Gets or sets the opacity of the current GUI Item.
The opacity.
object VerticesEngine.UI.vxUIControl.UserData |
Object variable which allows arbitary data too be passed between methods.
The user data.
|
getset |
Gets or sets a value indicating whether this instance has focus.
true
if this instance has focus; otherwise, false
.
|
get |
Gets the default texture.
The default texture.
|
getset |
Gets or sets a value indicating whether this instance has focus.
true
if this instance has focus; otherwise, false
.
|
getset |
Gets a value indicating whether the mouse left button been up yet.
A check for if the Left Button has been in the Release State yet. This is to prevent
true
The mouse left button has been in the 'Release' state since this GUI item has been instantiated; otherwise, false
.
|
get |
Gets the sprite batch.
The sprite batch.
|
get |
Gets the state.
The state.