Skip to content

Commit

Permalink
Renamed "visualDebug" to "drawDebug" in FlxDebugger. To better reflec…
Browse files Browse the repository at this point in the history
…t its functionality.
  • Loading branch information
gamedevsam committed Jan 12, 2014
1 parent b8065c0 commit 752e840
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions flixel/FlxGame.hx
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ class FlxGame extends Sprite
FlxG.plugins.draw();

#if !FLX_NO_DEBUG
if (FlxG.debugger.visualDebug)
if (FlxG.debugger.drawDebug)
{
FlxG.plugins.drawDebug();
}
Expand All @@ -727,7 +727,7 @@ class FlxGame extends Sprite
state.draw();

#if !FLX_NO_DEBUG
if (FlxG.debugger.visualDebug)
if (FlxG.debugger.drawDebug)
{
state.drawDebug();
}
Expand Down
2 changes: 1 addition & 1 deletion flixel/plugin/PathManager.hx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class PathManager extends FlxPlugin
*/
override public function drawDebug():Void
{
if (!FlxG.debugger.visualDebug || ignoreDrawDebug)
if (!FlxG.debugger.drawDebug || ignoreDrawDebug)
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion flixel/system/FlxAssets.hx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class FlxAssets
inline static public var IMG_FLIXEL:String = "flixel/img/debugger/flixel.png";

// debugger/buttons
inline static public var IMG_VISUAL_DEBUG:String = "flixel/img/debugger/buttons/visualDebug.png";
inline static public var IMG_VISUAL_DEBUG:String = "flixel/img/debugger/buttons/drawDebug.png";
inline static public var IMG_WATCH_DEBUG:String = "flixel/img/debugger/buttons/watchDebug.png";
inline static public var IMG_STATS_DEBUG:String = "flixel/img/debugger/buttons/statsDebug.png";
inline static public var IMG_LOG_DEBUG:String = "flixel/img/debugger/buttons/logDebug.png";
Expand Down
7 changes: 4 additions & 3 deletions flixel/system/debug/FlxDebugger.hx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ class FlxDebugger extends Sprite

stats = new Stats("stats", FlxAssets.IMG_STATS_DEBUG, 0, 0, false);
addChild(stats);
stats.visible = true;

#if FLX_BMP_DEBUG
bmpLog = new BmpLog("bmplog", 0, 0, true);
Expand All @@ -155,7 +156,7 @@ class FlxDebugger extends Sprite
addButton(RIGHT, FlxAssets.IMG_WATCH_DEBUG, watch.toggleVisibility, true).toggled = !watch.visible;
addButton(RIGHT, FlxAssets.IMG_CONSOLE, console.toggleVisibility, true).toggled = !console.visible;
addButton(RIGHT, FlxAssets.IMG_STATS_DEBUG, stats.toggleVisibility, true).toggled = !stats.visible;
addButton(RIGHT, FlxAssets.IMG_VISUAL_DEBUG, toggleVisualDebug, true).toggled = !FlxG.debugger.visualDebug;
addButton(RIGHT, FlxAssets.IMG_VISUAL_DEBUG, toggleVisualDebug, true).toggled = !FlxG.debugger.drawDebug;

#if FLX_RECORD
addButton(MIDDLE).addChild(vcr.runtimeDisplay);
Expand Down Expand Up @@ -449,12 +450,12 @@ class FlxDebugger extends Sprite

inline private function toggleVisualDebug ():Void
{
FlxG.debugger.visualDebug = !FlxG.debugger.visualDebug;
FlxG.debugger.drawDebug = !FlxG.debugger.drawDebug;
}

inline private function openHomepage():Void
{
FlxStringUtil.openURL("http://www.haxeflixel.com");
FlxG.openURL("http://www.haxeflixel.com");
}
}
#end
Expand Down
2 changes: 1 addition & 1 deletion flixel/system/frontEnds/DebuggerFrontEnd.hx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class DebuggerFrontEnd
* Whether to show visual debug displays or not. Doesn't exist in <code>FLX_NO_DEBUG</code> mode.
* @default false
*/
public var visualDebug:Bool = false;
public var drawDebug:Bool = false;
#end

/**
Expand Down
8 changes: 4 additions & 4 deletions flixel/tile/FlxTilemap.hx
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class FlxTilemap extends FlxObject
_debugTilePartial = null;
_debugTileSolid = null;
#end
_lastVisualDebug = FlxG.debugger.visualDebug;
_lastVisualDebug = FlxG.debugger.drawDebug;
#end

_startingIndex = 0;
Expand Down Expand Up @@ -558,9 +558,9 @@ class FlxTilemap extends FlxObject
*/
override public function update():Void
{
if (_lastVisualDebug != FlxG.debugger.visualDebug)
if (_lastVisualDebug != FlxG.debugger.drawDebug)
{
_lastVisualDebug = FlxG.debugger.visualDebug;
_lastVisualDebug = FlxG.debugger.drawDebug;
setDirty();
}

Expand Down Expand Up @@ -651,7 +651,7 @@ class FlxTilemap extends FlxObject
Buffer.pixels.copyPixels(cachedGraphics.bitmap, _flashRect, _flashPoint, null, null, true);

#if !FLX_NO_DEBUG
if (FlxG.debugger.visualDebug && !ignoreDrawDebug)
if (FlxG.debugger.drawDebug && !ignoreDrawDebug)
{
tile = _tileObjects[_data[columnIndex]];

Expand Down

0 comments on commit 752e840

Please sign in to comment.