DPB1Class · Game state and actions

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.

Namespace: DreamPoeBot.Loki

public class Element
Reference: DPB1 0.3.29.56Compare the DPB2 reference → Check signatures and usage notes separately; a matching type is not a compatibility guarantee.

Use this API

Class usage example: Inspect a supplied UI element without clicking →

Members and overloads

40 declared here

Element

MethodLink ↗
public Element.Element()

Creates a new Element instance.

CenterClickLocation

MethodLink ↗
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.

Return type: Vector2i
Explore Vector2i → members & methods

A two-dimensional integer position. Used by grid-position and pathfinding APIs; screen-position APIs may expect a different coordinate type.

Returns: The Vector2i result.

CenterClickLocation

MethodLink ↗
public Vector2i Element.CenterClickLocation(double min = 0.20000000298023224, double max = 0.800000011920929)

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.

Return type: Vector2i
Explore Vector2i → members & methods

A two-dimensional integer position. Used by grid-position and pathfinding APIs; screen-position APIs may expect a different coordinate type.

Parameters

min
Parameter type: doubleNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

a value between 1 and 0 multiplayed width and height to reduce the search boundry

max
Parameter type: doubleNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

a value between 1 and 0 multiplayed width and height to reduce the search boundry

Returns: The Vector2i result.

Dump

MethodLink ↗
public string Element.Dump()

Calls Dump on Element without arguments and returns string. Open the return contract below before using the result.

Return type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Returns: The string result.

FindPartialTextInElementChildrens

MethodLink ↗
public Element Element.FindPartialTextInElementChildrens(string text)

Calls FindPartialTextInElementChildrens on Element with text and returns Element. Open the return contract below before using the result.

Return type: Element
Explore Element → members & methods

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.

Parameters

text
Parameter type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies text.

Returns: The Element result.

FindTextInElementChildrens

MethodLink ↗
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.

Return type: Element
Explore Element → members & methods

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.

Parameters

text
Parameter type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies text.

Returns: The Element result.

GetChildAtIndex

MethodLink ↗
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.

Return type: Element
Explore Element → members & methods

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.

Parameters

index
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies index.

Returns: The Element result.

GetChildFromIndices

MethodLink ↗
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.

Return type: Element
Explore Element → members & methods

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.

Parameters

indices
Parameter type: int[]No current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies indices.

Returns: The Element result.

GetChildren

MethodLink ↗
protected List<T> Element.GetChildren<T>() where T : Element, new()

Returns children.

Return type: List<T>No current DPB page is linked for this built-in, external, generic or compatibility-only type.

Returns: The List<T> result.

GetClientRect

MethodLink ↗
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.

Return type: RectangleFNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Returns: The RectangleF result.

SetZoom

MethodLink ↗
public void Element.SetZoom(float zoom)

Calls SetZoom on Element with zoom. This overload has no return value.

Return type: voidNo return value.

Parameters

zoom
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies zoom.

ToggleVisibility

MethodLink ↗
public void Element.ToggleVisibility()

Calls ToggleVisibility on Element without arguments. This overload has no return value.

Return type: voidNo return value.

WriteVisibleFlag

MethodLink ↗
public void Element.WriteVisibleFlag(int flag)

Writes visible flag using the supplied arguments.

Return type: voidNo return value.

Parameters

flag
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies flag.

ChildCount

PropertyLink ↗
public long Element.ChildCount { get; }

Reads child count on Element as long. The exact type and accessors are shown below.

Value type: longNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Children

PropertyLink ↗
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.

Value type: List<Element>
Explore Element → members & methods

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.

ControlType

PropertyLink ↗
public int Element.ControlType { get; }

Reads control type on Element as int. The exact type and accessors are shown below.

Value type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

DeltaX

PropertyLink ↗
public float Element.DeltaX { get; }

Reads delta x on Element as float. The exact type and accessors are shown below.

Value type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

DeltaY

PropertyLink ↗
public float Element.DeltaY { get; }

Reads delta y on Element as float. The exact type and accessors are shown below.

Value type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

ElementZoom

PropertyLink ↗
public float Element.ElementZoom { get; }

Reads element zoom on Element as float. The exact type and accessors are shown below.

Value type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

GuiControlType

PropertyLink ↗
public GuiControlType Element.GuiControlType { get; }

Reads gui control type on Element as GuiControlType. Open the value type below for its members and accepted values.

Value type: GuiControlType
Explore GuiControlType → members & methods

Named values for gui control type. Select a value when an API accepts or returns GuiControlType.

Height

PropertyLink ↗
public float Element.Height { get; }

Reads height on Element as float. The exact type and accessors are shown below.

Value type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

IdLabel

PropertyLink ↗
public string Element.IdLabel { get; }

Reads id label on Element as string. The exact type and accessors are shown below.

Value type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

IsEnable

PropertyLink ↗
public bool Element.IsEnable { get; }

Whether this element is enable.

Value type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

IsHighlightedByRegex

PropertyLink ↗
public bool Element.IsHighlightedByRegex { get; }

Whether this element is highlighted by regex.

Value type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

IsItemTransparent

PropertyLink ↗
public bool Element.IsItemTransparent { get; }

Whether this element is item transparent.

Value type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

IsVisible

PropertyLink ↗
public bool Element.IsVisible { get; }

Checks this element's visibility together with its parent chain. Visibility alone does not prove that the control is enabled, ready for input or safe to click.

Value type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

IsVisibleLocal

PropertyLink ↗
public bool Element.IsVisibleLocal { get; }

Reads only this element's local visibility flag. A hidden parent can still prevent it from being displayed; use IsVisible for the parent-chain check.

Value type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parent

PropertyLink ↗
public Element Element.Parent { get; }

Reads parent on Element as Element. Open the value type below for its members and accepted values.

Value type: Element
Explore Element → members & methods

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.

Root

PropertyLink ↗
public Element Element.Root { get; }

Reads root on Element as Element. Open the value type below for its members and accepted values.

Value type: Element
Explore Element → members & methods

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.

Class usage examples

These examples demonstrate the class, not every member listed above. Each example links the declarations it teaches.

Imports used by these examples
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;

Inspect a supplied UI element without clicking

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.

Find a child with matching text

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.

DPB1 0.3.29.56 · 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.