Packageorg.wak.gui.modern
Classpublic class ModernGui
InheritanceModernGui Inheritance flash.display.Sprite
ImplementsIAdventureGui

Modern Gui class. For the modern adventure style.



Public Properties
 PropertyDefined by
  CharMouseCursor : String = "char_cursor"
[static]
ModernGui
  currentMouseCursorId : String
[read-only]
ModernGui
  display : DisplayObject
[read-only] Returns the display object of the gui.
ModernGui
  enabled : Boolean
ModernGui
  ExitMouseCursor : String = "exit_cursor"
[static]
ModernGui
  GrabingItemMouseCursor : String = "grabitem_cursor"
[static]
ModernGui
  ItemMouseCursor : String = "item_cursor"
[static]
ModernGui
  mouseCursor : DisplayObject
[read-only] The custom mouse pointer container.
ModernGui
  mouseInfoDescription : Boolean
[read-only]
ModernGui
  NormalMouseCursor : String = "normal_cursor"
[static]
ModernGui
  prevMouseCursorId : String
[read-only]
ModernGui
Protected Properties
 PropertyDefined by
  mCharOverMouseCursor : Sprite = null
ModernGui
  mCurrentMouseCursorId : String = ""
ModernGui
  mDefaultMouseCursor : Sprite = null
ModernGui
  mEnabled : Boolean = true
ModernGui
  mGatespotOverMouseCursor : Sprite = null
ModernGui
  mInfoBox : MouseInfoBox = null
ModernGui
  mInfoBoxBackgroundId : String = ""
ModernGui
  mInfoBoxDescriptionEnabled : Boolean = false
ModernGui
  mInfoBoxEnabled : Boolean = false
ModernGui
  mInfoBoxFlatBgColor : uint = 0x000000
ModernGui
  mInfoBoxFlatBorderColor : uint = 0x000000
ModernGui
  mInfoBoxFont : String = ""
ModernGui
  mInfoBoxFontBold : Boolean = false
ModernGui
  mInfoBoxFontColor : uint = 0xFFFFFF
ModernGui
  mInfoBoxFontSize : int = 14
ModernGui
  mInfoBoxFontUseEmbed : Boolean = false
ModernGui
  mInfoBoxLeading : int = 0
ModernGui
  mInfoBoxOutlineEnabled : Boolean = true
ModernGui
  mInfoBoxWidth : Number = 0
ModernGui
  mInventory : ModernInventoryDisplay = null
ModernGui
  mInventoryArrowLeft : WakSimpleButton = null
ModernGui
  mInventoryArrowRight : WakSimpleButton = null
ModernGui
  mInventoryBg : DisplayObject = null
ModernGui
  mInventoryColumns : int = 4
ModernGui
  mInventoryItemH : Number = 50
ModernGui
  mInventoryItemSpace : Number = 10
ModernGui
  mInventoryItemsY : Number = 1
ModernGui
  mInventoryItemW : Number = 50
ModernGui
  mInventoryX : Number = 0
ModernGui
  mInventoryY : Number = 300
ModernGui
  mItemOverMouseCursor : Sprite = null
ModernGui
  mItemVisualHelp : Shape = null
ModernGui
  mMouseCursor : Sprite = null
ModernGui
  mMouseCursorsArr : Array = null
ModernGui
  mMouseInfo : MouseInfoBox = null
ModernGui
  mMouseInfoBackgroundId : String = ""
ModernGui
  mMouseInfoDescriptionEnabled : Boolean = false
ModernGui
  mMouseInfoEnabled : Boolean = true
ModernGui
  mMouseInfoFlatBgColor : uint = 0x000000
ModernGui
  mMouseInfoFlatBorderColor : uint = 0x000000
ModernGui
  mMouseInfoFont : String = ""
ModernGui
  mMouseInfoFontBold : Boolean = false
ModernGui
  mMouseInfoFontColor : uint = 0xFFFFFF
ModernGui
  mMouseInfoFontSize : int = 14
ModernGui
  mMouseInfoFontUseEmbed : Boolean = false
ModernGui
  mMouseInfoOutlineEnabled : Boolean = true
ModernGui
  mMouseInfoWidth : Number = 0
ModernGui
  mPlayerChar : AdventureCharacter = null
ModernGui
  mPrevMouseCursorId : String = ""
ModernGui
  mResources : Class = null
ModernGui
Public Methods
 MethodDefined by
  
ModernGui(pGuiSettings:XML = null)
Constructor
ModernGui
  
ChangeMouseCursorTo(pCursorId:String):void
Change the current mouse cursor to other mouse cursor state.
ModernGui
  
GrabItem(pItem:DisplayObject):void
Change the mouse cursor to grab an item.
ModernGui
  
ReleaseItem():void
Release the previously grabbed items.
ModernGui
  
RemoveMouseCursor(pCursorLayer:Sprite):void
Remove the mouse cursor to the cursor Layer.
ModernGui
  
SetInfoBoxText(value:String):void
Set text into the gui info box.
ModernGui
  
SetMouseCursor(pCursorLayer:Sprite):void
Add the mouse cursor to the cursor Layer.
ModernGui
  
SetMouseInfoText(value:String):void
ModernGui
Protected Methods
 MethodDefined by
  
CreateDefaultCursor():DisplayObject
ModernGui
  
CreateDefaultItemCursor():DisplayObject
ModernGui
  
ModernGui
  
ModernGui
  
LoadInventorySettings(pSettings:XML):void
ModernGui
  
LoadMouseInfoSettings(pSettings:XML):void
ModernGui
  
LoadMouseOverChar(pSettings:XML):void
ModernGui
  
LoadMouseOverGatespot(pSettings:XML):void
ModernGui
  
LoadMouseOverItemCursor(pSettings:XML):void
ModernGui
  
LoadNormalCursor(pSettings:XML):void
ModernGui
  
LoadSettings(pSettings:XML):void
ModernGui
  
OnAddedToStage(event:Event):void
ModernGui
  
OnMouseMove(event:MouseEvent):void
ModernGui
  
OnRemovedFromStage(event:Event):void
ModernGui
  
ModernGui
  
ModernGui
Protected Constants
 ConstantDefined by
  kInventoryArrowLeft : String = "ScrollLeft"
ModernGui
  kInventoryArrowRight : String = "ScrollRight"
ModernGui
Property detail
CharMouseCursorproperty
public static var CharMouseCursor:String = "char_cursor"
currentMouseCursorIdproperty 
currentMouseCursorId:String  [read-only]Implementation
    public function get currentMouseCursorId():String
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
ExitMouseCursorproperty 
public static var ExitMouseCursor:String = "exit_cursor"
GrabingItemMouseCursorproperty 
public static var GrabingItemMouseCursor:String = "grabitem_cursor"
ItemMouseCursorproperty 
public static var ItemMouseCursor:String = "item_cursor"
mCharOverMouseCursorproperty 
protected var mCharOverMouseCursor:Sprite = null
mCurrentMouseCursorIdproperty 
protected var mCurrentMouseCursorId:String = ""
mDefaultMouseCursorproperty 
protected var mDefaultMouseCursor:Sprite = null
mEnabledproperty 
protected var mEnabled:Boolean = true
mGatespotOverMouseCursorproperty 
protected var mGatespotOverMouseCursor:Sprite = null
mInfoBoxproperty 
protected var mInfoBox:MouseInfoBox = null
mInfoBoxBackgroundIdproperty 
protected var mInfoBoxBackgroundId:String = ""
mInfoBoxDescriptionEnabledproperty 
protected var mInfoBoxDescriptionEnabled:Boolean = false
mInfoBoxEnabledproperty 
protected var mInfoBoxEnabled:Boolean = false
mInfoBoxFlatBgColorproperty 
protected var mInfoBoxFlatBgColor:uint = 0x000000
mInfoBoxFlatBorderColorproperty 
protected var mInfoBoxFlatBorderColor:uint = 0x000000
mInfoBoxFontproperty 
protected var mInfoBoxFont:String = ""
mInfoBoxFontBoldproperty 
protected var mInfoBoxFontBold:Boolean = false
mInfoBoxFontColorproperty 
protected var mInfoBoxFontColor:uint = 0xFFFFFF
mInfoBoxFontSizeproperty 
protected var mInfoBoxFontSize:int = 14
mInfoBoxFontUseEmbedproperty 
protected var mInfoBoxFontUseEmbed:Boolean = false
mInfoBoxLeadingproperty 
protected var mInfoBoxLeading:int = 0
mInfoBoxOutlineEnabledproperty 
protected var mInfoBoxOutlineEnabled:Boolean = true
mInfoBoxWidthproperty 
protected var mInfoBoxWidth:Number = 0
mInventoryproperty 
protected var mInventory:ModernInventoryDisplay = null
mInventoryArrowLeftproperty 
protected var mInventoryArrowLeft:WakSimpleButton = null
mInventoryArrowRightproperty 
protected var mInventoryArrowRight:WakSimpleButton = null
mInventoryBgproperty 
protected var mInventoryBg:DisplayObject = null
mInventoryColumnsproperty 
protected var mInventoryColumns:int = 4
mInventoryItemHproperty 
protected var mInventoryItemH:Number = 50
mInventoryItemSpaceproperty 
protected var mInventoryItemSpace:Number = 10
mInventoryItemsYproperty 
protected var mInventoryItemsY:Number = 1
mInventoryItemWproperty 
protected var mInventoryItemW:Number = 50
mInventoryXproperty 
protected var mInventoryX:Number = 0
mInventoryYproperty 
protected var mInventoryY:Number = 300
mItemOverMouseCursorproperty 
protected var mItemOverMouseCursor:Sprite = null
mItemVisualHelpproperty 
protected var mItemVisualHelp:Shape = null
mMouseCursorproperty 
protected var mMouseCursor:Sprite = null
mMouseCursorsArrproperty 
protected var mMouseCursorsArr:Array = null
mMouseInfoproperty 
protected var mMouseInfo:MouseInfoBox = null
mMouseInfoBackgroundIdproperty 
protected var mMouseInfoBackgroundId:String = ""
mMouseInfoDescriptionEnabledproperty 
protected var mMouseInfoDescriptionEnabled:Boolean = false
mMouseInfoEnabledproperty 
protected var mMouseInfoEnabled:Boolean = true
mMouseInfoFlatBgColorproperty 
protected var mMouseInfoFlatBgColor:uint = 0x000000
mMouseInfoFlatBorderColorproperty 
protected var mMouseInfoFlatBorderColor:uint = 0x000000
mMouseInfoFontproperty 
protected var mMouseInfoFont:String = ""
mMouseInfoFontBoldproperty 
protected var mMouseInfoFontBold:Boolean = false
mMouseInfoFontColorproperty 
protected var mMouseInfoFontColor:uint = 0xFFFFFF
mMouseInfoFontSizeproperty 
protected var mMouseInfoFontSize:int = 14
mMouseInfoFontUseEmbedproperty 
protected var mMouseInfoFontUseEmbed:Boolean = false
mMouseInfoOutlineEnabledproperty 
protected var mMouseInfoOutlineEnabled:Boolean = true
mMouseInfoWidthproperty 
protected var mMouseInfoWidth:Number = 0
mouseCursorproperty 
mouseCursor:DisplayObject  [read-only]

The custom mouse pointer container.

Implementation
    public function get mouseCursor():DisplayObject
mouseInfoDescriptionproperty 
mouseInfoDescription:Boolean  [read-only]

Implementation
    public function get mouseInfoDescription():Boolean
mPlayerCharproperty 
protected var mPlayerChar:AdventureCharacter = null
mPrevMouseCursorIdproperty 
protected var mPrevMouseCursorId:String = ""
mResourcesproperty 
protected var mResources:Class = null
NormalMouseCursorproperty 
public static var NormalMouseCursor:String = "normal_cursor"
prevMouseCursorIdproperty 
prevMouseCursorId:String  [read-only]Implementation
    public function get prevMouseCursorId():String
Constructor detail
ModernGui()constructor
public function ModernGui(pGuiSettings:XML = null)

Constructor

Parameters
pGuiSettings:XML (default = null) — XML Settings for the gui.
Method detail
ChangeMouseCursorTo()method
public function ChangeMouseCursorTo(pCursorId:String):void

Change the current mouse cursor to other mouse cursor state. Valid mouse cursors id are the ModernGui vars : ItemMouseCursor, CharMouseCursor, ExitMouseCursor , NormalMouseCursor .

Parameters
pCursorId:String — an MouseCursor id see ModernGui constants.

See also

CreateDefaultCursor()method 
protected function CreateDefaultCursor():DisplayObject

Returns
DisplayObject
CreateDefaultItemCursor()method 
protected function CreateDefaultItemCursor():DisplayObject

Returns
DisplayObject
CreateInventoryButton()method 
protected function CreateInventoryButton(pBtn:XML):WakSimpleButtonParameters
pBtn:XML

Returns
WakSimpleButton
CreateItemVisualHelp()method 
protected function CreateItemVisualHelp():Shape

Returns
Shape
GrabItem()method 
public function GrabItem(pItem:DisplayObject):void

Change the mouse cursor to grab an item.

Parameters
pItem:DisplayObject — Mouse icon DisplayObject.
LoadInventorySettings()method 
protected function LoadInventorySettings(pSettings:XML):voidParameters
pSettings:XML
LoadMouseInfoSettings()method 
protected function LoadMouseInfoSettings(pSettings:XML):voidParameters
pSettings:XML
LoadMouseOverChar()method 
protected function LoadMouseOverChar(pSettings:XML):voidParameters
pSettings:XML
LoadMouseOverGatespot()method 
protected function LoadMouseOverGatespot(pSettings:XML):voidParameters
pSettings:XML
LoadMouseOverItemCursor()method 
protected function LoadMouseOverItemCursor(pSettings:XML):voidParameters
pSettings:XML
LoadNormalCursor()method 
protected function LoadNormalCursor(pSettings:XML):voidParameters
pSettings:XML
LoadSettings()method 
protected function LoadSettings(pSettings:XML):voidParameters
pSettings:XML
OnAddedToStage()method 
protected function OnAddedToStage(event:Event):voidParameters
event:Event
OnMouseMove()method 
protected function OnMouseMove(event:MouseEvent):voidParameters
event:MouseEvent
OnRemovedFromStage()method 
protected function OnRemovedFromStage(event:Event):voidParameters
event:Event
ReleaseItem()method 
public function ReleaseItem():void

Release the previously grabbed items.

RemoveInventoryDisplayListeners()method 
protected function RemoveInventoryDisplayListeners(pInvDisplay:ModernInventoryDisplay):voidParameters
pInvDisplay:ModernInventoryDisplay
RemoveMouseCursor()method 
public function RemoveMouseCursor(pCursorLayer:Sprite):void

Remove the mouse cursor to the cursor Layer.

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

Set text into the gui info box.

Parameters
value:String — String with the text to set.
SetInventoryDisplayListeners()method 
protected function SetInventoryDisplayListeners(pInvDisplay:ModernInventoryDisplay):voidParameters
pInvDisplay:ModernInventoryDisplay
SetMouseCursor()method 
public function SetMouseCursor(pCursorLayer:Sprite):void

Add the mouse cursor to the cursor Layer.

Parameters
pCursorLayer:Sprite — the cursor layer sprite
SetMouseInfoText()method 
public function SetMouseInfoText(value:String):voidParameters
value:String
Constant detail
kInventoryArrowLeftconstant
protected const kInventoryArrowLeft:String = "ScrollLeft"
kInventoryArrowRightconstant 
protected const kInventoryArrowRight:String = "ScrollRight"