diff --git a/flixel/system/debug/console/Console.hx b/flixel/system/debug/console/Console.hx index 3643b18a42..b91e865c62 100644 --- a/flixel/system/debug/console/Console.hx +++ b/flixel/system/debug/console/Console.hx @@ -117,8 +117,11 @@ class Console extends Window FlxG.stage.addEventListener(KeyboardEvent.KEY_DOWN, function(e:KeyboardEvent) { if (FlxG.debugger.visible && FlxG.game.debugger.console.visible && e.keyCode == Keyboard.TAB) + { FlxG.stage.focus = input; - }); + e.preventDefault(); + } + }, false, 1); #end #end diff --git a/flixel/system/debug/watch/Watch.hx b/flixel/system/debug/watch/Watch.hx index da4d746376..c9283a033e 100644 --- a/flixel/system/debug/watch/Watch.hx +++ b/flixel/system/debug/watch/Watch.hx @@ -147,6 +147,9 @@ class WatchBase extends Window override function update():Void { + // Skip processing because all children are invisible! + if (!this.visible || !this.parent.visible) return; + for (entry in entries) { if (entriesContainer.isChildVisible(entry)) diff --git a/flixel/system/frontEnds/BitmapFrontEnd.hx b/flixel/system/frontEnds/BitmapFrontEnd.hx index 8e17339206..799aafd0fe 100644 --- a/flixel/system/frontEnds/BitmapFrontEnd.hx +++ b/flixel/system/frontEnds/BitmapFrontEnd.hx @@ -114,9 +114,17 @@ class BitmapFrontEnd * @param graphic The graphic to cache. * @return The cached graphic. */ - public inline function addGraphic(graphic:FlxGraphic):FlxGraphic + public function addGraphic(graphic:FlxGraphic):FlxGraphic { - _cache.set(graphic.key, graphic); + if (!_cache.exists(graphic.key) || _cache.get(graphic.key) == null) + { + _cache.set(graphic.key, graphic); + } + else if (_cache.get(graphic.key) != graphic) + { + removeByKey(graphic.key); + _cache.set(graphic.key, graphic); + } return graphic; } @@ -126,7 +134,7 @@ class BitmapFrontEnd * @param key The FlxGraphics key (or name). * @return The FlxGraphic with the specified key, or null if the object doesn't exist. */ - public inline function get(key:String):FlxGraphic + public function get(key:String):FlxGraphic { return _cache.get(key); } @@ -295,7 +303,7 @@ class BitmapFrontEnd } } - inline function removeKey(key:String):Void + function removeKey(key:String):Void { if (key != null) {