Packageorg.flixel.system.debug
Classpublic class WatchEntry
InheritanceWatchEntry Inheritance Object

Helper class for the debugger overlay's Watch window. Handles the display and modification of game variables on the fly.



Public Properties
 PropertyDefined By
  custom : String
A custom display name for this object, if there is any.
WatchEntry
  editing : Boolean
Whether the entry is currently being edited or not.
WatchEntry
  field : String
The member variable of that object.
WatchEntry
  nameDisplay : TextField
The Flash TextField object used to display this entry's name.
WatchEntry
  object : Object
The Object being watched.
WatchEntry
  oldValue : Object
The value of the field before it was edited.
WatchEntry
  valueDisplay : TextField
The Flash TextField object used to display and edit this entry's value.
WatchEntry
Protected Properties
 PropertyDefined By
  _blackText : TextFormat
WatchEntry
  _whiteText : TextFormat
WatchEntry
Public Methods
 MethodDefined By
  
WatchEntry(Y:Number, NameWidth:Number, ValueWidth:Number, Obj:Object, Field:String, Custom:String = null)
Creates a new watch entry in the watch window.
WatchEntry
  
cancel():void
Cancel the current edits and stop editing.
WatchEntry
  
destroy():void
Clean up memory.
WatchEntry
  
onKeyUp(FlashEvent:KeyboardEvent):void
Check to see if Enter, Tab or Escape were just released.
WatchEntry
  
onMouseUp(FlashEvent:MouseEvent):void
A watch entry was clicked, so flip into edit mode for that entry.
WatchEntry
  
setY(Y:Number):void
Set the watch window Y height of the Flash TextField objects.
WatchEntry
  
submit():void
Submit the current edits and stop editing.
WatchEntry
  
updateValue():Boolean
Update the variable value on display with the current in-game value.
WatchEntry
  
updateWidth(NameWidth:Number, ValueWidth:Number):void
Adjust the width of the Flash TextField objects.
WatchEntry
Protected Methods
 MethodDefined By
  
Helper function, switches the text field back to display mode.
WatchEntry
Property Detail
_blackTextproperty
protected var _blackText:TextFormat

_whiteTextproperty 
protected var _whiteText:TextFormat

customproperty 
public var custom:String

A custom display name for this object, if there is any.

editingproperty 
public var editing:Boolean

Whether the entry is currently being edited or not.

fieldproperty 
public var field:String

The member variable of that object.

nameDisplayproperty 
public var nameDisplay:TextField

The Flash TextField object used to display this entry's name.

objectproperty 
public var object:Object

The Object being watched.

oldValueproperty 
public var oldValue:Object

The value of the field before it was edited.

valueDisplayproperty 
public var valueDisplay:TextField

The Flash TextField object used to display and edit this entry's value.

Constructor Detail
WatchEntry()Constructor
public function WatchEntry(Y:Number, NameWidth:Number, ValueWidth:Number, Obj:Object, Field:String, Custom:String = null)

Creates a new watch entry in the watch window.

Parameters
Y:Number — The initial height in the Watch window.
 
NameWidth:Number — The initial width of the name field.
 
ValueWidth:Number — The initial width of the value field.
 
Obj:Object — The Object containing the variable we want to watch.
 
Field:String — The variable name we want to watch.
 
Custom:String (default = null) — A custom display name (optional).
Method Detail
cancel()method
public function cancel():void

Cancel the current edits and stop editing.

destroy()method 
public function destroy():void

Clean up memory.

doneEditing()method 
protected function doneEditing():void

Helper function, switches the text field back to display mode.

onKeyUp()method 
public function onKeyUp(FlashEvent:KeyboardEvent):void

Check to see if Enter, Tab or Escape were just released. Enter or Tab submit the change, and Escape cancels it.

Parameters

FlashEvent:KeyboardEvent — Flash keyboard event.

onMouseUp()method 
public function onMouseUp(FlashEvent:MouseEvent):void

A watch entry was clicked, so flip into edit mode for that entry.

Parameters

FlashEvent:MouseEvent — Flash mouse event.

setY()method 
public function setY(Y:Number):void

Set the watch window Y height of the Flash TextField objects.

Parameters

Y:Number

submit()method 
public function submit():void

Submit the current edits and stop editing.

updateValue()method 
public function updateValue():Boolean

Update the variable value on display with the current in-game value.

Returns
Boolean
updateWidth()method 
public function updateWidth(NameWidth:Number, ValueWidth:Number):void

Adjust the width of the Flash TextField objects.

Parameters

NameWidth:Number
 
ValueWidth:Number