Packageorg.wak.gui.sci
Classpublic class SciItemSelectionButton
InheritanceSciItemSelectionButton Inheritance WakSimpleButton Inheritance flash.display.Sprite

Class to show the last selected item in the button panel of the SCI interface.



Public Properties
 PropertyDefined by
 InheritedbuttonName : String
WakSimpleButton
 Inheritedenabled : Boolean
WakSimpleButton
 Inheritedselected : Boolean
WakSimpleButton
  selectedItem : InventoryItem
[read-only] The current selected item.
SciItemSelectionButton
Protected Properties
 PropertyDefined by
 InheritedmButtonName : String = ""
WakSimpleButton
 InheritedmDown : DisplayObject = null
WakSimpleButton
 InheritedmEnabled : Boolean = true
WakSimpleButton
 InheritedmOver : DisplayObject = null
WakSimpleButton
 InheritedmSelected : Boolean = false
WakSimpleButton
 InheritedmUp : DisplayObject = null
WakSimpleButton
Public Methods
 MethodDefined by
  
SciItemSelectionButton(pUp:DisplayObject, pOver:DisplayObject, pDown:DisplayObject, pMaskMargin:int, pActionName:String = "")
Constructor.
SciItemSelectionButton
  
Clear the selected item in the panel.
SciItemSelectionButton
  
SciItemSelectionButton
  
SetItemSelected(pInventoryItem:InventoryItem):void
Set the selected item in the button.
SciItemSelectionButton
 Inherited
Update(pStageX:Number, pStageY:Number):void
Updates the button state using a hitTestPoint over pStageX and pStageY.
WakSimpleButton
Protected Methods
 MethodDefined by
  
OnAddedToStage(event:Event):void
SciItemSelectionButton
  
OnClick(event:MouseEvent):void
SciItemSelectionButton
 Inherited
OnMouseDown(event:MouseEvent):void
WakSimpleButton
  
OnMouseOut(event:MouseEvent):void
SciItemSelectionButton
  
OnMouseOver(event:MouseEvent):void
SciItemSelectionButton
 Inherited
OnMouseUp(event:MouseEvent):void
WakSimpleButton
  
OnRemovedFromStage(event:Event):void
SciItemSelectionButton
Events
 EventSummaryDefined by
   Dispatched when the inventory item button is clicked it is dispatched even if there is no selected item.SciItemSelectionButton
Property detail
selectedItemproperty
selectedItem:InventoryItem  [read-only]

The current selected item.

The default value is null.

Implementation
    public function get selectedItem():InventoryItem
Constructor detail
SciItemSelectionButton()constructor
public function SciItemSelectionButton(pUp:DisplayObject, pOver:DisplayObject, pDown:DisplayObject, pMaskMargin:int, pActionName:String = "")

Constructor.

Parameters
pUp:DisplayObject — The initial value for the WakSimpleButton up state.
 
pOver:DisplayObject — The initial value for the WakSimpleButton over state.
 
pDown:DisplayObject — The initial value for the WakSimpleButton down state.
 
pMaskMargin:int — an optional button name to use as an id depending on the context.
 
pActionName:String (default = "")
Method detail
ClearSelectedItem()method
public function ClearSelectedItem():void

Clear the selected item in the panel.

OnAddedToStage()method 
protected override function OnAddedToStage(event:Event):voidParameters
event:Event
OnClick()method 
protected function OnClick(event:MouseEvent):voidParameters
event:MouseEvent
OnItemRemoved()method 
public function OnItemRemoved(event:InventoryEvent):voidParameters
event:InventoryEvent
OnMouseOut()method 
protected override function OnMouseOut(event:MouseEvent):voidParameters
event:MouseEvent
OnMouseOver()method 
protected override function OnMouseOver(event:MouseEvent):voidParameters
event:MouseEvent
OnRemovedFromStage()method 
protected override function OnRemovedFromStage(event:Event):voidParameters
event:Event
SetItemSelected()method 
public function SetItemSelected(pInventoryItem:InventoryItem):void

Set the selected item in the button.

Parameters
pInventoryItem:InventoryItem — the new selected item.
Event detail
INVENTORY_ITEM_SELECTEDevent 
Event object type: org.wak.gui.events.GuiEvent

Dispatched when the inventory item button is clicked it is dispatched even if there is no selected item. If that is the case the inventoryItem is set to null.