import { Nullable } from "babylonjs/types"; import { Vector2 } from "babylonjs/Maths/math.vector"; import { Button } from "./button"; import { Control } from "./control"; import { _TypeStore } from 'babylonjs/Misc/typeStore'; import { PointerInfoBase } from 'babylonjs/Events/pointerEvents'; import { IFocusableControl } from '../advancedDynamicTexture'; import { Observable } from 'babylonjs/Misc/observable'; /** * Class used to create a focusable button that can easily handle keyboard events */ export class FocusableButton extends Button implements IFocusableControl { private _isFocused = false; public focusedColor: Nullable = null; private _unfocusedColor: Nullable = null; /** Observable raised when the control gets the focus */ public onFocusObservable = new Observable