Packageorg.wak.gui.sci
Classpublic class SciGui
InheritanceSciGui Inheritance flash.display.Sprite
ImplementsIAdventureGui

Manage the SCI graphic user interface.



Public Properties
 PropertyDefined by
  display : DisplayObject
[read-only] Returns the display object of the gui.
SciGui
  enabled : Boolean
SciGui
  mouseCursor : DisplayObject
[read-only]
SciGui
Public Methods
 MethodDefined by
  
SciGui(pGuiSettings:XML = null)
Constructor.
SciGui
  
DrawActionIcon(pBtn:Sprite, pAction:String):void
[static]
SciGui
  
Hide the player's inventory.
SciGui
  
RemoveMouseCursor(pCursorLayer:Sprite):void
Remove the mouse cursor to the cursor Layer.
SciGui
  
SetMouseCursor(pCursorLayer:Sprite):void
Add the mouse cursor to the cursor Layer.
SciGui
  
SetMouseIconAction(pActionId:String):void
Set the mouse icon to certain action.
SciGui
  
ShowingInventory():Boolean
SciGui
  
Shows the player's inventory.
SciGui
Protected Methods
 MethodDefined by
  
CreateButton(pAction:String):WakSimpleButton
SciGui
  
CreateButtons(pActionsArr:Array, pButtonsArr:Array):void
SciGui
  
CreateCustomButton(pButtonXml:XML, pSaveArray:Array, pUseHorizontal:Boolean):void
SciGui
  
CreateDefaultMouseIcons(pIconsArr:Array, pActionsArr:Array, pCursorLayer:DisplayObjectContainer):void
SciGui
  
SciGui
  
DrawDefaultButtonBg(pBtn:Sprite, pW:Number, pH:Number, pColor:uint):void
SciGui
  
LoadSettings(pSettings:XML):void
SciGui
  
OnActionSelected(event:Event):void
SciGui
  
OnAddedToStage(event:Event):void
Listener for the event ADDED_TO_STAGE.
SciGui
  
OnButtonPanelMouseOut(event:MouseEvent):void
SciGui
  
SciGui
  
SciGui
  
OnInventoryOk(event:Event):void
SciGui
  
OnMouseMove(event:MouseEvent):void
Listener for the event MOUSE_MOVE.
SciGui
  
OnRemovedToStage(event:Event):void
Listener for the event REMOVED_FROM_STAGE.
SciGui
  
SciGui
  
SciGui
  
SetActionSelected(pButtonName:String, pSetMouse:Boolean = true):void
SciGui
  
SciGui
Events
 EventSummaryDefined by
   Dispatched when an action button is clicked SciGui
   Dispatched when an inventory item button is selected in the inventory window.SciGui
Public Constants
 ConstantDefined by
  CLOSE_INVENTORY : String = "close_inventory"
[static] Internal action for the button close inventory.
SciGui
  OPEN_INVENTORY : String = "open_inventory"
[static] Internal action for the button open inventory.
SciGui
  SELECT_INVENTORY : String = "select_item"
[static] Internal inventory display action for the button select.
SciGui
Property detail
displayproperty
display:DisplayObject  [read-only]

Returns the display object of the gui.

Implementation
    public function get display():DisplayObject
enabledproperty 
enabled:Boolean  [read-write]Implementation
    public function get enabled():Boolean
    public function set enabled(value:Boolean):void
mouseCursorproperty 
mouseCursor:DisplayObject  [read-only]Implementation
    public function get mouseCursor():DisplayObject
Constructor detail
SciGui()constructor
public function SciGui(pGuiSettings:XML = null)

Constructor.

Parameters
pGuiSettings:XML (default = null)
Method detail
CreateButton()method
protected function CreateButton(pAction:String):WakSimpleButtonParameters
pAction:String

Returns
WakSimpleButton
CreateButtons()method 
protected function CreateButtons(pActionsArr:Array, pButtonsArr:Array):voidParameters
pActionsArr:Array
 
pButtonsArr:Array
CreateCustomButton()method 
protected function CreateCustomButton(pButtonXml:XML, pSaveArray:Array, pUseHorizontal:Boolean):voidParameters
pButtonXml:XML
 
pSaveArray:Array
 
pUseHorizontal:Boolean
CreateDefaultMouseIcons()method 
protected function CreateDefaultMouseIcons(pIconsArr:Array, pActionsArr:Array, pCursorLayer:DisplayObjectContainer):voidParameters
pIconsArr:Array
 
pActionsArr:Array
 
pCursorLayer:DisplayObjectContainer
CreateScrollCustomButton()method 
protected function CreateScrollCustomButton(pButtonXml:XMLList):WakSimpleButtonParameters
pButtonXml:XMLList

Returns
WakSimpleButton
DrawActionIcon()method 
public static function DrawActionIcon(pBtn:Sprite, pAction:String):voidParameters
pBtn:Sprite
 
pAction:String
DrawDefaultButtonBg()method 
protected function DrawDefaultButtonBg(pBtn:Sprite, pW:Number, pH:Number, pColor:uint):voidParameters
pBtn:Sprite
 
pW:Number
 
pH:Number
 
pColor:uint
HideInventory()method 
public function HideInventory():void

Hide the player's inventory.

LoadSettings()method 
protected function LoadSettings(pSettings:XML):voidParameters
pSettings:XML
OnActionSelected()method 
protected function OnActionSelected(event:Event):voidParameters
event:Event
OnAddedToStage()method 
protected function OnAddedToStage(event:Event):void

Listener for the event ADDED_TO_STAGE.

Parameters
event:Event
OnButtonPanelMouseOut()method 
protected function OnButtonPanelMouseOut(event:MouseEvent):voidParameters
event:MouseEvent
OnInventoryActionSelected()method 
protected function OnInventoryActionSelected(event:GuiEvent):voidParameters
event:GuiEvent
OnInventoryItemSelected()method 
protected function OnInventoryItemSelected(event:GuiEvent):voidParameters
event:GuiEvent
OnInventoryOk()method 
protected function OnInventoryOk(event:Event):voidParameters
event:Event
OnMouseMove()method 
protected function OnMouseMove(event:MouseEvent):void

Listener for the event MOUSE_MOVE.

Parameters
event:MouseEvent
OnRemovedToStage()method 
protected function OnRemovedToStage(event:Event):void

Listener for the event REMOVED_FROM_STAGE.

Parameters
event:Event
OnUseInventoryItem()method 
protected function OnUseInventoryItem(event:GuiEvent):voidParameters
event:GuiEvent
RemoveInventoryDisplayListeners()method 
protected function RemoveInventoryDisplayListeners(pInvDisplay:SciInventoryDisplay):voidParameters
pInvDisplay:SciInventoryDisplay
RemoveMouseCursor()method 
public function RemoveMouseCursor(pCursorLayer:Sprite):void

Remove the mouse cursor to the cursor Layer.

Parameters
pCursorLayer:Sprite — the cursor layer sprite
SetActionSelected()method 
protected function SetActionSelected(pButtonName:String, pSetMouse:Boolean = true):voidParameters
pButtonName:String
 
pSetMouse:Boolean (default = true)
SetInventoryDisplayListeners()method 
protected function SetInventoryDisplayListeners(pInvDisplay:SciInventoryDisplay):voidParameters
pInvDisplay:SciInventoryDisplay
SetMouseCursor()method 
public function SetMouseCursor(pCursorLayer:Sprite):void

Add the mouse cursor to the cursor Layer.

Parameters
pCursorLayer:Sprite — the cursor layer sprite
SetMouseIconAction()method 
public function SetMouseIconAction(pActionId:String):void

Set the mouse icon to certain action.

Parameters
pActionId:String — action id.
ShowingInventory()method 
public function ShowingInventory():Boolean

Returns
Boolean — true . If the gui is displaying the inventory.
ShowInventory()method 
public function ShowInventory():void

Shows the player's inventory.

Event detail
ACTION_SELECTEDevent 
Event object type: org.wak.gui.events.GuiEvent

Dispatched when an action button is clicked

INVENTORY_ITEM_SELECTEDevent  
Event object type: org.wak.gui.events.GuiEvent

Dispatched when an inventory item button is selected in the inventory window.

Constant detail
CLOSE_INVENTORYconstant
public static const CLOSE_INVENTORY:String = "close_inventory"

Internal action for the button close inventory.

OPEN_INVENTORYconstant 
public static const OPEN_INVENTORY:String = "open_inventory"

Internal action for the button open inventory.

SELECT_INVENTORYconstant 
public static const SELECT_INVENTORY:String = "select_item"

Internal inventory display action for the button select.