diff --git a/flixel/FlxState.hx b/flixel/FlxState.hx index ade5b320fc..cba628dfb9 100644 --- a/flixel/FlxState.hx +++ b/flixel/FlxState.hx @@ -202,13 +202,17 @@ class FlxState extends FlxContainer * This method is called after the game loses focus. * Can be useful for third party libraries, such as tweening engines. */ - public function onFocusLost():Void {} + public function onFocusLost():Void { + if (subState != null) subState.onFocusLost(); + } /** * This method is called after the game receives focus. * Can be useful for third party libraries, such as tweening engines. */ - public function onFocus():Void {} + public function onFocus():Void { + if (subState != null) subState.onFocus(); + } /** * This function is called whenever the window size has been changed.