|
Drag[en]gine Script Module DragonScript 1.35
|
Find closest widget to focus for directional navigation. More...
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 |
Find closest widget to focus for directional navigation.
| void Dragengine.Gui.ClosestDirectionFocusFinder.addIgnoreWidget | ( | Widget | widget | ) |
| void Dragengine.Gui.ClosestDirectionFocusFinder.addIgnoreWidgetFocusable | ( | Widget | widget | ) |
Add widget or first focusable parent if widget is not focusable.
Referenced by getBestHitX().
|
protected |
Compare processed widget against best widget and keep the winner.
References challengeBest(), getBestHitBox(), getBestHitWidget(), getBestHitX(), getBestNearestBox(), getBestNearestWidget(), getBestNearestX(), getBestWidget(), getOriginBox(), hasIgnoreWidget(), new(), pBestHitBox, pBestHitWidget, pBestHitX, pHitBox, pIgnoreWidgets, pOriginBox, processWidget(), and reset().
Referenced by challengeBest().
| RectArea Dragengine.Gui.ClosestDirectionFocusFinder.getBestHitBox | ( | ) |
| Widget Dragengine.Gui.ClosestDirectionFocusFinder.getBestHitWidget | ( | ) |
| int Dragengine.Gui.ClosestDirectionFocusFinder.getBestHitX | ( | ) |
Best hit box distance along X axis in pixels.
References addIgnoreWidgetFocusable().
Referenced by challengeBest().
| RectArea Dragengine.Gui.ClosestDirectionFocusFinder.getBestNearestBox | ( | ) |
Best nearest box.
Referenced by challengeBest().
| Widget Dragengine.Gui.ClosestDirectionFocusFinder.getBestNearestWidget | ( | ) |
| int Dragengine.Gui.ClosestDirectionFocusFinder.getBestNearestX | ( | ) |
Best nearest box distance along X axis in pixels.
References pIgnoreWidgets.
Referenced by challengeBest().
| Widget Dragengine.Gui.ClosestDirectionFocusFinder.getBestWidget | ( | ) |
Best widget to use.
Referenced by challengeBest().
| RectArea Dragengine.Gui.ClosestDirectionFocusFinder.getOriginBox | ( | ) |
Origin box.
Referenced by challengeBest().
| bool Dragengine.Gui.ClosestDirectionFocusFinder.hasIgnoreWidget | ( | Widget | widget | ) |
| ClosestDirectionFocusFinder Dragengine.Gui.ClosestDirectionFocusFinder.new | ( | int | direction, |
| Point | position, | ||
| Point | size ) |
Create finder for search direction.
| direction | Direction as InputEventKey.arrowLeft, InputEventKey.arrowRight, InputEventKey.arrowUp or InputEventKey.arrowDown. |
| position | Position of origin widget relative to origin. |
| size | Size of origin widget. |
Referenced by addIgnoreWidget(), addIgnoreWidgetFocusable(), challengeBest(), getBestHitWidget(), getBestNearestWidget(), hasIgnoreWidget(), new(), processWidget(), and reset().
| void Dragengine.Gui.ClosestDirectionFocusFinder.processWidget | ( | Widget | widget, |
| Point | position, | ||
| Point | size ) |
Process widget.
| widget | Widget to process. |
| position | Position of widget relative to origin. |
| size | Size of widget. |
References new(), pIgnoreWidgets, and pOriginBox.
Referenced by challengeBest().
| void Dragengine.Gui.ClosestDirectionFocusFinder.reset | ( | ) |
Reset finder.
Reimplemented in Dragengine.Gui.MainMenus.Interactive.IMMInteract.IMMClosestDirectionFocusFinder.
Referenced by challengeBest().
|
protected |
Referenced by challengeBest().
|
protected |
Referenced by challengeBest().
|
protected |
Referenced by challengeBest().
|
protected |
Referenced by addIgnoreWidgetFocusable(), hasIgnoreWidget(), new(), and reset().
|
protected |
Referenced by challengeBest().
|
protected |
Referenced by challengeBest(), getBestHitBox(), getBestNearestX(), and processWidget().
|
protected |
Referenced by challengeBest(), and processWidget().