Packageorg.wak.dialog.scumm
Classpublic class ScummDialogController
InheritanceScummDialogController Inheritance flash.display.Sprite
ImplementsIDialogsController

Scumm dialogs controller. In the case of the dialogs to keep it simple. The view and controller for dialogs is merged in this class.



Public Properties
 PropertyDefined by
  display : DisplayObject
[read-only] the display object of the dialog controller.
ScummDialogController
Protected Properties
 PropertyDefined by
  mBackPanel : Shape = null
ScummDialogController
  mCurrentDialog : AdventureDialog = null
ScummDialogController
  mCurrentDialogMenu : DialogMenu = null
ScummDialogController
  mCurrentSayIterator : IIterator = null
ScummDialogController
  mDialogLayer : Sprite = null
ScummDialogController
  mDialogMngr : DialogManager = null
ScummDialogController
  mDialogsMenuArray : Array = null
ScummDialogController
  mGuiMngr : GuiManager = null
ScummDialogController
  mMask : Shape = null
ScummDialogController
  mMenuTextBold : Boolean = true
ScummDialogController
  mMenuTextColor : uint = 0xFFFFFF
ScummDialogController
  mMenuTextColorOver : uint = 0xFF00FF
ScummDialogController
  mMenuTextFont : String = "acknowtt"
ScummDialogController
  mMenuTextSize : Number = 13
ScummDialogController
  mMenuTextUseEmbedFont : Boolean = true
ScummDialogController
  mOnCharacterSayCompleted : Function = null
ScummDialogController
  mPanelColor : uint = 0x000000
ScummDialogController
  mPlayerCharId : String = ""
ScummDialogController
  mPlayingTopic : Topic = null
ScummDialogController
  mPreviousDialog : AdventureDialog = null
ScummDialogController
  mPreviousDialogMenu : DialogMenu = null
ScummDialogController
  mResourceManager : Class = null
ScummDialogController
  mSceneMngr : SceneManager = null
ScummDialogController
  mScrollDownBtn : WakSimpleButton = null
ScummDialogController
  mScrollUpBtn : WakSimpleButton = null
ScummDialogController
  mSpokenTextBold : Boolean = true
ScummDialogController
  mSpokenTextFont : String = "acknowtt"
ScummDialogController
  mSpokenTextSize : Number = 13
ScummDialogController
  mSpokenTextUseEmbedFont : Boolean = true
ScummDialogController
  mStageHeight : Number = 0
ScummDialogController
  mStageWidth : Number = 0
ScummDialogController
  mTextHeadDistance : int = 0
ScummDialogController
  mTextOptionHeight : int = 30
ScummDialogController
  mTextOptionWidth : int = 100
ScummDialogController
  mTextSpeedFactor : Number = 60
ScummDialogController
Public Methods
 MethodDefined by
  
ScummDialogController(pLayer:Sprite, pSettings:XML)
Constructor
ScummDialogController
  
ActivateOption(pTopicId:String):void
ScummDialogController
  
CharacterSay(pChar:AdventureCharacter, pTextToSay:String, pOnComplete:Function = null):void
Makes a character say something.
ScummDialogController
  
DisplayInfo(pText:String, pOnCompleteFunction:Function = null):void
Display an information message.
ScummDialogController
  
Initialize():void
Initialize the Dialog controller
ScummDialogController
  
PlayTopic(pTopic:Topic, pOnCompleteFunc:Function):void
Start to play a dialog topic.
ScummDialogController
  
SetOptionVisible(pDialogId:String, pTopicId:String, value:Boolean):void
ScummDialogController
  
Starts a scumm dialog
ScummDialogController
Protected Methods
 MethodDefined by
  
CreateDialogMenu(pDialogId:String):DialogMenu
ScummDialogController
  
LoadSettings(pSettings:XML):void
Load the settings of the dialogs using the parameters in pSettings
ScummDialogController
  
StopDialog():void
Force to stop any dialog playing.
ScummDialogController
Protected Constants
 ConstantDefined by
  kPanelHPercent : Number = 27.5
ScummDialogController
Property detail
displayproperty
display:DisplayObject  [read-only]

the display object of the dialog controller.

Implementation
    public function get display():DisplayObject
mBackPanelproperty 
protected var mBackPanel:Shape = null
mCurrentDialogproperty 
protected var mCurrentDialog:AdventureDialog = null
mCurrentDialogMenuproperty 
protected var mCurrentDialogMenu:DialogMenu = null
mCurrentSayIteratorproperty 
protected var mCurrentSayIterator:IIterator = null
mDialogLayerproperty 
protected var mDialogLayer:Sprite = null
mDialogMngrproperty 
protected var mDialogMngr:DialogManager = null
mDialogsMenuArrayproperty 
protected var mDialogsMenuArray:Array = null
mGuiMngrproperty 
protected var mGuiMngr:GuiManager = null
mMaskproperty 
protected var mMask:Shape = null
mMenuTextBoldproperty 
protected var mMenuTextBold:Boolean = true
mMenuTextColorproperty 
protected var mMenuTextColor:uint = 0xFFFFFF
mMenuTextColorOverproperty 
protected var mMenuTextColorOver:uint = 0xFF00FF
mMenuTextFontproperty 
protected var mMenuTextFont:String = "acknowtt"
mMenuTextSizeproperty 
protected var mMenuTextSize:Number = 13
mMenuTextUseEmbedFontproperty 
protected var mMenuTextUseEmbedFont:Boolean = true
mOnCharacterSayCompletedproperty 
protected var mOnCharacterSayCompleted:Function = null
mPanelColorproperty 
protected var mPanelColor:uint = 0x000000
mPlayerCharIdproperty 
protected var mPlayerCharId:String = ""
mPlayingTopicproperty 
protected var mPlayingTopic:Topic = null
mPreviousDialogproperty 
protected var mPreviousDialog:AdventureDialog = null
mPreviousDialogMenuproperty 
protected var mPreviousDialogMenu:DialogMenu = null
mResourceManagerproperty 
protected var mResourceManager:Class = null
mSceneMngrproperty 
protected var mSceneMngr:SceneManager = null
mScrollDownBtnproperty 
protected var mScrollDownBtn:WakSimpleButton = null
mScrollUpBtnproperty 
protected var mScrollUpBtn:WakSimpleButton = null
mSpokenTextBoldproperty 
protected var mSpokenTextBold:Boolean = true
mSpokenTextFontproperty 
protected var mSpokenTextFont:String = "acknowtt"
mSpokenTextSizeproperty 
protected var mSpokenTextSize:Number = 13
mSpokenTextUseEmbedFontproperty 
protected var mSpokenTextUseEmbedFont:Boolean = true
mStageHeightproperty 
protected var mStageHeight:Number = 0
mStageWidthproperty 
protected var mStageWidth:Number = 0
mTextHeadDistanceproperty 
protected var mTextHeadDistance:int = 0
mTextOptionHeightproperty 
protected var mTextOptionHeight:int = 30
mTextOptionWidthproperty 
protected var mTextOptionWidth:int = 100
mTextSpeedFactorproperty 
protected var mTextSpeedFactor:Number = 60
Constructor detail
ScummDialogController()constructor
public function ScummDialogController(pLayer:Sprite, pSettings:XML)

Constructor

Parameters
pLayer:Sprite — Sprite of the dialog layers of the adventure.
 
pSettings:XML — XML with the settings for the dialogs.
Method detail
ActivateOption()method
public function ActivateOption(pTopicId:String):void

Parameters
pTopicId:String
CharacterSay()method 
public function CharacterSay(pChar:AdventureCharacter, pTextToSay:String, pOnComplete:Function = null):void

Makes a character say something.

Parameters
pChar:AdventureCharacter — The speaker character.
 
pTextToSay:String — The text that the character will way.
 
pOnComplete:Function (default = null) — Callback function called when the character finished to talk.
CreateDialogMenu()method 
protected function CreateDialogMenu(pDialogId:String):DialogMenuParameters
pDialogId:String

Returns
DialogMenu
DisplayInfo()method 
public function DisplayInfo(pText:String, pOnCompleteFunction:Function = null):void

Display an information message.

Parameters
pText:String — message to display
 
pOnCompleteFunction:Function (default = null) — callback function to be called after the message was displayed.
Initialize()method 
public function Initialize():void

Initialize the Dialog controller

LoadSettings()method 
protected function LoadSettings(pSettings:XML):void

Load the settings of the dialogs using the parameters in pSettings

Parameters
pSettings:XML — XML with the settings.
PlayTopic()method 
public function PlayTopic(pTopic:Topic, pOnCompleteFunc:Function):void

Start to play a dialog topic.

Parameters
pTopic:Topic — the topic to play
 
pOnCompleteFunc:Function — callaback function called when the topic finish.
SetOptionVisible()method 
public function SetOptionVisible(pDialogId:String, pTopicId:String, value:Boolean):voidParameters
pDialogId:String
 
pTopicId:String
 
value:Boolean
StartDialog()method 
public function StartDialog(pDialog:AdventureDialog):void

Starts a scumm dialog

Parameters
pDialog:AdventureDialog — AdventureDialog to start.
StopDialog()method 
protected function StopDialog():void

Force to stop any dialog playing.

Constant detail
kPanelHPercentconstant
protected const kPanelHPercent:Number = 27.5