Package | org.flixel.system.debug |
Class | public class Watch |
Inheritance | Watch FlxWindow flash.display.Sprite |
Property | Defined By | ||
---|---|---|---|
editing : Boolean
Whether a watch entry is currently being edited or not. | Watch | ||
maxSize : Point
Maximum allowed X and Y dimensions for this window. | FlxWindow | ||
minSize : Point
Minimum allowed X and Y dimensions for this window. | FlxWindow |
Property | Defined By | ||
---|---|---|---|
_background : Bitmap
Window display element. | FlxWindow | ||
_bounds : Rectangle
Controls where the window is allowed to be positioned. | FlxWindow | ||
_drag : Point
Helper for interaction. | FlxWindow | ||
_dragging : Boolean
Helper for interaction. | FlxWindow | ||
_handle : Bitmap
Window display element. | FlxWindow | ||
_header : Bitmap
Window display element. | FlxWindow | ||
_height : uint
Height of the window. | FlxWindow | ||
ImgHandle : Class | FlxWindow | ||
_names : Sprite | Watch | ||
_overHandle : Boolean
Helper for interaction. | FlxWindow | ||
_overHeader : Boolean
Helper for interaction. | FlxWindow | ||
_resizable : Boolean
Helper for interaction. | FlxWindow | ||
_resizing : Boolean
Helper for interaction. | FlxWindow | ||
_shadow : Bitmap
Window display element. | FlxWindow | ||
_title : TextField
Window display element. | FlxWindow | ||
_values : Sprite | Watch | ||
_watching : Array | Watch | ||
_width : uint
Width of the window. | FlxWindow |
Method | Defined By | ||
---|---|---|---|
Watch(Title:String, Width:Number, Height:Number, Resizable:Boolean = true, Bounds:Rectangle = null, BGColor:uint = 0x7f7f7f7f, TopColor:uint = 0x7f000000)
Creates a new window object. | Watch | ||
add(AnyObject:Object, VariableName:String, DisplayName:String = null):void
Add a new variable to the watch window. | Watch | ||
destroy():void [override]
Clean up memory. | Watch | ||
remove(AnyObject:Object, VariableName:String = null):void
Remove a variable from the watch window. | Watch | ||
removeAll():void
Remove everything from the watch window. | Watch | ||
reposition(X:Number, Y:Number):void
Change the position of the window. | FlxWindow | ||
resize(Width:Number, Height:Number):void
Resize the window. | FlxWindow | ||
submit():void
Force any watch entries currently being edited to submit their changes. | Watch | ||
update():void
Update all the entries in the watch window. | Watch |
Method | Defined By | ||
---|---|---|---|
bound():void
Keep the window within the pre-specified bounding rectangle. | FlxWindow | ||
init(E:Event = null):void
Used to set up basic mouse listeners. | FlxWindow | ||
onMouseDown(E:MouseEvent = null):void
Figure out if window is being repositioned (clicked on header) or resized (clicked on handle). | FlxWindow | ||
onMouseMove(E:MouseEvent = null):void
Mouse movement handler. | FlxWindow | ||
onMouseUp(E:MouseEvent = null):void
User let go of header bar or handler (or nothing), so turn off drag and resize behaviors. | FlxWindow | ||
updateGUI():void
Figure out if the header or handle are highlighted. | FlxWindow | ||
updateSize():void [override]
Update the Flash shapes to match the new size, and reposition the header, shadow, and handle accordingly. | Watch |
Constant | Defined By | ||
---|---|---|---|
LINE_HEIGHT : uint = 15 [static] | Watch | ||
MAX_LOG_LINES : uint = 1024 [static] | Watch |
_names | property |
protected var _names:Sprite
_values | property |
protected var _values:Sprite
_watching | property |
protected var _watching:Array
editing | property |
public var editing:Boolean
Whether a watch entry is currently being edited or not.
Watch | () | Constructor |
public function Watch(Title:String, Width:Number, Height:Number, Resizable:Boolean = true, Bounds:Rectangle = null, BGColor:uint = 0x7f7f7f7f, TopColor:uint = 0x7f000000)
Creates a new window object. This Flash-based class is mainly (only?) used by FlxDebugger
.
Title:String — The name of the window, displayed in the header bar.
| |
Width:Number — The initial width of the window.
| |
Height:Number — The initial height of the window.
| |
Resizable:Boolean (default = true ) — Whether you can change the size of the window with a drag handle.
| |
Bounds:Rectangle (default = null ) — A rectangle indicating the valid screen area for the window.
| |
BGColor:uint (default = 0x7f7f7f7f ) — What color the window background should be, default is gray and transparent.
| |
TopColor:uint (default = 0x7f000000 ) — What color the window header bar should be, default is black and transparent.
|
add | () | method |
public function add(AnyObject:Object, VariableName:String, DisplayName:String = null):void
Add a new variable to the watch window. Has some simple code in place to prevent accidentally watching the same variable twice.
Parameters
AnyObject:Object — The Object containing the variable you want to track, e.g. this or Player.velocity.
| |
VariableName:String — The String name of the variable you want to track, e.g. "width" or "x".
| |
DisplayName:String (default = null ) — Optional String that can be displayed in the watch window instead of the basic class-name information.
|
destroy | () | method |
override public function destroy():void
Clean up memory.
remove | () | method |
public function remove(AnyObject:Object, VariableName:String = null):void
Remove a variable from the watch window.
Parameters
AnyObject:Object — The Object containing the variable you want to remove, e.g. this or Player.velocity.
| |
VariableName:String (default = null ) — The String name of the variable you want to remove, e.g. "width" or "x". If left null, this will remove all variables of that object.
|
removeAll | () | method |
public function removeAll():void
Remove everything from the watch window.
submit | () | method |
public function submit():void
Force any watch entries currently being edited to submit their changes.
update | () | method |
public function update():void
Update all the entries in the watch window.
updateSize | () | method |
override protected function updateSize():void
Update the Flash shapes to match the new size, and reposition the header, shadow, and handle accordingly. Also adjusts the width of the entries and stuff, and makes sure there is room for all the entries.
LINE_HEIGHT | Constant |
protected static const LINE_HEIGHT:uint = 15
MAX_LOG_LINES | Constant |
protected static const MAX_LOG_LINES:uint = 1024