Drag[en]gine Script Module DragonScript 1.32.1
Loading...
Searching...
No Matches
Dragengine.Gui.ClosestDirectionFocusFinder Class Reference

Find closest widget to focus for directional navigation. More...

Inheritance diagram for Dragengine.Gui.ClosestDirectionFocusFinder:
Dragengine.Gui.MainMenus.Interactive.IMMInteract.IMMClosestDirectionFocusFinder

Public Member Functions

void addIgnoreWidget (Widget widget)
 Add widget to ignore list.
 
void addIgnoreWidgetFocusable (Widget widget)
 Add widget or first focusable parent if widget is not focusable.
 
RectArea getBestHitBox ()
 Best hit box or null.
 
Widget getBestHitWidget ()
 Best hit widget or null.
 
int getBestHitX ()
 Best hit box distance along X axis in pixels.
 
RectArea getBestNearestBox ()
 Best nearest box.
 
Widget getBestNearestWidget ()
 Best nearest widget or null.
 
int getBestNearestX ()
 Best nearest box distance along X axis in pixels.
 
Widget getBestWidget ()
 Best widget to use.
 
RectArea getOriginBox ()
 Origin box.
 
bool hasIgnoreWidget (Widget widget)
 Ignore widget is present.
 
ClosestDirectionFocusFinder new (int direction, Point position, Point size)
 Create finder for search direction.
 
void processWidget (Widget widget, Point position, Point size)
 Process widget.
 
void reset ()
 Reset finder.
 

Protected Member Functions

void challengeBest (Widget widget)
 Compare processed widget against best widget and keep the winner.
 

Protected Attributes

RectArea pBestHitBox
 
Widget pBestHitWidget
 
int pBestHitX
 
Point pDirY
 
RectArea pHitBox
 
Array pIgnoreWidgets
 
RectArea pOriginBox
 

Detailed Description

Find closest widget to focus for directional navigation.

Version
1.29

Member Function Documentation

◆ addIgnoreWidget()

void Dragengine.Gui.ClosestDirectionFocusFinder.addIgnoreWidget ( Widget  widget)

Add widget to ignore list.

◆ addIgnoreWidgetFocusable()

void Dragengine.Gui.ClosestDirectionFocusFinder.addIgnoreWidgetFocusable ( Widget  widget)

Add widget or first focusable parent if widget is not focusable.

◆ challengeBest()

void Dragengine.Gui.ClosestDirectionFocusFinder.challengeBest ( Widget  widget)
protected

Compare processed widget against best widget and keep the winner.

◆ getBestHitBox()

RectArea Dragengine.Gui.ClosestDirectionFocusFinder.getBestHitBox ( )

Best hit box or null.

◆ getBestHitWidget()

Widget Dragengine.Gui.ClosestDirectionFocusFinder.getBestHitWidget ( )

Best hit widget or null.

◆ getBestHitX()

int Dragengine.Gui.ClosestDirectionFocusFinder.getBestHitX ( )

Best hit box distance along X axis in pixels.

◆ getBestNearestBox()

RectArea Dragengine.Gui.ClosestDirectionFocusFinder.getBestNearestBox ( )

Best nearest box.

◆ getBestNearestWidget()

Widget Dragengine.Gui.ClosestDirectionFocusFinder.getBestNearestWidget ( )

Best nearest widget or null.

◆ getBestNearestX()

int Dragengine.Gui.ClosestDirectionFocusFinder.getBestNearestX ( )

Best nearest box distance along X axis in pixels.

◆ getBestWidget()

Widget Dragengine.Gui.ClosestDirectionFocusFinder.getBestWidget ( )

Best widget to use.

◆ getOriginBox()

RectArea Dragengine.Gui.ClosestDirectionFocusFinder.getOriginBox ( )

Origin box.

◆ hasIgnoreWidget()

bool Dragengine.Gui.ClosestDirectionFocusFinder.hasIgnoreWidget ( Widget  widget)

Ignore widget is present.

◆ new()

ClosestDirectionFocusFinder Dragengine.Gui.ClosestDirectionFocusFinder.new ( int  direction,
Point  position,
Point  size 
)

Create finder for search direction.

Parameters
directionDirection as InputEventKey::arrowLeft, InputEventKey::arrowRight, InputEventKey::arrowUp or InputEventKey::arrowDown.
positionPosition of origin widget relative to origin.
sizeSize of origin widget.

◆ processWidget()

void Dragengine.Gui.ClosestDirectionFocusFinder.processWidget ( Widget  widget,
Point  position,
Point  size 
)

Process widget.

Parameters
widgetWidget to process.
positionPosition of widget relative to origin.
sizeSize of widget.

◆ reset()

void Dragengine.Gui.ClosestDirectionFocusFinder.reset ( )

Member Data Documentation

◆ pBestHitBox

RectArea Dragengine.Gui.ClosestDirectionFocusFinder.pBestHitBox
protected

◆ pBestHitWidget

Widget Dragengine.Gui.ClosestDirectionFocusFinder.pBestHitWidget
protected

◆ pBestHitX

int Dragengine.Gui.ClosestDirectionFocusFinder.pBestHitX
protected

◆ pDirY

Point Dragengine.Gui.ClosestDirectionFocusFinder.pDirY
protected

◆ pHitBox

RectArea Dragengine.Gui.ClosestDirectionFocusFinder.pHitBox
protected

◆ pIgnoreWidgets

Array Dragengine.Gui.ClosestDirectionFocusFinder.pIgnoreWidgets
protected

◆ pOriginBox

RectArea Dragengine.Gui.ClosestDirectionFocusFinder.pOriginBox
protected

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