Doloro GDK 22 .1.0 Beta
by Tauri Interactive
|
Base class for any UI element that handling bunch of another elements and should provide navigation among them.
Implements automatically feature of disabling elements out of the scope.
Public Member Functions | |
virtual void | Add (AGUIElement item) |
Adding an element both to front-end and back-end. More... | |
virtual void | Clear () |
Clearing all elements from back-end and front-end. | |
bool | Contains (AGUIElement item) |
Checks is the GUI element has been included into the collection. More... | |
void | CopyTo (AGUIElement[] array, int arrayIndex) |
Copying collection to another array. More... | |
IEnumerator< AGUIElement > | GetEnumerator () |
Returns enumerator for AGUIElement collection. More... | |
int | IndexOf (AGUIElement item) |
Returns index of element in collection. More... | |
virtual void | Insert (int index, AGUIElement item) |
Inserting UI elements into the collection. More... | |
virtual bool | Remove (AGUIElement item) |
Removing element by reference. More... | |
virtual void | RemoveAt (int index) |
Removing element both from back-end and front-end. More... | |
virtual void | Switch (int first, int second) |
Switches two elements between each other. More... | |
void | Repaint () |
Repaints element along with its children. | |
void | RescanForParent () |
Looking for parent element. | |
void | Focus () |
Focusing element. | |
void | Unfocus () |
Turning off focus from element and all the elements above in the stack. | |
void | CallClick () |
Simulates click above the element. | |
void | CallContextMenu () |
Simulates calling context menu over the element. | |
virtual bool | IsChildOf (AGUIElement element) |
Checks is the element is a child of another element. More... | |
virtual void | OnInput () |
Handler that will be called for elements in input priority order. use to modify data along with input instead of using OnElementGUI. More... | |
virtual void | OnElementGUI () |
Calling each draw frame. Use to update showing data. More... | |
Static Public Member Functions | |
static AGUIElement | FindParentGUIElement (Transform element) |
Looking for parent GUI element. More... | |
static AGUIElement | FindRoot (AGUIElement hierarchyElement) |
Looking for root element at the hierarchy branch. More... | |
Public Attributes | |
GUIElementHighlighter | selectionGUI |
A GUIElementHighlighter instance that will be used to highlighting of selected item. | |
RectTransform | ContentHolder |
Game object that will be parent for elements. More... | |
Protected Member Functions | |
abstract Rect | GetRectForCell (int idx) |
Returns the layout rect related to the element cell. More... | |
virtual void | Start () |
Validating layout. Loading ContentHolder child elements to collection. More... | |
override void | OnDestroy () |
Finalizing core tasks as well with unsubscribing from events. More... | |
virtual void | OnLayoutChanged () |
Occurs when list or window layout is changed. Recomputes child layouts. | |
override void | OnLostFocus () |
Dropping selectionGUI's GUIElementHighlighter.FocusedElement value to null . More... | |
virtual void | OnItemSelected (AGUIElement item) |
Occurs when child element is focused. More... | |
virtual void | OnItemUnselected (AGUIElement item) |
Occurs when before child element losing focus. More... | |
void | FindElementsAtTheScene (out int leftElementIdx, out int rightElementIdx) |
Looking for indexes of elements that clamping the collection displayed at the screen. More... | |
virtual void | Awake () |
Loading core components. More... | |
virtual void | OnEnable () |
Occurs when component enabled. | |
virtual void | OnDisable () |
Occurs when component disabled. | |
virtual void | OnTransformChildrenChanged () |
Occurs when children list has been changed. | |
virtual void | OnTransformParentChanged () |
Occurs when parent object has been changed. | |
virtual void | OnMoved () |
Should be called when element position is modified. More... | |
virtual void | OnSizeChanged () |
Should be called when element size is modified. More... | |
virtual void | OnFocus () |
Occurs when element requested on focus. More... | |
virtual void | OnHoverBegin () |
Occurs when pointer starts hovering the element. More... | |
virtual void | OnHover () |
Occurs when the pointer is over the element. | |
virtual void | OnHoverEnd () |
Occurs when pointer ending hovering the element. More... | |
virtual void | OnDragBegin () |
Occurs when pointer is start drag process. | |
virtual void | OnDrag () |
Occurs each frame when you drags the element. More... | |
virtual void | OnDragEnd () |
Occurs when dragging element from ElementOnAction is released. More... | |
virtual void | OnPointerDown () |
Occurs when LBM pressed above hovering element. More... | |
virtual void | OnPointerUp () |
Occurs when LBM released above hovering element. More... | |
virtual void | OnContextMenu () |
Occurs when you calling context menu with focused element. More... | |
Protected Attributes | |
List< AGUIElement > | collection = new List<AGUIElement>() |
Collection of bond UI elements. | |
Package Functions | |
void | PointerLogicConveyor (Vector2 pointerPosition, Rect[] masks) |
Conveyor that handles pointer related events. More... | |
bool | IsLocalHierarchyChildOf (AGUIElement element) |
Checks is the element is child of another element in local hierarchy. More... | |
Static Package Functions | |
static void | OnNewEventBegin () |
Occurs when new UI event started. | |
Properties | |
AGUIElement | this[int index] [get, set] |
Returns element by index. More... | |
int | Count [get] |
Count of element into the collection. | |
abstract int | Rows [get] |
How many rows rendered for collection UI. | |
abstract int | Columns [get] |
How many columns rendered for collection UI. | |
bool | IsReadOnly [get] |
Always false. | |
bool | SuspendAutoLayoutUpdate = false [get, set] |
If true then avoids calling of the OnLayoutChanged handler. More... | |
abstract int | CellsPerWorkspace [get] |
Returns amount of cells that can be draws per workspace without scrolling. | |
virtual int | SystemProtectedContentChildren [get] |
How many children at the ContentHolder reserved as system protected. Such a child will be skipped by internal UI handlers. More... | |
bool | IsMask [get, set] |
If true then will crop the pointer events out of bounds for children. | |
bool | IsRaycastTarget [get, set] |
Defines is the element will handle mouse click events. More... | |
bool | IsActive [get] |
bool | IsFocused [get] |
Checks is the element registered at the FocusStack | |
bool | IsHovered [get] |
Is the element hovered at the moment. | |
bool | IsRoot [get, set] |
Is the element is at the bottom of engine hierarchy. | |
AGUIElement | FocusedChild [get] |
Returns focused child. Null if not exist. | |
ReadOnlyCollection< AGUIElement > | Children = new ReadOnlyCollection<AGUIElement>(new AGUIElement[0]) [get] |
Collection of element children. More... | |
Rect | LocalRect [get] |
Returns rect of the bond RectTransform component. | |
Rect | ScreenSpaceRect [get, set] |
Returns elements's rect at screen space. More... | |
Vector2 | ScreenSpacePostion [get, set] |
Returns elements's position at screen space. More... | |
Rect | RaycastRect [get] |
Screen space rect with applied RaycastPadding parameters. | |
Vector4 | RaycastPadding [get, set] |
Defines offset of the ray casting box along with the physical size. | |
Window | ParentWindow [get] |
Reference to the parent window. Null if element is free. | |
AGUIElement | ParentGUIElement [get, protected set] |
Parent GUI element. Drops ParentWindow stored reference to null . | |
RectTransform | BondRectTransform [get] |
Buffer that contains bond rect transform. | |
static AGUIElement | ElementOnAction [get] |
Reference to last dragged element. More... | |
static bool | IsMouseDragOn [get] |
True when some elements is now at the drag state. | |
virtual Vector2 | Size [get, set] |
Size of element. More... | |
virtual Vector2 | Position [get, set] |
Position of element at the screen. More... | |
virtual Vector2 | LocalPosition [get, set] |
Position relative to the parent element. | |
virtual bool | OnStackTopWhenFocused [get] |
Defines if the element would be moved at the top of focus stack or will stay the same position when it focused. More... | |
virtual bool | IsVisibleForEngine [get] |
Defines is the element is visible for internal engine features. In case of false will be skipped during common callbacks. | |
Events | |
System.Action< AGUIElementsCollection > | CollectionModified |
Occurs when collection content somehow changed. | |
System.Action< AGUIElement > | ItemSelected |
Occurs when new element selected. | |
Action< AGUIElement > | Focused |
Occurs when element is focused. | |
Action< AGUIElement > | FocusLost |
Occurs when element loosing focus. | |
Action< AGUIElement > | HoverStarted |
Occurs when pointer crossing element's rect bounds. | |
Action< AGUIElement > | Hovered |
Occurs each time when GUI is changed and pointer is over the element. | |
Action< AGUIElement > | HoverEnded |
Occurs when pointer leaving the element's rect. | |
Action< AGUIElement > | DragStarted |
Occurs when drag process is starting. | |
Action< AGUIElement > | Draged |
Occurs during element drag process. | |
Action< AGUIElement > | DragEnded |
Occurs when element drag is ended. | |
Action< AGUIElement > | PointerDown |
Occurs when element pressed with LMB. | |
Action< AGUIElement > | PointerUp |
Occurs when element LB has been released with the pointer above element. | |
Action< AGUIElement > | ContextMenuCalled |
Occurs when user calling context menu for element. | |
Action< AGUIElement > | Moved |
Occurs when element is moved. | |
Action< AGUIElement > | SizeChanged |
Occurs when element Size changed. | |
|
virtual |
Adding an element both to front-end and back-end.
item | Element to adding. |
Depending from implementation null would be considered as space between elements, or as empty cell.
Reimplemented in Doloro.UIEngine2.Modules.ElementsCollection.GridCollection.
|
protectedvirtualinherited |
Loading core components.
Reimplemented in Doloro.InvetorySystem.Modules.Shops.UI.Windows.TransactionOrderInspector, Doloro.InvetorySystem.UI.Windows.StoragesInspector, Doloro.UIEngine2.Window, Doloro.UIEngine2.AWorkspaceProvider, Doloro.UIEngine2.WindowUIController, Doloro.UIEngine2.Modules.ElementsCollection.GridCollection, Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout, Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceSplitter, and Doloro.UIEngine2.Modules.Tabs.TabGUIElement.
bool Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollection.Contains | ( | AGUIElement | item | ) |
Checks is the GUI element has been included into the collection.
item | Item to comparison. |
void Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollection.CopyTo | ( | AGUIElement[] | array, |
int | arrayIndex | ||
) |
Copying collection to another array.
array | Target array. |
arrayIndex | Start index at the array to start. |
|
protected |
Looking for indexes of elements that clamping the collection displayed at the screen.
leftElementIdx | |
rightElementIdx |
Use to detect elements those GUI should be hidden to prevent extra operations.
|
staticinherited |
Looking for parent GUI element.
element | Source element transform. |
|
staticinherited |
Looking for root element at the hierarchy branch.
hierarchyElement | Element of hierarchy. |
IEnumerator< AGUIElement > Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollection.GetEnumerator | ( | ) |
Returns enumerator for AGUIElement collection.
|
protectedpure virtual |
Returns the layout rect related to the element cell.
idx | Index of the item at the collection. |
Implemented in Doloro.UIEngine2.Modules.ElementsCollection.GridCollection.
int Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollection.IndexOf | ( | AGUIElement | item | ) |
Returns index of element in collection.
item |
|
virtual |
Inserting UI elements into the collection.
index | Index to insert. |
item | Element to insert. |
Reimplemented in Doloro.UIEngine2.Modules.ElementsCollection.GridCollection.
|
virtualinherited |
Checks is the element is a child of another element.
element | Target element. |
Virtual logic that can be re-implemented to allow creation of virtual hierarchy.
|
packageinherited |
Checks is the element is child of another element in local hierarchy.
element | Element to check. |
true
in case if child. false
otherwise.
|
protectedvirtualinherited |
Occurs when you calling context menu with focused element.
Reimplemented in Doloro.UIEngine2.Modules.ElementsCollection.GUIElementHighlighter, and Doloro.UIEngine2.Modules.Tabs.TabGUIElement.
|
protectedvirtual |
Finalizing core tasks as well with unsubscribing from events.
Reimplemented from Doloro.UIEngine2.AGUIElement.
Reimplemented in Doloro.UIEngine2.Modules.Tabs.TabsBar.
|
protectedvirtualinherited |
Occurs each frame when you drags the element.
Use ElementOnAction to get drag target.
|
protectedvirtualinherited |
Occurs when dragging element from ElementOnAction is released.
Reimplemented in Doloro.UIEngine2.Controls.TooltipGUIController, and Doloro.UIEngine2.AFreespaceLayoutController.
|
virtualinherited |
Calling each draw frame. Use to update showing data.
Calling each frame if element displayed. Before self draw call OnElementGUI for all elements in Children collection.
Avoid reading inputs here. Use OnInput instead.
Reimplemented in Doloro.UIEngine2.Modules.Context.ContextMenu, Doloro.UIEngine2.Modules.ElementsCollection.GridCollection, and Doloro.UIEngine2.Modules.ElementsCollection.GUIElementHighlighter.
|
protectedvirtualinherited |
Occurs when element requested on focus.
Reimplemented in Doloro.UIEngine2.Window, Doloro.UIEngine2.WindowUIController, and Doloro.UIEngine2.Modules.Tabs.TabGUIElement.
|
protectedvirtualinherited |
Occurs when pointer starts hovering the element.
Reimplemented in Doloro.UIEngine2.Controls.TooltipGUIController, and Doloro.UIEngine2.WindowUIController.
|
protectedvirtualinherited |
Occurs when pointer ending hovering the element.
Reimplemented in Doloro.UIEngine2.Controls.TooltipGUIController, and Doloro.UIEngine2.WindowUIController.
|
virtualinherited |
Handler that will be called for elements in input priority order. use to modify data along with input instead of using OnElementGUI.
Don't forget call Event.Use in case if event consumed by element. Otherwise event will foes deeper into the focused elements hierarchy.
Reimplemented in Doloro.UIEngine2.Modules.Context.ContextMenu, and Doloro.UIEngine2.Modules.ElementsCollection.GridCollection.
|
protectedvirtual |
Occurs when child element is focused.
item | Focused element. |
|
protectedvirtual |
Occurs when before child element losing focus.
item | Element that has been selected till next logic step. |
Reimplemented in Doloro.UIEngine2.Modules.Tabs.TabsBar.
|
protectedvirtual |
Dropping selectionGUI's GUIElementHighlighter.FocusedElement value to null
.
Reimplemented from Doloro.UIEngine2.AGUIElement.
|
protectedvirtualinherited |
Should be called when element position is modified.
Reimplemented in Doloro.UIEngine2.WindowUIController, and Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.
|
protectedvirtualinherited |
Occurs when LBM pressed above hovering element.
Reimplemented in Doloro.UIEngine2.AFreespaceLayoutController, Doloro.UIEngine2.AWindowLayoutController, Doloro.UIEngine2.WindowDragController, Doloro.UIEngine2.WindowResizeController, Doloro.UIEngine2.WindowUIController, and Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceSplitter.
|
protectedvirtualinherited |
Occurs when LBM released above hovering element.
Not occurs in case it there is had been drag event.
Reimplemented in Doloro.UIEngine2.AFreespaceLayoutController, Doloro.UIEngine2.WindowDragController, Doloro.UIEngine2.Modules.Context.ContextMenuItem, and Doloro.UIEngine2.Modules.ElementsCollection.GUIElementHighlighter.
|
protectedvirtualinherited |
Should be called when element size is modified.
Reimplemented in Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.
|
packageinherited |
Conveyor that handles pointer related events.
pointerPosition | Position of pointer at the screen. |
masks | Masks that should be checked for the element. |
|
virtual |
Removing element by reference.
item | Source element. |
System.AccessViolationException | Trying to remove object protected by the core. |
|
virtual |
Removing element both from back-end and front-end.
index | Index of element to remove. |
System.AccessViolationException | Trying to remove object protected by the core. |
Reimplemented in Doloro.UIEngine2.Modules.ElementsCollection.GridCollection.
|
protectedvirtual |
Validating layout. Loading ContentHolder child elements to collection.
Reimplemented in Doloro.UIEngine2.Modules.Tabs.TabsBar.
|
virtual |
Switches two elements between each other.
first | Index of first element to switch. |
second | Index of second element to switch. |
RectTransform Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollection.ContentHolder |
Game object that will be parent for elements.
Using this if null.
|
getinherited |
Collection of element children.
Immediately access but has arbitrary order.
|
staticgetinherited |
Reference to last dragged element.
Overriding only when new drag begun. Use IsMouseDragOn property to check is the process state.
|
getinherited |
Checks current element activity state.
|
getsetinherited |
Defines is the element will handle mouse click events.
Not affects children. Still handles OnHover-like events. Not blocks manual call of CallClick and CallContextMenu API members.
|
getprotectedinherited |
Defines if the element would be moved at the top of focus stack or will stay the same position when it focused.
By default elements not changing order by some system like Window module
Requires stack modifying to make it possible to update windows order.
Works only for elements with true
IsRoot property.
|
getsetinherited |
Position of element at the screen.
Demands RectTransform if not overridden.
|
getsetinherited |
Returns elements's position at screen space.
Cords counting from top left corner. Useful for full screen operations, like comparing with mouse position or etc.
|
getsetinherited |
Returns elements's rect at screen space.
Cords counting from top left corner. Useful for full screen operations, like comparing with mouse position or etc.
|
getsetinherited |
Size of element.
Demands RectTransform if not overridden.
|
getsetprotected |
If true then avoids calling of the OnLayoutChanged handler.
Use if you need to make a bunch of collection changes to prevent extra operations.
|
getprotected |
How many children at the ContentHolder reserved as system protected. Such a child will be skipped by internal UI handlers.
This children could be used as you wish for internal purposes and don't represents the collection content.
selectionGUI placing at the 0 index of content children.
|
getset |
Returns element by index.
index | Index of element. |