| Package | org.wak.gui.sci |
| Class | public class SciInventoryDisplay |
| Inheritance | SciInventoryDisplay flash.display.Sprite |
| Property | Defined by | ||
|---|---|---|---|
| arrowDown : WakSimpleButton
[write-only]
Button to scroll down the inventory.
| SciInventoryDisplay | ||
| arrowUp : WakSimpleButton
[write-only]
Button to scroll up the inventory.
| SciInventoryDisplay | ||
| buttonOk : WakSimpleButton
[write-only]
Setter for the ok button of the inventory.
| SciInventoryDisplay | ||
| buttonSelect : WakSimpleButton
[write-only]
Setter for the select arrow button of the inventory.
| SciInventoryDisplay | ||
| buttonsHorizontalSpace : Number [write-only]
The horizontal space between inventory's buttons.
| SciInventoryDisplay | ||
| dropShadow : Boolean [write-only]
Enable or disable the inventory's shadow.
| SciInventoryDisplay | ||
| firstItemX : Number [write-only]
Set the horizontal coordinate for the first item of the inventory
| SciInventoryDisplay | ||
| firstItemY : Number [write-only]
Set the verticall coordinate for the first item of the inventory
| SciInventoryDisplay | ||
| horizontalLayout : Boolean [write-only]
Use the horizontal layout for the row of buttons.
| SciInventoryDisplay | ||
| horizontalLayoutLeftMargin : Number [write-only]
The left margin for the horizontal layout.
| SciInventoryDisplay | ||
| horizontalLayoutY : Number [write-only]
The vertical coordinate of the row of buttons.
| SciInventoryDisplay | ||
| itemWasSelected : Boolean [read-only]
True if an item was selected on an inventory session (since the inventory was open).
| SciInventoryDisplay | ||
| mouseCursor : SciCursor
[write-only]
Set the cursor used to show the selected items
in the inventory.
| SciInventoryDisplay | ||
| Property | Defined by | ||
|---|---|---|---|
| mArrowDown : WakSimpleButton = null | SciInventoryDisplay | ||
| mArrowUp : WakSimpleButton = null | SciInventoryDisplay | ||
| mBackground : DisplayObject = null | SciInventoryDisplay | ||
| mBgColor : uint = 0xFFFFFF | SciInventoryDisplay | ||
| mBgHeight : Number = 50 | SciInventoryDisplay | ||
| mBgWidth : Number = 50 | SciInventoryDisplay | ||
| mBorderColor : uint = 0x000000 | SciInventoryDisplay | ||
| mCols : int = 0 | SciInventoryDisplay | ||
| mColsSeparator : int = 1 | SciInventoryDisplay | ||
| mDrawnBg : Sprite = null | SciInventoryDisplay | ||
| mInventory : Inventory = null | SciInventoryDisplay | ||
| mInventoryMask : Sprite = null | SciInventoryDisplay | ||
| mItemHeight : int = 0 | SciInventoryDisplay | ||
| mItemsArray : Array = null | SciInventoryDisplay | ||
| mItemsX : Number = 0 | SciInventoryDisplay | ||
| mItemsY : Number = 0 | SciInventoryDisplay | ||
| mItemWidth : int = 0 | SciInventoryDisplay | ||
| mLastActionDispatched : String = "" | SciInventoryDisplay | ||
| mRows : int = 0 | SciInventoryDisplay | ||
| mRowsSeparator : int = 2 | SciInventoryDisplay | ||
| mScrollingLayer : Sprite = null | SciInventoryDisplay | ||
| mSelectedItem : Sprite = null | SciInventoryDisplay | ||
| mShadowFilter : DropShadowFilter = null | SciInventoryDisplay | ||
| mSpriteToItem : Array = null | SciInventoryDisplay | ||
| mTotalRows : int = 0 | SciInventoryDisplay | ||
| Method | Defined by | ||
|---|---|---|---|
|
SciInventoryDisplay(pInventory:Inventory, pActionsArr:Array, pRows:int = 2, pCols:int = 4, pItemWidth:int = 70, pItemHeight:int = 44, pBg:DisplayObject = null, pBgColor:uint = 0xFFFFFF, pBorderColor:uint = 0x000000, pW:Number = 200, pH:Number = 200)
Constructor
| SciInventoryDisplay | ||
|
SetActionsButtons(pBtnsArray:Array):void
Overrides the pActionsArr passed in the constructor with new actions
and set the buttons for that actions.
| SciInventoryDisplay | ||
| Method | Defined by | ||
|---|---|---|---|
|
CreateActionButton(pAction:String):WakSimpleButton
| SciInventoryDisplay | ||
|
CreateDefaultActionButtons(pActionsArr:Array):Array
| SciInventoryDisplay | ||
| SciInventoryDisplay | |||
| SciInventoryDisplay | |||
| SciInventoryDisplay | |||
| SciInventoryDisplay | |||
|
DispatchAction(pActionId:String, pItem:InventoryItem = null):void
| SciInventoryDisplay | ||
|
DrawDefaultButtonBg(pBtn:Sprite, pW:Number, pH:Number, pColor:uint):void
| SciInventoryDisplay | ||
|
DrawDownArrow(pBgColor:uint, pArrowColor:uint):Sprite
| SciInventoryDisplay | ||
|
DrawOkIcon(pBtn:Sprite):void
| SciInventoryDisplay | ||
|
FillInventory(pItItems:IIterator):void
| SciInventoryDisplay | ||
|
OnActionSelected(event:Event):void
| SciInventoryDisplay | ||
|
OnAddedToStage(event:Event):void
| SciInventoryDisplay | ||
|
OnButtonOkPressed(event:Event):void
| SciInventoryDisplay | ||
|
OnItemAdded(event:InventoryEvent):void
| SciInventoryDisplay | ||
|
OnItemMouseClick(event:MouseEvent):void
| SciInventoryDisplay | ||
|
OnItemMouseOut(event:MouseEvent):void
| SciInventoryDisplay | ||
|
OnItemMouseOver(event:MouseEvent):void
| SciInventoryDisplay | ||
|
OnItemRemoved(event:InventoryEvent):void
| SciInventoryDisplay | ||
|
OnMouseMove(event:MouseEvent):void
| SciInventoryDisplay | ||
|
OnRemovedToStage(event:Event):void
| SciInventoryDisplay | ||
|
OnScrollDown(event:Event):void
| SciInventoryDisplay | ||
|
OnScrollUp(event:Event):void
| SciInventoryDisplay | ||
|
RefreshItemsPositions(pItemsArray:Array):void
| SciInventoryDisplay | ||
|
ScrollDown():void
| SciInventoryDisplay | ||
|
ScrollUp():void
| SciInventoryDisplay | ||
|
UpdateScrollButtons():void
| SciInventoryDisplay | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched when an action button is clicked inside the inventory window. | SciInventoryDisplay | |||
| Dispatched when an inventory item button is selected in the inventory window. | SciInventoryDisplay | |||
| arrowDown | property |
arrowDown:WakSimpleButton [write-only]Button to scroll down the inventory.
Implementation public function set arrowDown(value:WakSimpleButton):void
| arrowUp | property |
arrowUp:WakSimpleButton [write-only]Button to scroll up the inventory.
Implementation public function set arrowUp(value:WakSimpleButton):void
| buttonOk | property |
buttonOk:WakSimpleButton [write-only]Setter for the ok button of the inventory.
Implementation public function set buttonOk(value:WakSimpleButton):void
| buttonSelect | property |
buttonSelect:WakSimpleButton [write-only]Setter for the select arrow button of the inventory.
Implementation public function set buttonSelect(value:WakSimpleButton):void
| buttonsHorizontalSpace | property |
buttonsHorizontalSpace:Number [write-only]The horizontal space between inventory's buttons.
Implementation public function set buttonsHorizontalSpace(value:Number):void
| dropShadow | property |
dropShadow:Boolean [write-only]Enable or disable the inventory's shadow.
Implementation public function set dropShadow(value:Boolean):void
| firstItemX | property |
firstItemX:Number [write-only]Set the horizontal coordinate for the first item of the inventory
Implementation public function set firstItemX(value:Number):void
| firstItemY | property |
firstItemY:Number [write-only]Set the verticall coordinate for the first item of the inventory
Implementation public function set firstItemY(value:Number):void
| horizontalLayout | property |
horizontalLayout:Boolean [write-only]Use the horizontal layout for the row of buttons.
Implementation public function set horizontalLayout(value:Boolean):void
| horizontalLayoutLeftMargin | property |
horizontalLayoutLeftMargin:Number [write-only]The left margin for the horizontal layout.
Implementation public function set horizontalLayoutLeftMargin(value:Number):void
| horizontalLayoutY | property |
horizontalLayoutY:Number [write-only]The vertical coordinate of the row of buttons.
Implementation public function set horizontalLayoutY(value:Number):void
| itemWasSelected | property |
itemWasSelected:Boolean [read-only]True if an item was selected on an inventory session (since the inventory was open).
Implementation public function get itemWasSelected():Boolean
| mArrowDown | property |
protected var mArrowDown:WakSimpleButton = null
| mArrowUp | property |
protected var mArrowUp:WakSimpleButton = null
| mBackground | property |
protected var mBackground:DisplayObject = null
| mBgColor | property |
protected var mBgColor:uint = 0xFFFFFF
| mBgHeight | property |
protected var mBgHeight:Number = 50
| mBgWidth | property |
protected var mBgWidth:Number = 50
| mBorderColor | property |
protected var mBorderColor:uint = 0x000000
| mCols | property |
protected var mCols:int = 0
| mColsSeparator | property |
protected var mColsSeparator:int = 1
| mDrawnBg | property |
protected var mDrawnBg:Sprite = null
| mInventory | property |
protected var mInventory:Inventory = null
| mInventoryMask | property |
protected var mInventoryMask:Sprite = null
| mItemHeight | property |
protected var mItemHeight:int = 0
| mItemsArray | property |
protected var mItemsArray:Array = null
| mItemsX | property |
protected var mItemsX:Number = 0
| mItemsY | property |
protected var mItemsY:Number = 0
| mItemWidth | property |
protected var mItemWidth:int = 0
| mLastActionDispatched | property |
protected var mLastActionDispatched:String = ""
| mouseCursor | property |
mouseCursor:SciCursor [write-only]Set the cursor used to show the selected items in the inventory.
Implementation public function set mouseCursor(value:SciCursor):void
| mRows | property |
protected var mRows:int = 0
| mRowsSeparator | property |
protected var mRowsSeparator:int = 2
| mScrollingLayer | property |
protected var mScrollingLayer:Sprite = null
| mSelectedItem | property |
protected var mSelectedItem:Sprite = null
| mShadowFilter | property |
protected var mShadowFilter:DropShadowFilter = null
| mSpriteToItem | property |
protected var mSpriteToItem:Array = null
| mTotalRows | property |
protected var mTotalRows:int = 0
| SciInventoryDisplay | () | constructor |
public function SciInventoryDisplay(pInventory:Inventory, pActionsArr:Array, pRows:int = 2, pCols:int = 4, pItemWidth:int = 70, pItemHeight:int = 44, pBg:DisplayObject = null, pBgColor:uint = 0xFFFFFF, pBorderColor:uint = 0x000000, pW:Number = 200, pH:Number = 200)Constructor
ParameterspInventory:Inventory — the inventory of the player's character
|
|
pActionsArr:Array — Array of actions id to include in the inventory buttons.
|
|
pRows:int (default = 2) — visible rows that the inventory will have on screen.
|
|
pCols:int (default = 4) — visible columns that the inventory will have on screen.
|
|
pItemWidth:int (default = 70) — max width in pixels of an item on the inventory
|
|
pItemHeight:int (default = 44) — max height in pixels of an item on the inventory
|
|
pBg:DisplayObject (default = null) — DisplayObject to use as background.
|
|
pBgColor:uint (default = 0xFFFFFF) — Color to use as background in the case of pBg is null.
|
|
pBorderColor:uint (default = 0x000000) — Color to use in the border in the case of pBg is null.
|
|
pW:Number (default = 200) — Inventory display width.
|
|
pH:Number (default = 200) — Inventory display height.
|
| CreateActionButton | () | method |
protected function CreateActionButton(pAction:String):WakSimpleButtonParameters
pAction:String |
WakSimpleButton |
| CreateDefaultActionButtons | () | method |
protected function CreateDefaultActionButtons(pActionsArr:Array):ArrayParameters
pActionsArr:Array |
Array |
| CreateDownArrow | () | method |
| CreateOkButton | () | method |
| CreateSelectButton | () | method |
| CreateUpArrow | () | method |
| DispatchAction | () | method |
protected function DispatchAction(pActionId:String, pItem:InventoryItem = null):voidParameters
pActionId:String |
|
pItem:InventoryItem (default = null) |
| DrawDefaultButtonBg | () | method |
protected function DrawDefaultButtonBg(pBtn:Sprite, pW:Number, pH:Number, pColor:uint):voidParameters
pBtn:Sprite |
|
pW:Number |
|
pH:Number |
|
pColor:uint |
| DrawDownArrow | () | method |
protected function DrawDownArrow(pBgColor:uint, pArrowColor:uint):SpriteParameters
pBgColor:uint |
|
pArrowColor:uint |
Sprite |
| DrawOkIcon | () | method |
protected function DrawOkIcon(pBtn:Sprite):voidParameters
pBtn:Sprite |
| FillInventory | () | method |
| OnActionSelected | () | method |
protected function OnActionSelected(event:Event):voidParameters
event:Event |
| OnAddedToStage | () | method |
protected function OnAddedToStage(event:Event):voidParameters
event:Event |
| OnButtonOkPressed | () | method |
protected function OnButtonOkPressed(event:Event):voidParameters
event:Event |
| OnItemAdded | () | method |
| OnItemMouseClick | () | method |
protected function OnItemMouseClick(event:MouseEvent):voidParameters
event:MouseEvent |
| OnItemMouseOut | () | method |
protected function OnItemMouseOut(event:MouseEvent):voidParameters
event:MouseEvent |
| OnItemMouseOver | () | method |
protected function OnItemMouseOver(event:MouseEvent):voidParameters
event:MouseEvent |
| OnItemRemoved | () | method |
| OnMouseMove | () | method |
protected function OnMouseMove(event:MouseEvent):voidParameters
event:MouseEvent |
| OnRemovedToStage | () | method |
protected function OnRemovedToStage(event:Event):voidParameters
event:Event |
| OnScrollDown | () | method |
protected function OnScrollDown(event:Event):voidParameters
event:Event |
| OnScrollUp | () | method |
protected function OnScrollUp(event:Event):voidParameters
event:Event |
| RefreshItemsPositions | () | method |
protected function RefreshItemsPositions(pItemsArray:Array):voidParameters
pItemsArray:Array |
| ScrollDown | () | method |
protected function ScrollDown():void
| ScrollUp | () | method |
protected function ScrollUp():void
| SetActionsButtons | () | method |
public function SetActionsButtons(pBtnsArray:Array):voidOverrides the pActionsArr passed in the constructor with new actions and set the buttons for that actions.
ParameterspBtnsArray:Array — Array with WakButtons for the actions.
|
| UpdateScrollButtons | () | method |
protected function UpdateScrollButtons():void
| ACTION_SELECTED | event |
org.wak.gui.events.GuiEvent
Dispatched when an action button is clicked inside the inventory window.
| INVENTORY_ITEM_SELECTED | event |
org.wak.gui.events.GuiEvent
Dispatched when an inventory item button is selected in the inventory window.