Package | org.flixel.system |
Class | public class FlxWindow |
Inheritance | FlxWindow flash.display.Sprite |
Subclasses | Log, Perf, Watch |
FlxDebugger
.
Property | Defined By | ||
---|---|---|---|
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 | ||
_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 | ||
_width : uint
Width of the window. | FlxWindow |
Method | Defined By | ||
---|---|---|---|
FlxWindow(Title:String, Width:Number, Height:Number, Resizable:Boolean = true, Bounds:Rectangle = null, BGColor:uint = 0x7f7f7f7f, TopColor:uint = 0x7f000000)
Creates a new window object. | FlxWindow | ||
destroy():void
Clean up memory. | FlxWindow | ||
reposition(X:Number, Y:Number):void
Change the position of the window. | FlxWindow | ||
resize(Width:Number, Height:Number):void
Resize the window. | FlxWindow |
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
Update the Flash shapes to match the new size, and reposition the header, shadow, and handle accordingly. | FlxWindow |
_background | property |
protected var _background:Bitmap
Window display element.
_bounds | property |
protected var _bounds:Rectangle
Controls where the window is allowed to be positioned.
_drag | property |
protected var _drag:Point
Helper for interaction.
_dragging | property |
protected var _dragging:Boolean
Helper for interaction.
_handle | property |
protected var _handle:Bitmap
Window display element.
_header | property |
protected var _header:Bitmap
Window display element.
_height | property |
protected var _height:uint
Height of the window. Using Sprite.height is super unreliable for some reason!
_overHandle | property |
protected var _overHandle:Boolean
Helper for interaction.
_overHeader | property |
protected var _overHeader:Boolean
Helper for interaction.
_resizable | property |
protected var _resizable:Boolean
Helper for interaction.
_resizing | property |
protected var _resizing:Boolean
Helper for interaction.
_shadow | property |
protected var _shadow:Bitmap
Window display element.
_title | property |
protected var _title:TextField
Window display element.
_width | property |
protected var _width:uint
Width of the window. Using Sprite.width is super unreliable for some reason!
ImgHandle | property |
protected var ImgHandle:Class
maxSize | property |
public var maxSize:Point
Maximum allowed X and Y dimensions for this window.
minSize | property |
public var minSize:Point
Minimum allowed X and Y dimensions for this window.
FlxWindow | () | Constructor |
public function FlxWindow(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.
|
bound | () | method |
protected function bound():void
Keep the window within the pre-specified bounding rectangle.
destroy | () | method |
public function destroy():void
Clean up memory.
init | () | method |
protected function init(E:Event = null):void
Used to set up basic mouse listeners.
Parameters
E:Event (default = null ) — Flash event.
|
onMouseDown | () | method |
protected function onMouseDown(E:MouseEvent = null):void
Figure out if window is being repositioned (clicked on header) or resized (clicked on handle).
Parameters
E:MouseEvent (default = null ) — Flash mouse event.
|
onMouseMove | () | method |
protected function onMouseMove(E:MouseEvent = null):void
Mouse movement handler. Figures out if mouse is over handle or header bar or what.
Parameters
E:MouseEvent (default = null ) — Flash mouse event.
|
onMouseUp | () | method |
protected function onMouseUp(E:MouseEvent = null):void
User let go of header bar or handler (or nothing), so turn off drag and resize behaviors.
Parameters
E:MouseEvent (default = null ) — Flash mouse event.
|
reposition | () | method |
public function reposition(X:Number, Y:Number):void
Change the position of the window. Subject to pre-specified bounding rectangles.
Parameters
X:Number — Desired X position of top left corner of the window.
| |
Y:Number — Desired Y position of top left corner of the window.
|
resize | () | method |
public function resize(Width:Number, Height:Number):void
Resize the window. Subject to pre-specified minimums, maximums, and bounding rectangles.
Parameters
Width:Number — How wide to make the window.
| |
Height:Number — How tall to make the window.
|
updateGUI | () | method |
protected function updateGUI():void
Figure out if the header or handle are highlighted.
updateSize | () | method |
protected function updateSize():void
Update the Flash shapes to match the new size, and reposition the header, shadow, and handle accordingly.