Enfusion Script API
Loading...
Searching...
No Matches
WidgetManager Interface Reference

Class containing global and util functions regarding widgets. More...

Static Public Member Functions

static proto void TraceWidgets (int x, int y, notnull Widget rootWidget, notnull array< Widget > outWidgets)
 Finds all widgets on specified position and returns them sorted by proximity.
 
static proto void TraceWidgetsRect (int x, int y, int width, int height, notnull Widget rootWidget, notnull array< Widget > outWidgets)
 Finds all widgets intersecting a specified rectangle and returns them sorted by proximity.
 
static proto void TraceWidgetsCircle (int x, int y, float radius, notnull Widget rootWidget, notnull array< Widget > outWidgets)
 Finds all widgets intersecting a specified circle and returns them sorted by proximity.
 
static proto void SetLanguage (string languageCode)
 
static proto void GetLanguage (out string languageCode)
 
static proto void SetCursor (int cursorIndex)
 
static proto void ReportMouse (int mousex, int mousey, notnull Widget rootWidget)
 
static proto void GetReferenceScreenSize (out int width, out int height)
 Gets reference resolution used for DPI scaling To work with DPI scaling use WorkspaceWidget.DPIScale and WorkspaceWidget.DPIUnscale.
 
static proto void GetMousePos (out int x, out int y)
 Gets current mouse position in native (current) resolution (not reference)
 
static proto Widget GetWidgetUnderCursor ()
 
static proto int GetTextCursorBlinkTime ()
 Returns how long is TextCursor shown/hidden for. Time in milliseconds.
 
static proto void SetTextCursorBlinkTime (int milliseconds)
 
static proto string Translate (string text, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
 Convert given text to localized version (multibyte UTF-8) using text ID's and localization table.
 
static proto int SearchLocalized (string text, notnull array< string > IDs, notnull out array< int > outIndices)
 Return indices of IDs which contains searched text. Search is case insensitive.
 

Static Public Attributes

static const string NonBreakingSpace
 UTF8 encoded nbsp (Non Breaking Space) character usable in UI.
 

Detailed Description

Class containing global and util functions regarding widgets.

Member Function Documentation

◆ GetLanguage()

static proto void WidgetManager.GetLanguage ( out string languageCode)
static

◆ GetMousePos()

static proto void WidgetManager.GetMousePos ( out int x,
out int y )
static

Gets current mouse position in native (current) resolution (not reference)

◆ GetReferenceScreenSize()

static proto void WidgetManager.GetReferenceScreenSize ( out int width,
out int height )
static

Gets reference resolution used for DPI scaling To work with DPI scaling use WorkspaceWidget.DPIScale and WorkspaceWidget.DPIUnscale.

◆ GetTextCursorBlinkTime()

static proto int WidgetManager.GetTextCursorBlinkTime ( )
static

Returns how long is TextCursor shown/hidden for. Time in milliseconds.

◆ GetWidgetUnderCursor()

static proto Widget WidgetManager.GetWidgetUnderCursor ( )
static

◆ ReportMouse()

static proto void WidgetManager.ReportMouse ( int mousex,
int mousey,
notnull Widget rootWidget )
static

◆ SearchLocalized()

static proto int WidgetManager.SearchLocalized ( string text,
notnull array< string > IDs,
notnull out array< int > outIndices )
static

Return indices of IDs which contains searched text. Search is case insensitive.

◆ SetCursor()

static proto void WidgetManager.SetCursor ( int cursorIndex)
static

◆ SetLanguage()

static proto void WidgetManager.SetLanguage ( string languageCode)
static

◆ SetTextCursorBlinkTime()

static proto void WidgetManager.SetTextCursorBlinkTime ( int milliseconds)
static

◆ TraceWidgets()

static proto void WidgetManager.TraceWidgets ( int x,
int y,
notnull Widget rootWidget,
notnull array< Widget > outWidgets )
static

Finds all widgets on specified position and returns them sorted by proximity.

Traverses the widget hierarchy starting from the given root widget and collects all widgets that intersect with the specified position. Widgets with the flags DISABLED, or those that are not VISIBLE are skipped. The resulting list is sorted from the closest to the farthest widget relative to the viewer (e.g., front-to-back rendering order).

Parameters
xX coordinate in screen space, using NATIVE resolution units.
yY coordinate in screen space, using NATIVE resolution units.
rootWidgetThe root widget at which to begin the trace. This widget and its entire hierarchy will be considered.
outWidgetsOutput array to be filled with intersecting widgets, sorted from closest to farthest.

◆ TraceWidgetsCircle()

static proto void WidgetManager.TraceWidgetsCircle ( int x,
int y,
float radius,
notnull Widget rootWidget,
notnull array< Widget > outWidgets )
static

Finds all widgets intersecting a specified circle and returns them sorted by proximity.

Traverses the widget hierarchy starting from the given root widget and collects all widgets that intersect with the specified circle. Widgets with the flags DISABLED, or those that are not VISIBLE are skipped. The resulting list is sorted from the closest to the farthest widget relative to the viewer (e.g., front-to-back rendering order).

Parameters
xX coordinate of the circle center in screen space, using NATIVE resolution units.
yY coordinate of the circle center in screen space, using NATIVE resolution units.
radiusRadius of the circle in NATIVE resolution units.
rootWidgetThe root widget at which to begin the trace. This widget and its entire hierarchy will be considered.
outWidgetsOutput array to be filled with intersecting widgets, sorted from closest to farthest.

◆ TraceWidgetsRect()

static proto void WidgetManager.TraceWidgetsRect ( int x,
int y,
int width,
int height,
notnull Widget rootWidget,
notnull array< Widget > outWidgets )
static

Finds all widgets intersecting a specified rectangle and returns them sorted by proximity.

Traverses the widget hierarchy starting from the given root widget and collects all widgets that intersect with the specified rectangle. Widgets with the flags DISABLED, or those that are not VISIBLE are skipped. The resulting list is sorted from the closest to the farthest widget relative to the viewer (e.g., front-to-back rendering order).

Parameters
xX coordinate (top-left corner) of the rectangle in screen space, using NATIVE resolution units.
yY coordinate (top-left corner) of the rectangle in screen space, using NATIVE resolution units.
widthWidth of the rectangle in NATIVE resolution units.
heightHeight of the rectangle in NATIVE resolution units.
rootWidgetThe root widget at which to begin the trace. This widget and its entire hierarchy will be considered.
outWidgetsOutput array to be filled with intersecting widgets, sorted from closest to farthest.

◆ Translate()

static proto string WidgetManager.Translate ( string text,
void param1 = NULL,
void param2 = NULL,
void param3 = NULL,
void param4 = NULL,
void param5 = NULL,
void param6 = NULL,
void param7 = NULL,
void param8 = NULL,
void param9 = NULL )
static

Convert given text to localized version (multibyte UTF-8) using text ID's and localization table.

Member Data Documentation

◆ NonBreakingSpace

const string WidgetManager.NonBreakingSpace
static

UTF8 encoded nbsp (Non Breaking Space) character usable in UI.


The documentation for this interface was generated from the following file: