Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion flixel/system/debug/console/Console.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions flixel/system/debug/watch/Watch.hx
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ class WatchBase<TEntry:WatchEntry> 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))
Expand Down
16 changes: 12 additions & 4 deletions flixel/system/frontEnds/BitmapFrontEnd.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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);
}
Expand Down Expand Up @@ -295,7 +303,7 @@ class BitmapFrontEnd
}
}

inline function removeKey(key:String):Void
function removeKey(key:String):Void
{
if (key != null)
{
Expand Down
Loading