| Package | org.wak.gui.sci |
| Class | public class SciItemSelectionButton |
| Inheritance | SciItemSelectionButton WakSimpleButton flash.display.Sprite |
| Property | Defined by | ||
|---|---|---|---|
![]() | buttonName : String | WakSimpleButton | |
![]() | enabled : Boolean | WakSimpleButton | |
![]() | selected : Boolean | WakSimpleButton | |
| selectedItem : InventoryItem
[read-only]
The current selected item.
| SciItemSelectionButton | ||
| Method | Defined by | ||
|---|---|---|---|
|
SciItemSelectionButton(pUp:DisplayObject, pOver:DisplayObject, pDown:DisplayObject, pMaskMargin:int, pActionName:String = "")
Constructor.
| SciItemSelectionButton | ||
|
ClearSelectedItem():void
Clear the selected item in the panel.
| SciItemSelectionButton | ||
|
OnItemRemoved(event:InventoryEvent):void
| SciItemSelectionButton | ||
|
SetItemSelected(pInventoryItem:InventoryItem):void
Set the selected item in the button.
| SciItemSelectionButton | ||
![]() |
Update(pStageX:Number, pStageY:Number):void
Updates the button state using a hitTestPoint over
pStageX and pStageY.
| WakSimpleButton | |
| Method | Defined by | ||
|---|---|---|---|
|
OnAddedToStage(event:Event):void
| SciItemSelectionButton | ||
|
OnClick(event:MouseEvent):void
| SciItemSelectionButton | ||
![]() |
OnMouseDown(event:MouseEvent):void
| WakSimpleButton | |
|
OnMouseOut(event:MouseEvent):void
| SciItemSelectionButton | ||
|
OnMouseOver(event:MouseEvent):void
| SciItemSelectionButton | ||
![]() |
OnMouseUp(event:MouseEvent):void
| WakSimpleButton | |
|
OnRemovedFromStage(event:Event):void
| SciItemSelectionButton | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched when the inventory item button is clicked it is dispatched even if there is no selected item. | SciItemSelectionButton | |||
| selectedItem | property |
selectedItem:InventoryItem [read-only]The current selected item.
The default value is null.
public function get selectedItem():InventoryItem
| SciItemSelectionButton | () | constructor |
public function SciItemSelectionButton(pUp:DisplayObject, pOver:DisplayObject, pDown:DisplayObject, pMaskMargin:int, pActionName:String = "")Constructor.
ParameterspUp: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 = "") |
| ClearSelectedItem | () | method |
public function ClearSelectedItem():voidClear 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 |
| 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):voidSet the selected item in the button.
ParameterspInventoryItem:InventoryItem — the new selected item.
|
| INVENTORY_ITEM_SELECTED | event |
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.