public Element.Element()
Creates a new Element instance.
A game-interface element. Inspect text, visibility, geometry and child elements; follow the individual members for their signatures and result types. Prefer a named panel wrapper when one is available.
Namespace: DreamPoeBot.Loki
public class ElementClass usage example: Inspect a supplied UI element without clicking →
public Element.Element()
Creates a new Element instance.
public Vector2i Element.CenterClickLocation()
Calculates a randomized point within this element using its geometry. Despite the name, this method does not send a click. Check the current UI state before passing a coordinate to an input API; consult this overload's parameters for its sampling bounds.
Vector2iA two-dimensional integer position. Used by grid-position and pathfinding APIs; screen-position APIs may expect a different coordinate type.
Returns: The Vector2i result.
public string Element.Dump()
Calls Dump on Element without arguments and returns string. Open the return contract below before using the result.
stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.Returns: The string result.
public Element Element.FindElementWithTooltipText(string text, bool ignoreVisibility = false)
Calls FindElementWithTooltipText on Element with text, ignoreVisibility and returns Element. Open the return contract below before using the result.
ElementA game-interface element. Inspect text, visibility, geometry and child elements; follow the individual members for their signatures and result types. Prefer a named panel wrapper when one is available.
textstringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.Specifies text.
ignoreVisibilityboolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.Specifies ignore visibility. Optional; the default is shown in the signature.
Returns: The Element result.
public List<Element> Element.FindElementsWithTextInElementChildrens(string text, ref List<Element> refElementList)
Calls FindElementsWithTextInElementChildrens on Element with text, refElementList and returns List<Element>. Open the return contract below before using the result.
List<Element>A game-interface element. Inspect text, visibility, geometry and child elements; follow the individual members for their signatures and result types. Prefer a named panel wrapper when one is available.
textstringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.Specifies text.
refElementListList<Element>Supplies and may update ref element list.
Returns: The List<Element> result.
public Element Element.FindIdLabelInElementChildrens(string text)
Calls FindIdLabelInElementChildrens on Element with text and returns Element. Open the return contract below before using the result.
ElementA game-interface element. Inspect text, visibility, geometry and child elements; follow the individual members for their signatures and result types. Prefer a named panel wrapper when one is available.
textstringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.Specifies text.
Returns: The Element result.
public Element Element.FindTextInElementChildrens(string text)
Searches this element and its descendants for the first whole-text match, ignoring letter case. Returns the matching Element, or null when no match is found. This reads the existing UI tree; it does not open a panel or click the result.
ElementA game-interface element. Inspect text, visibility, geometry and child elements; follow the individual members for their signatures and result types. Prefer a named panel wrapper when one is available.
textstringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.Specifies text.
Returns: The Element result.
public Element Element.GetChildAtIndex(int index)
Reads one direct child by index. Use a nonnegative index below ChildCount and check the returned Element before accessing it. This is not a text search and does not traverse all descendants.
ElementA game-interface element. Inspect text, visibility, geometry and child elements; follow the individual members for their signatures and result types. Prefer a named panel wrapper when one is available.
indexintNo current DPB page is linked for this built-in, external, generic or compatibility-only type.Specifies index.
Returns: The Element result.
public Element Element.GetChildFromIndices(params int[] indices)
Follows a sequence of child indexes: each index selects a child of the previous result. Check the returned Element before use. Index paths describe the current UI layout and can stop matching after the interface changes.
ElementA game-interface element. Inspect text, visibility, geometry and child elements; follow the individual members for their signatures and result types. Prefer a named panel wrapper when one is available.
indicesint[]No current DPB page is linked for this built-in, external, generic or compatibility-only type.Specifies indices.
Returns: The Element result.
protected List<T> Element.GetChildren<T>() where T : Element, new()
Returns children.
List<T>No current DPB page is linked for this built-in, external, generic or compatibility-only type.Returns: The List<T> result.
public virtual RectangleF Element.GetClientRect()
Calculates this element's rectangle in game-client coordinates. This reads geometry only; it does not click the element or confirm that it is visible and ready for an action.
RectangleFNo current DPB page is linked for this built-in, external, generic or compatibility-only type.Returns: The RectangleF result.
public Vector2 Element.GetParentPos()
Returns parent pos.
Vector2Provides vector2 data and the operations listed below. Related types link to the values this API consumes or returns.
Returns: The Vector2 result.
public bool Element.IsInFOV(float pct)
Checks whether in fov using the supplied arguments.
boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.pctfloatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.Specifies pct.
Returns: A Boolean result. The member description explains the condition being checked.
public void Element.SetZoom(float zoom)
Calls SetZoom on Element with zoom. This overload has no return value.
voidNo return value.zoomfloatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.Specifies zoom.
public void Element.ToggleVisibility()
Calls ToggleVisibility on Element without arguments. This overload has no return value.
voidNo return value.public bool Element.TryGetSize(out Vector2 size)
Attempts the existing +270 geometry field; false means an actual absent/invalid read.
boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.sizeVector2Receives size.
Returns: True when the request succeeds; read any out parameters only after checking the result.
public bool Element.TryGetText(out string text)
Attempts to read the primary text field.
boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.textstringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.Receives text.
Returns: True when the request succeeds; read any out parameters only after checking the result.
public void Element.WriteVisibleFlag(int flag)
Writes visible flag using the supplied arguments.
voidNo return value.flagintNo current DPB page is linked for this built-in, external, generic or compatibility-only type.Specifies flag.
public long Element.ChildCount { get; }
Reads child count on Element as long. The exact type and accessors are shown below.
longNo current DPB page is linked for this built-in, external, generic or compatibility-only type.public List<Element> Element.Children { get; }
Reads the child elements directly below this element. Each child is another Element with its own text, visibility and children. Use a text-search helper when you need to search descendants rather than only this level.
List<Element>A game-interface element. Inspect text, visibility, geometry and child elements; follow the individual members for their signatures and result types. Prefer a named panel wrapper when one is available.
public int Element.ControlType { get; }
Reads control type on Element as int. The exact type and accessors are shown below.
intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.public float Element.DeltaX { get; }
Reads delta x on Element as float. The exact type and accessors are shown below.
floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.public float Element.DeltaY { get; }
Reads delta y on Element as float. The exact type and accessors are shown below.
floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.public float Element.ElementZoom { get; }
Reads element zoom on Element as float. The exact type and accessors are shown below.
floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.public GuiControlType Element.GuiControlType { get; }
Reads gui control type on Element as GuiControlType. Open the value type below for its members and accepted values.
GuiControlTypeNamed values for gui control type. Select a value when an API accepts or returns GuiControlType.
public float Element.Height { get; }
Reads height on Element as float. The exact type and accessors are shown below.
floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.public string Element.IdLabel { get; }
Reads id label on Element as string. The exact type and accessors are shown below.
stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.public bool Element.IsEnable { get; }
Whether this element is enable.
boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.public bool Element.IsItemTransparent { get; }
Whether this element is item transparent.
boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.public override bool Element.IsValid { get; }
Whether this element is valid.
boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.These examples demonstrate the class, not every member listed above. Each example links the declarations it teaches.
using System;
using System.Linq;
using DreamPoeBot.Loki.Game;
using DreamPoeBot.Loki.Game.Objects;
using DreamPoeBot.Loki.Bot;
using DreamPoeBot.Loki.Bot.Pathfinding;
using DreamPoeBot.Loki.Common;public static void InspectElement(DreamPoeBot.Loki.Element element)
{
if (element == null || !element.IsVisible)
return;
var text = element.Text;
var children = element.Children;
var childCount = children == null ? 0 : children.Count;
// Use text and childCount in your own log or settings panel.
}This is a helper, not a complete plugin. Supply an Element obtained from the UI you are inspecting; in DPB2 an object's Ui property is one possible source. Call on the bot thread, reacquire after an interface or area change, and do not assume every element contains text. No click or key press is sent.
public static DreamPoeBot.Loki.Element FindLabel(
DreamPoeBot.Loki.Element root, string text)
{
if (root == null || string.IsNullOrEmpty(text))
return null;
return root.FindTextInElementChildrens(text);
}Supply the current UI root and the text to search for. This returns the existing search helper's result; it does not open a panel or interact with a match. Check the returned element before reading it. Matching and visibility behavior belong to the selected product's implementation; do not treat this as a search of every object in the area.
DPB2 0.4.5.103 · Reference reviewed 2026-10-30. Descriptions use source summaries where available, otherwise concise signature-based descriptions. Examples illustrate usage; they are not a live-game test.