STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229595
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2595 · P5190

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/23348731?noj=FRM23348731-22DC" width="1" height="1"></div>

quest_journal.swf

This is the info page for
Flash #245463

(Click the ID number above for more basic data on this flash file.)


ActionScript [AS1/AS2]
Combined Code
movieClip 120 { } movieClip 124 MappedButton { #initclip Object.registerClass('MappedButton', skyui.components.MappedButton); #endinitclip frame 10 { stop(); } frame 20 { stop(); } frame 30 { stop(); } frame 40 { stop(); } } movieClip 128 DialogButton { #initclip Object.registerClass('DialogButton', skyui.components.MappedButton); #endinitclip frame 10 { stop(); } frame 20 { stop(); } frame 30 { stop(); } frame 40 { stop(); } } movieClip 130 { } movieClip 133 { frame 1 { stop(); } frame 2 { stop(); } } movieClip 135 { } movieClip 136 { frame 1 { stop(); } frame 2 { stop(); } } movieClip 138 { } movieClip 139 QuestTitleList { #initclip Object.registerClass('QuestTitleList', QuestCenteredList); #endinitclip } movieClip 153 ObjectiveListItem { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } frame 4 { stop(); } frame 5 { stop(); } frame 6 { stop(); } frame 7 { stop(); } frame 8 { stop(); } frame 9 { stop(); } } movieClip 155 ScrollBar_track { #initclip Object.registerClass('ScrollBar_track', gfx.controls.Button); #endinitclip frame 10 { stop(); } frame 20 { stop(); } frame 30 { stop(); } frame 40 { stop(); } } movieClip 157 ScrollBar_thumb { #initclip Object.registerClass('ScrollBar_thumb', gfx.controls.Button); #endinitclip frame 10 { stop(); } frame 20 { stop(); } frame 30 { stop(); } frame 40 { stop(); } } movieClip 159 ScrollIndicator_upArrow { #initclip Object.registerClass('ScrollIndicator_upArrow', gfx.controls.Button); #endinitclip frame 10 { stop(); } frame 20 { stop(); } frame 30 { stop(); } frame 40 { stop(); } } movieClip 160 ScrollIndicator_downArrow { #initclip Object.registerClass('ScrollIndicator_downArrow', gfx.controls.Button); #endinitclip frame 10 { stop(); } frame 20 { stop(); } frame 30 { stop(); } frame 40 { stop(); } } movieClip 161 ScrollBar { #initclip Object.registerClass('ScrollBar', gfx.controls.ScrollBar); #endinitclip } movieClip 162 ObjectiveScrollingList { #initclip Object.registerClass('ObjectiveScrollingList', ObjectiveScrollingList); #endinitclip } movieClip 166 { frame 1 { stop(); } frame 2 { stop(); } } movieClip 169 { } movieClip 182 { } movieClip 184 { frame 1 { this.List_mc.listAnimating = false; stop(); } instance List_mc of movieClip 139 QuestTitleList { onClipEvent (construct) { numTopHalfEntries = 8; textOption = 'Shrink To Fit'; } } frame 2 { this.List_mc.listAnimating = true; } frame 5 { this.List_mc.listAnimating = false; stop(); } frame 6 { this.List_mc.listAnimating = true; } frame 10 { this.List_mc.listAnimating = false; stop(); } } movieClip 185 QuestsPage { #initclip Object.registerClass('QuestsPage', QuestsPage); #endinitclip instance objectiveList of movieClip 162 ObjectiveScrollingList { onClipEvent (construct) { textOption = 'Multi-Line'; } } } movieClip 188 { } movieClip 189 StatsList { #initclip Object.registerClass('StatsList', StatsList); #endinitclip } movieClip 191 { } movieClip 193 { } movieClip 194 StatsCategoryList { #initclip Object.registerClass('StatsCategoryList', Shared.CenteredScrollingList); #endinitclip } movieClip 195 { frame 1 { this.List_mc.listAnimating = false; stop(); } instance List_mc of movieClip 194 StatsCategoryList { onClipEvent (construct) { numTopHalfEntries = 5; textOption = 'Shrink To Fit'; } } frame 2 { this.List_mc.listAnimating = true; } frame 5 { this.List_mc.listAnimating = false; stop(); } frame 6 { this.List_mc.listAnimating = true; } frame 10 { this.List_mc.listAnimating = false; stop(); } } movieClip 196 StatsPage { #initclip Object.registerClass('StatsPage', StatsPage); #endinitclip instance StatsList_mc of movieClip 189 StatsList { onClipEvent (construct) { textOption = 'Shrink To Fit'; } } } movieClip 199 ScrollableText { #initclip Object.registerClass('ScrollableText', gfx.controls.TextArea); #endinitclip frame 10 { stop(); } frame 20 { stop(); } frame 30 { stop(); } } movieClip 201 { } movieClip 202 ButtonArtHolder { #initclip Object.registerClass('ButtonArtHolder', Shared.ButtonTextArtHolder); #endinitclip } // unknown tag 88 length 282 movieClip 206 { frame 1 { stop(); } frame 2 { stop(); } } movieClip 207 HelpList { #initclip Object.registerClass('HelpList', Shared.BSScrollingList); #endinitclip } movieClip 212 { frame 1 { stop(); } frame 2 { stop(); } } movieClip 213 JournalSaveLoadList { #initclip Object.registerClass('JournalSaveLoadList', JournalSaveLoadList); #endinitclip } movieClip 214 { } movieClip 218 { } movieClip 219 SaveLoadPanel { #initclip Object.registerClass('SaveLoadPanel', SaveLoadPanel); #endinitclip frame 1 { stop(); } instance List_mc of movieClip 213 JournalSaveLoadList { onClipEvent (construct) { textOption = 'Shrink To Fit'; } } frame 10 { this._parent.currentState = SystemPage.SAVE_LOAD_STATE; stop(); } frame 20 { this._parent.currentState = SystemPage.MAIN_STATE; stop(); } } movieClip 222 { frame 1 { stop(); } frame 2 { stop(); } } movieClip 223 PCQuitList { #initclip Object.registerClass('PCQuitList', Shared.BSScrollingList); #endinitclip } movieClip 225 { } movieClip 227 InputMappingArt { #initclip Object.registerClass('InputMappingArt', InputMappingArt); #endinitclip } movieClip 229 { } movieClip 231 { } movieClip 232 InputMappingList { #initclip Object.registerClass('InputMappingList', InputMappingList); #endinitclip } movieClip 234 scrollBarOption_thumb { #initclip Object.registerClass('scrollBarOption_thumb', gfx.controls.Button); #endinitclip frame 10 { stop(); } frame 20 { stop(); } frame 30 { stop(); } frame 40 { stop(); } } movieClip 235 scrollBarOption { #initclip Object.registerClass('scrollBarOption', gfx.controls.ScrollBar); #endinitclip } movieClip 237 OptionStepperArrowBtn { #initclip Object.registerClass('OptionStepperArrowBtn', gfx.controls.Button); #endinitclip frame 10 { stop(); } frame 20 { stop(); } frame 30 { stop(); } frame 40 { stop(); } } movieClip 240 SettingsOptionStepper { #initclip Object.registerClass('SettingsOptionStepper', gfx.controls.OptionStepper); #endinitclip frame 10 { stop(); } frame 20 { stop(); } frame 30 { stop(); } } movieClip 243 { } movieClip 245 { } movieClip 246 { frame 1 { stop(); } frame 2 { stop(); } } movieClip 247 SettingsOptionItem { #initclip Object.registerClass('SettingsOptionItem', SettingsOptionItem); #endinitclip instance optionStepper of movieClip 240 SettingsOptionStepper { onClipEvent (construct) { disabled = false; enableInitCallback = true; soundMap = []; soundMap[0] = 'change'; visible = true; } } instance scrollBar of movieClip 235 scrollBarOption { onClipEvent (construct) { trackMode = 'scrollToCursor'; } } } movieClip 248 OptionsList { #initclip Object.registerClass('OptionsList', OptionsList); #endinitclip } movieClip 251 { frame 1 { stop(); } frame 2 { stop(); } } movieClip 252 SettingsCategoryList { #initclip Object.registerClass('SettingsCategoryList', Shared.BSScrollingList); #endinitclip } movieClip 254 { } movieClip 256 { } movieClip 257 SystemCategoriesList { #initclip Object.registerClass('SystemCategoriesList', Shared.CenteredScrollingList); #endinitclip } movieClip 258 { frame 1 { this.List_mc.listAnimating = false; stop(); } instance List_mc of movieClip 257 SystemCategoriesList { onClipEvent (construct) { numTopHalfEntries = 6; textOption = 'Shrink To Fit'; } } frame 2 { this.List_mc.listAnimating = true; } frame 5 { this.List_mc.listAnimating = false; stop(); } frame 6 { this.List_mc.listAnimating = true; } frame 10 { this.List_mc.listAnimating = false; stop(); } } movieClip 261 { } movieClip 262 ButtonPanel { #initclip Object.registerClass('ButtonPanel', skyui.components.ButtonPanel); #endinitclip } movieClip 263 { frame 1 { stop(); } instance buttonPanel of movieClip 262 ButtonPanel { onClipEvent (construct) { buttonRenderer = 'DialogButton'; maxButtons = 2; buttonInitializer = {}; buttonInitializer.disableConstraints = false; buttonInitializer.disabled = false; buttonInitializer.disableFocus = true; buttonInitializer.hiddenBackground = true; spacing = 40; } } frame 10 { this._parent.currentState = this.confirmType; stop(); } frame 20 { this._parent.currentState = this.returnState; stop(); } } movieClip 264 { frame 1 { stop(); } instance List_mc of movieClip 252 SettingsCategoryList { onClipEvent (construct) { textOption = 'None'; } } frame 10 { this._parent.currentState = SystemPage.SETTINGS_CATEGORY_STATE; stop(); } frame 20 { if (this.bCloseToMainState != false) { this._parent.currentState = SystemPage.MAIN_STATE; } stop(); } } movieClip 265 { instance List_mc of movieClip 248 OptionsList { onClipEvent (construct) { textOption = 'Shrink To Fit'; } } } movieClip 266 { frame 1 { stop(); } frame 10 { this._parent.currentState = SystemPage.OPTIONS_LISTS_STATE; stop(); } frame 20 { this._parent.currentState = SystemPage.SETTINGS_CATEGORY_STATE; stop(); } } movieClip 267 { frame 1 { stop(); } instance List_mc of movieClip 232 InputMappingList { onClipEvent (construct) { textOption = 'None'; } } frame 10 { this._parent.currentState = SystemPage.INPUT_MAPPING_STATE; stop(); } frame 20 { this._parent.currentState = SystemPage.MAIN_STATE; stop(); } } movieClip 268 { frame 1 { stop(); } instance List_mc of movieClip 223 PCQuitList { onClipEvent (construct) { textOption = 'None'; } } frame 10 { this._parent.currentState = SystemPage.PC_QUIT_LIST_STATE; stop(); } frame 20 { this._parent.currentState = SystemPage.MAIN_STATE; stop(); } } movieClip 270 { frame 1 { stop(); } instance List_mc of movieClip 207 HelpList { onClipEvent (construct) { textOption = 'Shrink To Fit'; } } frame 10 { this._parent.currentState = SystemPage.HELP_LIST_STATE; stop(); } frame 20 { if (this.bCloseToMainState != false) { this._parent.currentState = SystemPage.MAIN_STATE; } stop(); } } movieClip 273 { instance HelpText of movieClip 199 ScrollableText { onClipEvent (construct) { actAsButton = false; defaultText = ''; disabled = false; editable = false; enableInitCallback = true; maxChars = 0; inspectableScrollBar = 'scrollbar'; scrollPolicy = 'auto'; soundMap = []; soundMap[0] = 'scroll'; textID = ''; visible = true; } } } movieClip 274 { frame 1 { stop(); } frame 10 { this._parent.currentState = SystemPage.HELP_TEXT_STATE; stop(); } frame 20 { this._parent.currentState = SystemPage.HELP_LIST_STATE; stop(); } } movieClip 275 SystemPage { #initclip Object.registerClass('SystemPage', SystemPage); #endinitclip } movieClip 279 { } movieClip 281 JournalTab { #initclip Object.registerClass('JournalTab', gfx.controls.RadioButton); #endinitclip frame 10 { stop(); } frame 20 { stop(); } frame 30 { stop(); } frame 40 { stop(); } frame 50 { stop(); } frame 60 { stop(); } frame 70 { stop(); } frame 80 { stop(); } frame 90 { stop(); } } movieClip 286 { } movieClip 288 { } movieClip 290 { } movieClip 292 { } movieClip 293 { frame 1 { stop(); } } movieClip 296 { } movieClip 297 JournalBottomBar { #initclip Object.registerClass('JournalBottomBar', JournalBottomBar); #endinitclip instance buttonPanel of movieClip 262 ButtonPanel { onClipEvent (construct) { buttonRenderer = 'MappedButton'; maxButtons = 3; buttonInitializer = {}; buttonInitializer.disableConstraints = true; buttonInitializer.disabled = true; buttonInitializer.disableFocus = true; buttonInitializer.hiddenBackground = true; spacing = 10; } } } movieClip 299 { } movieClip 300 { frame 1 { stop(); } frame 10 { stop(); } } movieClip 301 { frame 1 { stop(); } frame 10 { stop(); } } movieClip 302 { frame 1 { stop(); } frame 10 { stop(); } } movieClip 303 QuestJournalBase { #initclip Object.registerClass('QuestJournalBase', Quest_Journal); #endinitclip instance QuestsTab of movieClip 281 JournalTab { onClipEvent (construct) { autoSize = 'none'; data = 'showQuestsPage'; disableConstraints = false; disabled = false; enableInitCallback = true; inspectableGroupName = 'tabGroup'; labelID = '$QUESTS'; selected = false; soundMap = []; soundMap[0] = 'click'; visible = true; } } instance StatsTab of movieClip 281 JournalTab { onClipEvent (construct) { autoSize = 'none'; data = 'showStatsPage'; disableConstraints = false; disabled = false; enableInitCallback = true; inspectableGroupName = 'tabGroup'; labelID = '$GENERAL STATS'; selected = false; soundMap = []; soundMap[0] = 'click'; visible = true; } } instance SystemTab of movieClip 281 JournalTab { onClipEvent (construct) { autoSize = 'none'; data = 'showSystemPage'; disableConstraints = false; disabled = false; enableInitCallback = true; inspectableGroupName = 'tabGroup'; labelID = '$SYSTEM'; selected = false; soundMap = []; soundMap[0] = 'click'; visible = true; } } } frame 1 { function InitExtensions() { QuestJournalFader.Menu_mc.InitExtensions(); } function SetPlatform(aiPlatform, abPS3Switch) { QuestJournalFader.Menu_mc.SetPlatform(aiPlatform, abPS3Switch); } _global.gfxExtensions = true; Shared.GlobalFunc.MaintainTextFormat(); } movieClip 305 { frame 1 { stop(); } frame 10 { stop(); } frame 20 { stop(); } } movieClip 306 __Packages.gfx.core.UIComponent { #initclip if (!_global.gfx) { _global.gfx = new Object(); } if (!_global.gfx.core) { _global.gfx.core = new Object(); } if (!_global.gfx.core.UIComponent) { var v1 = function () { super(); gfx.events.EventDispatcher.initialize(this); }; gfx.core.UIComponent = v1; gfx.core.UIComponent extends MovieClip; var v2 = v1.prototype; v2.onLoad = function () { this.onLoadImpl(); }; v2.onLoadImpl = function () { if (this.initialized) { return undefined; } if (isNaN(this.__width)) { this.__width = this._width; } if (isNaN(this.__height)) { this.__height = this._height; } this.initialized = true; this.configUI(); this.validateNow(); if (this.enableInitCallback && _global.CLIK_loadCallback) { _global.CLIK_loadCallback(this._name, targetPath(this), this); } if (this._focused != 0 && Selection.getFocusBitmask(this) == 0) { var v4 = 0; for (;;) { if (v4 >= Selection.numFocusGroups) { return undefined; } var v6 = (this._focused >> v4 & 1) != 0; if (v6) { var v5 = Selection.getControllerMaskByFocusGroup(v4); var v3 = 0; while (v3 < System.capabilities.numControllers) { if (v5 >> v3 & true) { (gfx.managers.FocusHandler.__get__instance()).onSetFocus(null, this, v3); } ++v3; } } ++v4; } } }; v2.onUnload = function () { if (this.enableInitCallback && _global.CLIK_unloadCallback) { _global.CLIK_unloadCallback(this._name, targetPath(this), this); } }; v2.__get__disabled = function () { return this._disabled; }; v2.__set__disabled = function (value) { this._disabled = value; super.enabled = !value; this.useHandCursor = !value; this.invalidate(); return this.__get__disabled(); }; v2.__get__visible = function () { return this._visible; }; v2.__set__visible = function (value) { if (this._visible != value) { this._visible = value; if (this.initialized) { var v3 = value ? 'show' : 'hide'; this.dispatchEvent({'type': v3}); return undefined; } } return this.__get__visible(); }; v2.__get__width = function () { return this.__width; }; v2.__set__width = function (value) { this.setSize(value, this.__height || this._height); return this.__get__width(); }; v2.__get__height = function () { return this.__height; }; v2.__set__height = function (value) { this.setSize(this.__width || this._width, value); return this.__get__height(); }; v2.setSize = function (width, height) { if (this.__width == width && this.__height == height) { return undefined; } this.__width = width; this.__height = height; this.sizeIsInvalid = true; this.invalidate(); }; v2.__get__focused = function () { return this._focused; }; v2.__set__focused = function (value) { if (value != this._focused) { this._focused = value; var v2 = 0; while (v2 < Selection.numFocusGroups) { var v3 = (this._focused >> v2 & 1) != 0; if (v3) { __reg5 = Selection.getControllerMaskByFocusGroup(v2); __reg2 = 0; while (__reg2 < System.capabilities.numControllers) { __reg4 = (__reg5 >> __reg2 & 1) != 0; if (__reg4 && Selection.getFocus(__reg2) != targetPath(this)) { Selection.setFocus(this, __reg2); } ++__reg2; } } else { var __reg5 = Selection.getControllerMaskByFocusGroup(v2); var __reg2 = 0; while (__reg2 < System.capabilities.numControllers) { var __reg4 = (__reg5 >> __reg2 & 1) != 0; if (__reg4 && Selection.getFocus(__reg2) == targetPath(this)) { Selection.setFocus(null, __reg2); } ++__reg2; } } ++v2; } this.changeFocus(); var v5 = value ? 'focusIn' : 'focusOut'; this.dispatchEventAndSound({'type': v5}); return undefined; } return this.__get__focused(); }; v2.__get__displayFocus = function () { return this._displayFocus; }; v2.__set__displayFocus = function (value) { if (value != this._displayFocus) { this._displayFocus = value; this.changeFocus(); return undefined; } return this.__get__displayFocus(); }; v2.handleInput = function (details, pathToFocus) { if (pathToFocus && pathToFocus.length > 0) { var v3 = pathToFocus[0]; if (v3.handleInput) { var v2 = v3.handleInput(details, pathToFocus.slice(1)); if (v2) { return v2; } } } return false; }; v2.invalidate = function () { if (this.invalidationIntervalID) { return undefined; } this.invalidationIntervalID = setInterval(this, 'validateNow', 1); }; v2.validateNow = function () { clearInterval(this.invalidationIntervalID); delete this.invalidationIntervalID; this.draw(); this.sizeIsInvalid = false; }; v2.toString = function () { return '[Scaleform UIComponent ' + this._name + ']'; }; v2.dispatchEventToGame = function (event) { flash.external.ExternalInterface.call('__handleEvent', this._name, event); }; v2.configUI = function () {}; v2.initSize = function () { var v2 = (this.__width == 0) ? this._width : this.__width; var v3 = (this.__height == 0) ? this._height : this.__height; this._yscale = 100; this._xscale = 100; this.setSize(v2, v3); }; v2.draw = function () {}; v2.changeFocus = function () {}; v2.onMouseWheel = function (delta, target) { if (this.__get__visible() && this.hitTest(_root._xmouse, _root._ymouse, true)) { var v3 = Mouse.getTopMostEntity(); for (;;) { if (!v3) { return undefined; } if (v3 == this) { this.scrollWheel(delta <= 0 ? -1 : 1); return undefined; } v3 = v3._parent; } } }; v2.scrollWheel = function (delta) {}; v2.dispatchEventAndSound = function (event) { this.dispatchEvent(event); this.dispatchSound(event); }; v2.dispatchSound = function (event) { var v3 = this.soundMap.theme; var v2 = this.soundMap[event.type]; if (v3 && v2) { this.playSound(v2, v3); } }; v2.playSound = function (soundEventName, soundTheme) { if (_global.gfxProcessSound) { if (soundTheme == undefined) { soundTheme = 'default'; } _global.gfxProcessSound(this, soundTheme, soundEventName); } }; v2.initialized = false; v2.enableInitCallback = true; v2.soundMap = {'theme': 'default', 'focusIn': 'focusIn', 'focusOut': 'focusOut'}; v2.__width = Number.NaN; v2.__height = Number.NaN; v2._disabled = false; v2._focused = 0; v2._displayFocus = false; v2.sizeIsInvalid = false; v2.addProperty('disabled', v2.__get__disabled, v2.__set__disabled); v2.addProperty('displayFocus', v2.__get__displayFocus, v2.__set__displayFocus); v2.addProperty('focused', v2.__get__focused, v2.__set__focused); v2.addProperty('height', v2.__get__height, v2.__set__height); v2.addProperty('visible', v2.__get__visible, v2.__set__visible); v2.addProperty('width', v2.__get__width, v2.__set__width); ASSetPropFlags(gfx.core.UIComponent.prototype, null, 1); } #endinitclip } movieClip 307 __Packages.gfx.events.EventDispatcher { #initclip if (!_global.gfx) { _global.gfx = new Object(); } if (!_global.gfx.events) { _global.gfx.events = new Object(); } if (!_global.gfx.events.EventDispatcher) { var v1 = function () {}; gfx.events.EventDispatcher = v1; var v2 = v1.prototype; v1.initialize = function (target) { if (gfx.events.EventDispatcher._instance == undefined) { gfx.events.EventDispatcher._instance = new gfx.events.EventDispatcher(); } target.dispatchEvent = gfx.events.EventDispatcher._instance.dispatchEvent; target.dispatchQueue = gfx.events.EventDispatcher._instance.dispatchQueue; target.hasEventListener = gfx.events.EventDispatcher._instance.hasEventListener; target.addEventListener = gfx.events.EventDispatcher._instance.addEventListener; target.removeEventListener = gfx.events.EventDispatcher._instance.removeEventListener; target.removeAllEventListeners = gfx.events.EventDispatcher._instance.removeAllEventListeners; target.cleanUpEvents = gfx.events.EventDispatcher._instance.cleanUpEvents; _global.ASSetPropFlags(target, 'dispatchQueue', 1); }; v1.indexOfListener = function (listeners, scope, callBack) { var v3 = listeners.length; var v2 = -1; while (++v2 < v3) { var v1 = listeners[v2]; if (v1.listenerObject == scope && v1.listenerFunction == callBack) { return v2; } } return -1; }; v2.addEventListener = function (event, scope, callBack) { if (this._listeners == undefined) { this._listeners = {}; _global.ASSetPropFlags(this, '_listeners', 1); } var v3 = this._listeners[event]; if (v3 == undefined) { v3 = []; this._listeners[event] = v3; } if (gfx.events.EventDispatcher.indexOfListener(v3, scope, callBack) == -1) { v3.push({'listenerObject': scope, 'listenerFunction': callBack}); } }; v2.removeEventListener = function (event, scope, callBack) { var v2 = this._listeners[event]; if (v2 != undefined) { var v3 = gfx.events.EventDispatcher.indexOfListener(v2, scope, callBack); if (v3 != -1) { v2.splice(v3, 1); } } }; v2.dispatchEvent = function (event) { if (event.type != 'all') { if (event.target == undefined) { event.target = this; } this.dispatchQueue(this, event); } }; v2.hasEventListener = function (event) { return this._listeners[event] != null && this._listeners[event].length > 0; }; v2.removeAllEventListeners = function (event) { if (event == undefined) { delete this._listeners; return undefined; } delete this._listeners[event]; }; v2.dispatchQueue = function (dispatch, event) { var v1 = dispatch._listeners[event.type]; if (v1 != undefined) { gfx.events.EventDispatcher.$dispatchEvent(dispatch, v1, event); } v1 = dispatch._listeners.all; if (v1 != undefined) { gfx.events.EventDispatcher.$dispatchEvent(dispatch, v1, event); } }; v1.$dispatchEvent = function (dispatch, listeners, event) { var v7 = listeners.length; var v4 = 0; for (;;) { if (v4 >= v7) { return undefined; } var v1 = listeners[v4].listenerObject; var v5 = typeof v1; var v2 = listeners[v4].listenerFunction; if (v2 == undefined) { v2 = event.type; } if (v5 == 'function') { if (v1[v2] == null) { v1.apply(dispatch, [event]); } else { v1[v2](event); } } else { if (v1.handleEvent != undefined && v2 == undefined) { v1.handleEvent(event); } else { v1[v2](event); } } ++v4; } }; v2.cleanUp = function () { this.cleanUpEvents(); }; v2.cleanUpEvents = function () { this.removeAllEventListeners(); }; ASSetPropFlags(gfx.events.EventDispatcher.prototype, null, 1); } #endinitclip } movieClip 308 __Packages.gfx.managers.FocusHandler { #initclip if (!_global.gfx) { _global.gfx = new Object(); } if (!_global.gfx.managers) { _global.gfx.managers = new Object(); } if (!_global.gfx.managers.FocusHandler) { var v1 = function () { Selection.addListener(this); _global.gfxExtensions = 1; Selection.alwaysEnableArrowKeys = true; Selection.disableFocusKeys = true; Selection.disableFocusAutoRelease = true; Selection.disableFocusRolloverEvent = true; _root._focusrect = false; this.currentFocusLookup = []; this.actualFocusLookup = []; }; gfx.managers.FocusHandler = v1; var v2 = v1.prototype; v1.__get__instance = function () { if (gfx.managers.FocusHandler._instance == null) { gfx.managers.FocusHandler._instance = new gfx.managers.FocusHandler(); } return gfx.managers.FocusHandler._instance; }; v2.initialize = function () { this.inited = true; this.inputDelegate = gfx.managers.InputDelegate.instance; this.inputDelegate.addEventListener('input', this, 'handleInput'); }; v2.getFocus = function (focusIdx) { return this.currentFocusLookup[focusIdx]; }; v2.setFocus = function (focus, focusIdx) { if (!this.inited) { this.initialize(); } while (focus.focusTarget != null) { focus = focus.focusTarget; } var v8 = this.actualFocusLookup[focusIdx]; var v5 = this.currentFocusLookup[focusIdx]; if (v5 != focus) { v5.focused &= ~(1 << focusIdx); v5 = focus; this.currentFocusLookup[focusIdx] = focus; v5.focused |= 1 << focusIdx; } if (v8 != v5 && !(v8 instanceof TextField)) { var v6 = Selection.getControllerMaskByFocusGroup(focusIdx); var v2 = 0; while (v2 < System.capabilities.numControllers) { var v4 = (v6 >> v2 & 1) != 0; if (v4) { Selection.setFocus(v5, v2); } ++v2; } } }; v2.handleInput = function (event) { var controllerIdx = event.details.controllerIdx; var focusIdx = Selection.getControllerFocusGroup(controllerIdx); var path = this.getPathToFocus(focusIdx); if (path.length == 0 || path[0].handleInput == null || path[0].handleInput(event.details, path.slice(1)) != true) { if (event.details.value != 'keyUp') { var nav = event.details.navEquivalent; if (nav != null) { var focusedElem = eval(Selection.getFocus(controllerIdx)); var actualFocus = this.actualFocusLookup[focusIdx]; if (actualFocus instanceof TextField && focusedElem == actualFocus && this.textFieldHandleInput(nav, controllerIdx)) { return undefined; } var dirH = nav == gfx.ui.NavigationCode.LEFT || nav == gfx.ui.NavigationCode.RIGHT; var dirV = nav == gfx.ui.NavigationCode.UP || nav == gfx.ui.NavigationCode.DOWN; var focusContext = focusedElem._parent; var focusMode = 'default'; if (dirH || dirV) { var focusProp = dirH ? 'focusModeHorizontal' : 'focusModeVertical'; while (focusContext) { focusMode = focusContext[focusProp]; if (focusMode && focusMode != 'default') { break; } focusContext = focusContext._parent; } } else { focusContext = null; } var newFocus = Selection.findFocus(nav, focusContext, focusMode == 'loop', null, false, controllerIdx); if (newFocus) { Selection.setFocus(newFocus, controllerIdx); } } } } }; v2.getPathToFocus = function (focusIdx) { var v5 = this.currentFocusLookup[focusIdx]; var v3 = v5; var v4 = [v3]; while (v3) { v3 = v3._parent; if (v3.handleInput != null) { v4.unshift(v3); } if (v3 == _root) { break; } } return v4; }; v2.onSetFocus = function (oldFocus, newFocus, controllerIdx) { if (oldFocus instanceof TextField && newFocus == null) { return undefined; } var v3 = Selection.getControllerFocusGroup(controllerIdx); var v6 = this.actualFocusLookup[v3]; if (v6 == newFocus) { var v5 = newFocus instanceof TextField ? newFocus._parent : newFocus; var v4 = v5.focused; if (v4 & 1 << v3 == 0) { v5.focused = v4 | 1 << v3; } } this.actualFocusLookup[v3] = newFocus; this.setFocus(newFocus, v3); }; v2.textFieldHandleInput = function (nav, controllerIdx) { var v2 = Selection.getCaretIndex(controllerIdx); var v4 = Selection.getControllerFocusGroup(controllerIdx); var v3 = this.actualFocusLookup[v4]; __reg0 = nav; if (__reg0 === gfx.ui.NavigationCode.UP) { if (!v3.multiline) { return false; } return v2 > 0; return false; } if (__reg0 === gfx.ui.NavigationCode.LEFT) { return v2 > 0; return false; } if (__reg0 === gfx.ui.NavigationCode.DOWN) { if (!v3.multiline) { return false; } return v2 < (TextField(v3)).length; return false; } if (__reg0 === gfx.ui.NavigationCode.RIGHT) { return v2 < (TextField(v3)).length; } return false; }; v1._instance = gfx.managers.FocusHandler.__get__instance(); v2.inited = false; v1.addProperty('instance', v1.__get__instance, function () {}); ASSetPropFlags(gfx.managers.FocusHandler.prototype, null, 1); } #endinitclip } movieClip 309 __Packages.gfx.managers.InputDelegate { #initclip if (!_global.gfx) { _global.gfx = new Object(); } if (!_global.gfx.managers) { _global.gfx.managers = new Object(); } if (!_global.gfx.managers.InputDelegate) { var v1 = function () { super(); Key.addListener(this); this._keyRepeatSuppressLookup = {}; this._keyRepeatStateLookup = {}; }; gfx.managers.InputDelegate = v1; gfx.managers.InputDelegate extends gfx.events.EventDispatcher; var v2 = v1.prototype; v1.__get__instance = function () { if (gfx.managers.InputDelegate._instance == null) { gfx.managers.InputDelegate._instance = new gfx.managers.InputDelegate(); } return gfx.managers.InputDelegate._instance; }; v2.enableControlFixup = function (a_bEnabled) { if (a_bEnabled) { this._acceptKeycode = skyui.util.GlobalFunctions.getMappedKey('Accept', skyui.defines.Input.CONTEXT_MENUMODE, this.isGamepad); } this._bEnableControlFixup = a_bEnabled; }; v2.setKeyRepeat = function (a_code, a_value, a_controllerIdx) { var v2 = this.getKeyRepeatSuppress(a_controllerIdx); v2[a_code] = !a_value; }; v2.readInput = function (type, code, scope, callBack) { return null; }; v2.onKeyDown = function (a_controllerIdx) { var v2 = Key.getCode(a_controllerIdx); var v4 = this.getKeyRepeatState(a_controllerIdx); if (!v4[v2]) { this.handleKeyPress('keyDown', v2, a_controllerIdx, skse.GetLastControl(true), skse.GetLastKeycode(true)); v4[v2] = true; } else { var v5 = this.getKeyRepeatSuppress(a_controllerIdx); if (!v5[v2]) { this.handleKeyPress('keyHold', v2, a_controllerIdx, skse.GetLastControl(true), skse.GetLastKeycode(true)); } } }; v2.onKeyUp = function (a_controllerIdx) { var v2 = Key.getCode(a_controllerIdx); var v4 = this.getKeyRepeatState(a_controllerIdx); v4[v2] = false; this.handleKeyPress('keyUp', v2, a_controllerIdx, skse.GetLastControl(false), skse.GetLastKeycode(false)); }; v2.handleKeyPress = function (a_type, a_code, a_controllerIdx, a_control, a_skseKeycode) { var v2 = this.inputToNav(a_code); if (v2 != null) { switch (v2) { if (v2 !== gfx.ui.NavigationCode.RIGHT) { } else { case gfx.ui.NavigationCode.UP: case gfx.ui.NavigationCode.DOWN: case gfx.ui.NavigationCode.LEFT: a_control = null; a_skseKeycode = null; } } } else { if (this._bEnableControlFixup) { if (a_skseKeycode == this._acceptKeycode) { v2 = gfx.ui.NavigationCode.ENTER; } } } var v4 = new gfx.ui.InputDetails('key', a_code, a_type, v2, a_controllerIdx, a_control, a_skseKeycode); this.dispatchEvent({'type': 'input', 'details': v4}); }; v2.getKeyRepeatState = function (a_controllerIdx) { var v2 = this._keyRepeatStateLookup[a_controllerIdx]; if (!v2) { v2 = new Object(); this._keyRepeatStateLookup[a_controllerIdx] = v2; } return v2; }; v2.getKeyRepeatSuppress = function (a_controllerIdx) { var v2 = this._keyRepeatSuppressLookup[a_controllerIdx]; if (!v2) { v2 = new Object(); this._keyRepeatSuppressLookup[a_controllerIdx] = v2; } return v2; }; v2.inputToNav = function (a_code) { switch (a_code) { return null; case 38: return gfx.ui.NavigationCode.UP; case 40: return gfx.ui.NavigationCode.DOWN; case 37: return gfx.ui.NavigationCode.LEFT; case 39: return gfx.ui.NavigationCode.RIGHT; case 13: return gfx.ui.NavigationCode.ENTER; case 8: return gfx.ui.NavigationCode.BACK; case 9: return Key.isDown(16) ? gfx.ui.NavigationCode.SHIFT_TAB : gfx.ui.NavigationCode.TAB; case 36: return gfx.ui.NavigationCode.HOME; case 35: return gfx.ui.NavigationCode.END; case 34: return gfx.ui.NavigationCode.PAGE_DOWN; case 33: return gfx.ui.NavigationCode.PAGE_UP; case 27: return gfx.ui.NavigationCode.ESCAPE; case 96: return gfx.ui.NavigationCode.GAMEPAD_A; case 97: return gfx.ui.NavigationCode.GAMEPAD_B; case 98: return gfx.ui.NavigationCode.GAMEPAD_X; case 99: return gfx.ui.NavigationCode.GAMEPAD_Y; case 100: return gfx.ui.NavigationCode.GAMEPAD_L1; case 101: return gfx.ui.NavigationCode.GAMEPAD_L2; case 102: return gfx.ui.NavigationCode.GAMEPAD_L3; case 103: return gfx.ui.NavigationCode.GAMEPAD_R1; case 104: return gfx.ui.NavigationCode.GAMEPAD_R2; case 105: return gfx.ui.NavigationCode.GAMEPAD_R3; case 106: return gfx.ui.NavigationCode.GAMEPAD_START; case 107: return gfx.ui.NavigationCode.GAMEPAD_BACK; } return null; }; v2._bEnableControlFixup = false; v2._acceptKeycode = -1; v2.isGamepad = false; v1.addProperty('instance', v1.__get__instance, function () {}); ASSetPropFlags(gfx.managers.InputDelegate.prototype, null, 1); } #endinitclip } movieClip 310 __Packages.skyui.util.GlobalFunctions { #initclip if (!_global.skyui) { _global.skyui = new Object(); } if (!_global.skyui.util) { _global.skyui.util = new Object(); } if (!_global.skyui.util.GlobalFunctions) { var v1 = function () {}; skyui.util.GlobalFunctions = v1; var v2 = v1.prototype; v1.extract = function (a_str, a_startChar, a_endChar) { return a_str.slice(a_str.indexOf(a_startChar) + 1, a_str.lastIndexOf(a_endChar)); }; v1.clean = function (a_str) { if (a_str.indexOf(';') > 0) { a_str = a_str.slice(0, a_str.indexOf(';')); } var v3 = 0; for (;;) { if (!(a_str.charAt(v3) == ' ' || a_str.charAt(v3) == '\t')) break; ++v3; } var v2 = a_str.length - 1; for (;;) { if (!(a_str.charAt(v2) == ' ' || a_str.charAt(v2) == '\t')) break; --v2; } return a_str.slice(v3, v2 + 1); }; v1.unescape = function (a_str) { a_str = (a_str.split('\\n')).join('\n'); a_str = (a_str.split('\\t')).join('\t'); return a_str; }; v1.addArrayFunctions = function () { if (skyui.util.GlobalFunctions._arrayExtended) { return undefined; } skyui.util.GlobalFunctions._arrayExtended = true; Array.prototype.indexOf = function (a_element) { var v2 = 0; while (v2 < this.length) { if (this[v2] == a_element) { return v2; } ++v2; } return undefined; }; Array.prototype.equals = function (a) { if (a == undefined) { return false; } if (this.length != a.length) { return false; } var v2 = 0; while (v2 < a.length) { if (a[v2] !== this[v2]) { return false; } ++v2; } return true; }; Array.prototype.contains = function (a_element) { var v2 = 0; while (v2 < this.length) { if (this[v2] == a_element) { return true; } ++v2; } return false; }; _global.ASSetPropFlags(Array.prototype, ['indexOf', 'equals', 'contains'], 1, 0); }; v1.mapUnicodeChar = function (a_charCode) { if (a_charCode == 8470) { return 185; return a_charCode; } if (1025 <= a_charCode && a_charCode <= 1169) { switch (a_charCode) { case 1025: return 168; case 1028: return 170; case 1029: return 189; case 1030: return 178; case 1031: return 175; case 1032: return 163; case 1038: return 161; case 1105: return 184; case 1108: return 186; case 1109: return 190; case 1110: return 179; case 1111: return 191; case 1112: return 188; case 1118: return 162; case 1168: return 165; case 1169: return 164; } if (1039 <= a_charCode && a_charCode <= 1103) { return a_charCode - 848; } } return a_charCode; }; v1.formatString = function (a_str) { if (arguments.length < 2) { return a_str; } var v12 = ''; var v8 = 0; var v6 = 1; while (v6 < arguments.length) { var v7 = a_str.indexOf('{', v8); if (v7 == -1) { return a_str; } var v5 = a_str.indexOf('}', v8); if (v5 == -1) { return a_str; } v12 += a_str.slice(v8, v7); var v4 = Number(a_str.slice(v7 + 1, v5)); var v10 = Math.pow(10, v4); var v2 = (Math.round(arguments[v6] * v10) / v10).toString(); if (v4 > 0) { if (v2.indexOf('.') == -1) { v2 += '.'; } var v11 = v2.split('.'); var v9 = v11[1].length; while (v9++ < v4) { v2 += '0'; } } v12 += v2; v8 = v5 + 1; ++v6; } v12 += a_str.slice(v8); return v12; }; v1.formatNumber = function (a_number, a_decimal) { var v2 = (a_number.toString()).toLowerCase(); var v6 = v2.split('e', 2); var v7 = Math.pow(10, a_decimal); v2 = String(Math.round(parseFloat(v6[0]) * v7) / v7); if (a_decimal > 0) { var v5 = v2.indexOf('.'); if (v5 == -1) { v5 = v2.length; v2 += '.'; } var v4 = v2.length - (v5 + 1); var v1 = 0; while (v4 + v1 < a_decimal) { v2 += '0'; ++v1; } } if (v6[1] != undefined) { v2 += 'E' + v6[1]; } return v2; }; v1.getMappedKey = function (a_control, a_context, a_bGamepad) { if (_global.skse == undefined) { return -1; } if (a_bGamepad == true) { return skse.GetMappedKey(a_control, skyui.defines.Input.DEVICE_GAMEPAD, a_context); } else { var v2 = skse.GetMappedKey(a_control, skyui.defines.Input.DEVICE_KEYBOARD, a_context); if (v2 == -1) { v2 = skse.GetMappedKey(a_control, skyui.defines.Input.DEVICE_MOUSE, a_context); } return v2; } }; v1.hookFunction = function (a_scope, a_memberFn, a_hookScope, a_hookFn) { var memberFn = a_scope[a_memberFn]; if (memberFn == null || a_scope[a_memberFn] == null) { return false; } a_scope[a_memberFn] = function () { memberFn.apply(a_scope, arguments); a_hookScope[a_hookFn].apply(a_hookScope, arguments); }; return true; }; v1.getDistance = function (a, b) { var v2 = b._x - a._x; var v1 = b._y - a._y; return Math.sqrt(v2 * v2 + v1 * v1); }; v1.getAngle = function (a, b) { var v2 = b._x - a._x; var v1 = b._y - a._y; return Math.atan2(v1, v2) * 57.29577951308232; }; v1._arrayExtended = false; ASSetPropFlags(skyui.util.GlobalFunctions.prototype, null, 1); } #endinitclip } movieClip 311 __Packages.skyui.defines.Input { #initclip if (!_global.skyui) { _global.skyui = new Object(); } if (!_global.skyui.defines) { _global.skyui.defines = new Object(); } if (!_global.skyui.defines.Input) { var v1 = function () {}; skyui.defines.Input = v1; var v2 = v1.prototype; v1.DEVICE_KEYBOARD = 0; v1.DEVICE_MOUSE = 1; v1.DEVICE_GAMEPAD = 2; v1.CONTEXT_GAMEPLAY = 0; v1.CONTEXT_MENUMODE = 1; v1.CONTEXT_CONSOLE = 2; v1.CONTEXT_ITEMMENU = 3; v1.CONTEXT_INVENTORY = 4; v1.CONTEXT_DEBUGTEXT = 5; v1.CONTEXT_FAVORITES = 6; v1.CONTEXT_MAP = 7; v1.CONTEXT_STATS = 8; v1.CONTEXT_CURSOR = 9; v1.CONTEXT_BOOK = 10; v1.CONTEXT_DEBUGOVERLAY = 11; v1.CONTEXT_JOURNAL = 12; v1.CONTEXT_TFCMODE = 13; v1.CONTEXT_MAPDEBUG = 14; v1.CONTEXT_LOCKPICKING = 15; v1.CONTEXT_FAVOR = 16; v1.ChargeItem = {'name': 'ChargeItem', 'context': skyui.defines.Input.CONTEXT_INVENTORY}; v1.XButton = {'name': 'XButton', 'context': skyui.defines.Input.CONTEXT_ITEMMENU}; v1.YButton = {'name': 'YButton', 'context': skyui.defines.Input.CONTEXT_ITEMMENU}; v1.Wait = {'name': 'Wait', 'context': skyui.defines.Input.CONTEXT_GAMEPLAY}; v1.Jump = {'name': 'Jump', 'context': skyui.defines.Input.CONTEXT_GAMEPLAY}; v1.Sprint = {'name': 'Sprint', 'context': skyui.defines.Input.CONTEXT_GAMEPLAY}; v1.Shout = {'name': 'Shout', 'context': skyui.defines.Input.CONTEXT_GAMEPLAY}; v1.Activate = {'name': 'Activate', 'context': skyui.defines.Input.CONTEXT_GAMEPLAY}; v1.ReadyWeapon = {'name': 'Ready Weapon', 'context': skyui.defines.Input.CONTEXT_GAMEPLAY}; v1.TogglePOV = {'name': 'Toggle POV', 'context': skyui.defines.Input.CONTEXT_GAMEPLAY}; v1.Accept = {'name': 'Accept', 'context': skyui.defines.Input.CONTEXT_MENUMODE}; v1.Cancel = {'name': 'Cancel', 'context': skyui.defines.Input.CONTEXT_MENUMODE}; v1.JournalXButton = {'name': 'XButton', 'context': skyui.defines.Input.CONTEXT_JOURNAL}; v1.JournalYButton = {'name': 'YButton', 'context': skyui.defines.Input.CONTEXT_JOURNAL}; v1.LeftRight = [{'name': 'Left', 'context': skyui.defines.Input.CONTEXT_MENUMODE}, {'name': 'Right', 'context': skyui.defines.Input.CONTEXT_MENUMODE}]; v1.Equip = [{'name': 'RightEquip', 'context': skyui.defines.Input.CONTEXT_ITEMMENU}, {'name': 'LeftEquip', 'context': skyui.defines.Input.CONTEXT_ITEMMENU}]; v1.SortColumn = [{'keyCode': 274}, {'keyCode': 275}]; v1.SortOrder = {'keyCode': 272}; v1.GamepadBack = {'keyCode': 271}; v1.Enter = {'keyCode': 28}; v1.Tab = {'keyCode': 15}; v1.Shift = {'keyCode': 42}; v1.Space = {'keyCode': 57}; v1.Alt = {'keyCode': 56}; ASSetPropFlags(skyui.defines.Input.prototype, null, 1); } #endinitclip } movieClip 312 __Packages.gfx.ui.NavigationCode { #initclip if (!_global.gfx) { _global.gfx = new Object(); } if (!_global.gfx.ui) { _global.gfx.ui = new Object(); } if (!_global.gfx.ui.NavigationCode) { var v1 = function () {}; gfx.ui.NavigationCode = v1; var v2 = v1.prototype; v1.UP = 'up'; v1.DOWN = 'down'; v1.LEFT = 'left'; v1.RIGHT = 'right'; v1.START = 'start'; v1.BACK = 'back'; v1.GAMEPAD_A = 'enter-gamepad_A'; v1.GAMEPAD_B = 'escape-gamepad_B'; v1.GAMEPAD_X = 'gamepad_X'; v1.GAMEPAD_Y = 'gamepad_Y'; v1.GAMEPAD_L1 = 'gamepad_L1'; v1.GAMEPAD_L2 = 'gamepad_L2'; v1.GAMEPAD_L3 = 'gamepad_L3'; v1.GAMEPAD_R1 = 'gamepad_R1'; v1.GAMEPAD_R2 = 'gamepad_R2'; v1.GAMEPAD_R3 = 'gamepad_R3'; v1.GAMEPAD_START = 'start'; v1.GAMEPAD_BACK = 'back'; v1.ENTER = 'enter-gamepad_A'; v1.ESCAPE = 'escape-gamepad_B'; v1.END = 'end'; v1.HOME = 'home'; v1.PAGE_DOWN = 'pageDown'; v1.PAGE_UP = 'pageUp'; v1.TAB = 'tab'; v1.SHIFT_TAB = 'shifttab'; ASSetPropFlags(gfx.ui.NavigationCode.prototype, null, 1); } #endinitclip } movieClip 313 __Packages.gfx.ui.InputDetails { #initclip if (!_global.gfx) { _global.gfx = new Object(); } if (!_global.gfx.ui) { _global.gfx.ui = new Object(); } if (!_global.gfx.ui.InputDetails) { var v1 = function (a_type, a_code, a_value, a_navEquivalent, a_controllerIdx, a_control, a_skseKeycode) { this.type = a_type; this.code = a_code; this.value = a_value; this.navEquivalent = a_navEquivalent; this.controllerIdx = a_controllerIdx; this.control = a_control; this.skseKeycode = a_skseKeycode; }; gfx.ui.InputDetails = v1; var v2 = v1.prototype; v2.toString = function () { return ['[InputDelegate', 'code=' + this.code, 'type=' + this.type, 'value=' + this.value, 'navEquivalent=' + this.navEquivalent, 'controllerIdx=' + this.controllerIdx + ']'].toString(); }; ASSetPropFlags(gfx.ui.InputDetails.prototype, null, 1); } #endinitclip } movieClip 314 __Packages.gfx.controls.ScrollIndicator { #initclip if (!_global.gfx) { _global.gfx = new Object(); } if (!_global.gfx.controls) { _global.gfx.controls = new Object(); } if (!_global.gfx.controls.ScrollIndicator) { var v1 = function () { super(); this.tabChildren = false; this.tabEnabled = !this._disabled; this.focusEnabled = this.tabEnabled; }; gfx.controls.ScrollIndicator = v1; gfx.controls.ScrollIndicator extends gfx.core.UIComponent; var v2 = v1.prototype; v2.__get__disabled = function () { return this._disabled; }; v2.__set__disabled = function (value) { if (this._disabled != value) { super.__set__disabled(value); this.tabEnabled = !this._disabled; this.focusEnabled = this.tabEnabled; if (this._scrollTarget) { this.tabEnabled = false; } if (this.initialized) { this.thumb.disabled = this._disabled; } return undefined; } return this.__get__disabled(); }; v2.setScrollProperties = function (pageSize, minPosition, maxPosition, pageScrollSize) { this.pageSize = pageSize; if (pageScrollSize != undefined) { this.pageScrollSize = pageScrollSize; } this.minPosition = minPosition; this.maxPosition = maxPosition; this.updateThumb(); }; v2.__get__position = function () { return this._position; }; v2.__set__position = function (value) { if (value != this._position) { this._position = Math.max(this.minPosition, Math.min(this.maxPosition, value)); this.dispatchEventAndSound({'type': 'scroll', 'position': this._position}); this.invalidate(); return undefined; } return this.__get__position(); }; v2.update = function () {}; v2.__get__scrollTarget = function () { return this._scrollTarget; }; v2.__set__scrollTarget = function (value) { var v2 = this._scrollTarget; this._scrollTarget = value; if (v2 && value._parent != v2) { v2.removeListener(this); if (v2.scrollBar != null) { v2.scrollBar = null; } this.focusTarget = null; v2.noAutoSelection = false; } if (value instanceof gfx.core.UIComponent && value.scrollBar !== null) { value.scrollBar = this; return undefined; } if (this._scrollTarget == null) { this.tabEnabled = true; return undefined; } this._scrollTarget.addListener(this); this._scrollTarget.noAutoSelection = true; this.focusTarget = this._scrollTarget; this.tabEnabled = false; this.onScroller(); return this.__get__scrollTarget(); }; v2.__get__availableHeight = function () { if (this.direction != 'horizontal') { return this.__height - this.thumb.height + this.offsetBottom + this.offsetTop; } return this.__width - this.thumb.height + this.offsetBottom + this.offsetTop; }; v2.toString = function () { return '[Scaleform ScrollIndicator ' + this._name + ']'; }; v2.configUI = function () { super.configUI(); if (this.track == null) { this.track = new gfx.controls.Button(); } this.thumb.focusTarget = this; this.track.focusTarget = this; this.thumb.disabled = this._disabled; this.onRelease = function () {}; this.useHandCursor = false; this.initSize(); this.direction = (this._rotation == 0) ? 'vertical' : 'horizontal'; if (this.inspectableScrollTarget != null) { var v3 = this._parent[this.inspectableScrollTarget]; if (v3 != null) { this.__set__scrollTarget(v3); } this.inspectableScrollTarget = null; } }; v2.draw = function () { this.track._height = (this.direction == 'horizontal') ? this.__width : this.__height; if (this._scrollTarget instanceof TextField) { this.setScrollProperties(this._scrollTarget.bottomScroll - this._scrollTarget.scroll, 1, this._scrollTarget.maxscroll); return undefined; } this.updateThumb(); }; v2.updateThumb = function () { if (!this.thumb.initialized) { this.invalidate(); return undefined; } if (this._disabled) { return undefined; } var v6 = Math.max(1, this.maxPosition - this.minPosition + this.pageSize); var v2 = ((this.direction == 'horizontal') ? this.__width : this.__height) + this.offsetTop + this.offsetBottom; this.thumb.height = Math.max(10, (this.pageSize / v6) * v2); var v4 = (this.__get__position() - this.minPosition) / (this.maxPosition - this.minPosition); var v3 = -this.offsetTop; var v5 = v4 * this.__get__availableHeight() + v3; this.thumb._y = Math.max(v3, Math.min(v2 - this.offsetTop, v5)); this.thumb.visible = !(isNaN(v4) || this.maxPosition == 0); }; v2.onScroller = function () { if (this.isDragging) { return undefined; } if (this.lastVScrollPos == this._scrollTarget.scroll) { delete this.lastVScrollPos; return undefined; } this.setScrollProperties(this._scrollTarget.bottomScroll - this._scrollTarget.scroll, 1, this._scrollTarget.maxscroll); this.__set__position(this._scrollTarget.scroll); this.lastVScrollPos = this._scrollTarget.scroll; if (this.scrollerIntervalID == undefined) { this.scrollerIntervalID = setInterval(this, 'scrollerDelayUpdate', 10); } }; v2.scrollerDelayUpdate = function () { this.onScroller(); clearInterval(this.scrollerIntervalID); delete this.scrollerIntervalID; }; v2.direction = 'vertical'; v2.soundMap = {'theme': 'default', 'scroll': 'scroll'}; v2.pageScrollSize = 1; v2.minPosition = 0; v2.maxPosition = 10; v2._position = 5; v2.offsetTop = 0; v2.offsetBottom = 0; v2.isDragging = false; v2.addProperty('availableHeight', v2.__get__availableHeight, function () {}); v2.addProperty('disabled', v2.__get__disabled, v2.__set__disabled); v2.addProperty('position', v2.__get__position, v2.__set__position); v2.addProperty('scrollTarget', v2.__get__scrollTarget, v2.__set__scrollTarget); ASSetPropFlags(gfx.controls.ScrollIndicator.prototype, null, 1); } #endinitclip } movieClip 315 __Packages.gfx.controls.Button { #initclip if (!_global.gfx) { _global.gfx = new Object(); } if (!_global.gfx.controls) { _global.gfx.controls = new Object(); } if (!_global.gfx.controls.Button) { var v1 = function () { super(); this.tabEnabled = this._disableFocus ? false : !this._disabled; this.focusEnabled = this.tabEnabled; if (this.inspectableGroupName != null && this.inspectableGroupName != '') { this.__set__group(this.inspectableGroupName); } }; gfx.controls.Button = v1; gfx.controls.Button extends gfx.core.UIComponent; var v2 = v1.prototype; v2.__get__labelID = function () { return null; }; v2.__set__labelID = function (value) { if (value != '') { this.__set__label(gfx.utils.Locale.getTranslatedString(value)); } return this.__get__labelID(); }; v2.__get__label = function () { return this._label; }; v2.__set__label = function (value) { this._label = value; if (this.initialized) { if (this.textField != null) { this.textField.text = this._label; } if (this.__get__autoSize() != 'none') { this.sizeIsInvalid = true; } this.updateAfterStateChange(); } return this.__get__label(); }; v2.__get__disabled = function () { return this._disabled; }; v2.__set__disabled = function (value) { if (this._disabled != value) { super.__set__disabled(value); this.clearRepeatInterval(); this.tabEnabled = this._disableFocus ? false : !this._disabled; this.focusEnabled = this.tabEnabled; this.setState(this._disabled ? 'disabled' : 'up'); return undefined; } return this.__get__disabled(); }; v2.__get__selected = function () { return this._selected; }; v2.__set__selected = function (value) { if (this._selected != value) { this._selected = value; if (this._disabled) { this.setState('disabled'); } else { if (this._focused) { if (this.pressedByKeyboard && this.focusIndicator != null) { this.setState('kb_selecting'); } else { this.setState('selecting'); } } else { this.setState((this.__get__displayFocus() && this.focusIndicator == null) ? 'over' : 'up'); } } if (this.dispatchEvent != null) { this.dispatchEventAndSound({'type': 'select', 'selected': this._selected}); } return undefined; } return this.__get__selected(); }; v2.__get__groupName = function () { return (this._group == null) ? null : this._group.name; }; v2.__set__groupName = function (value) { this.__set__group(value); return this.__get__groupName(); }; v2.__get__group = function () { return this._group; }; v2.__set__group = function (value) { var v2 = gfx.controls.ButtonGroup(value); if (typeof value == 'string') { v2 = this._parent['_buttonGroup_' + value]; if (v2 == null) { v2 = new gfx.controls.ButtonGroup(value.toString(), this._parent); this._parent['_buttonGroup_' + value] = v2; } } if (this._group != v2) { if (this._group != null) { this._group.removeButton(this); } this._group = v2; if (this._group != null) { v2.addButton(this); } return undefined; } return this.__get__group(); }; v2.__get__disableFocus = function () { return this._disableFocus; }; v2.__set__disableFocus = function (value) { this._disableFocus = value; this.tabEnabled = this._disableFocus ? false : !this._disabled; this.focusEnabled = this.tabEnabled; return this.__get__disableFocus(); }; v2.__get__disableConstraints = function () { return this._disableConstraints; }; v2.__set__disableConstraints = function (value) { this._disableConstraints = value; return this.__get__disableConstraints(); }; v2.__get__autoSize = function () { return this._autoSize; }; v2.__set__autoSize = function (value) { if (this._autoSize != value) { this._autoSize = value; if (this.initialized) { this.sizeIsInvalid = true; this.validateNow(); } return undefined; } return this.__get__autoSize(); }; v2.setSize = function (width, height) { super.setSize(width, height); }; v2.handleInput = function (details, pathToFocus) { __reg0 = details.navEquivalent; if (__reg0 === gfx.ui.NavigationCode.ENTER) { var v3 = details.controllerIdx; if (details.value == 'keyDown' || details.value == 'keyHold') { if (!this.pressedByKeyboard) { this.handlePress(v3); } } else { this.handleRelease(v3); } return true; } return false; }; v2.toString = function () { return '[Scaleform Button ' + this._name + ']'; }; v2.configUI = function () { this.constraints = new gfx.utils.Constraints(this, true); if (!this._disableConstraints) { this.constraints.addElement(this.textField, gfx.utils.Constraints.ALL); } super.configUI(); if (this._autoSize != 'none') { this.sizeIsInvalid = true; } this.onRollOver = this.handleMouseRollOver; this.onRollOut = this.handleMouseRollOut; this.onPress = this.handleMousePress; this.onRelease = this.handleMouseRelease; this.onReleaseOutside = this.handleReleaseOutside; this.onDragOver = this.handleDragOver; this.onDragOut = this.handleDragOut; if (this.focusIndicator != null && !this._focused && this.focusIndicator._totalFrames == 1) { this.focusIndicator._visible = false; } this.updateAfterStateChange(); }; v2.draw = function () { if (this.sizeIsInvalid) { this.alignForAutoSize(); this._width = this.__width; this._height = this.__height; } if (this.initialized) { this.constraints.update(this.__width, this.__height); } }; v2.updateAfterStateChange = function () { if (this.initialized) { if (this.textField != null && this._label != null) { this.textField.text = this._label; } this.validateNow(); if (this.constraints != null) { this.constraints.update(this.__get__width(), this.__get__height()); } this.dispatchEvent({'type': 'stateChange', 'state': this.state}); } }; v2.calculateWidth = function () { if (this.constraints == null) { this.invalidate(); return 0; } var v2 = (this.constraints.getElement(this.textField)).metrics; var v3 = this.textField.textWidth + v2.left + v2.right + 5; return v3; }; v2.alignForAutoSize = function () { if (!this.initialized || this._autoSize == 'none' || this.textField == null) { return undefined; } var v2 = this.__width; this.__set__width(this.calculateWidth()); __reg0 = this._autoSize; if (__reg0 === 'right') { var v4 = this._x + v2; this._x = v4 - this.__width; return undefined; var v3 = this._x + v2 / 2; this._x = v3 - this.__width / 2; return undefined; } if (__reg0 !== 'center') { return undefined; } var v3 = this._x + v2 / 2; this._x = v3 - this.__width / 2; return undefined; }; v2.setState = function (state) { this.state = state; var v5 = this.getStatePrefixes(); var v4 = this.stateMap[state]; if (v4 == null || v4.length == 0) { return undefined; } do { var v3 = (v5.pop()).toString(); var v2 = v4.length - 1; while (v2 >= 0) { this.gotoAndPlay(v3 + v4[v2]); --v2; } } while (v5.length > 0); this.updateAfterStateChange(); }; v2.getStatePrefixes = function () { return this._selected ? ['selected_', ''] : ['']; }; v2.changeFocus = function () { if (this._disabled) { return undefined; } if (this.focusIndicator == null) { this.setState((this._focused || this._displayFocus) ? 'over' : 'out'); if (this.pressedByKeyboard && !this._focused) { this.pressedByKeyboard = false; } } if (this.focusIndicator != null) { if (this.focusIndicator._totalframes == 1) { this.focusIndicator._visible = this._focused != 0; } else { this.focusIndicator.gotoAndPlay(this._focused ? 'show' : 'hide'); this.focusIndicator.gotoAndPlay('state' + this._focused); } if (this.pressedByKeyboard && !this._focused) { this.setState('kb_release'); this.pressedByKeyboard = false; } } }; v2.handleMouseRollOver = function (controllerIdx) { if (this._disabled) { return undefined; } if (!this._focused && !this._displayFocus || this.focusIndicator != null) { this.setState('over'); } this.dispatchEventAndSound({'type': 'rollOver', 'controllerIdx': controllerIdx}); }; v2.handleMouseRollOut = function (controllerIdx) { if (this._disabled) { return undefined; } if (!this._focused && !this._displayFocus || this.focusIndicator != null) { this.setState('out'); } this.dispatchEventAndSound({'type': 'rollOut', 'controllerIdx': controllerIdx}); }; v2.handleMousePress = function (controllerIdx, keyboardOrMouse, button) { if (this._disabled) { return undefined; } if (!this._disableFocus) { Selection.setFocus(this, controllerIdx); } this.setState('down'); this.dispatchEventAndSound({'type': 'press', 'controllerIdx': controllerIdx, 'button': button}); if (this.autoRepeat) { this.buttonRepeatInterval = setInterval(this, 'beginButtonRepeat', this.buttonRepeatDelay, controllerIdx, button); } }; v2.handlePress = function (controllerIdx) { if (this._disabled) { return undefined; } this.pressedByKeyboard = true; this.setState((this.focusIndicator == null) ? 'down' : 'kb_down'); this.dispatchEventAndSound({'type': 'press', 'controllerIdx': controllerIdx}); }; v2.handleMouseRelease = function (controllerIdx, keyboardOrMouse, button) { if (this._disabled) { return undefined; } clearInterval(this.buttonRepeatInterval); delete this.buttonRepeatInterval; if (this.doubleClickEnabled) { if (this.doubleClickInterval == null) { this.doubleClickInterval = setInterval(this, 'doubleClickExpired', this.doubleClickDuration); } else { this.doubleClickExpired(); this.dispatchEventAndSound({'type': 'doubleClick', 'controllerIdx': controllerIdx, 'button': button}); this.setState('release'); return undefined; } } this.setState('release'); this.handleClick(controllerIdx, button); }; v2.handleRelease = function (controllerIdx) { if (this._disabled) { return undefined; } this.setState((this.focusIndicator == null) ? 'release' : 'kb_release'); this.handleClick(controllerIdx); this.pressedByKeyboard = false; }; v2.handleClick = function (controllerIdx, button) { if (this.toggle) { this.__set__selected(!this._selected); } this.dispatchEventAndSound({'type': 'click', 'controllerIdx': controllerIdx, 'button': button}); }; v2.handleDragOver = function (controllerIdx, button) { if (this._disabled || this.lockDragStateChange) { return undefined; } if (this._focused || this._displayFocus) { this.setState((this.focusIndicator == null) ? 'down' : 'kb_down'); } else { this.setState('over'); } this.dispatchEvent({'type': 'dragOver', 'controllerIdx': controllerIdx, 'button': button}); }; v2.handleDragOut = function (controllerIdx, button) { if (this._disabled || this.lockDragStateChange) { return undefined; } if (this._focused || this._displayFocus) { this.setState((this.focusIndicator == null) ? 'release' : 'kb_release'); } else { this.setState('out'); } this.dispatchEvent({'type': 'dragOut', 'controllerIdx': controllerIdx, 'button': button}); }; v2.handleReleaseOutside = function (controllerIdx, button) { this.clearRepeatInterval(); if (this._disabled) { return undefined; } if (this.lockDragStateChange) { if (this._focused || this._displayFocus) { this.setState((this.focusIndicator == null) ? 'release' : 'kb_release'); } else { this.setState('kb_release'); } } this.dispatchEvent({'type': 'releaseOutside', 'state': this.state, 'button': button}); }; v2.doubleClickExpired = function () { clearInterval(this.doubleClickInterval); delete this.doubleClickInterval; }; v2.beginButtonRepeat = function (controllerIdx, button) { this.clearRepeatInterval(); this.buttonRepeatInterval = setInterval(this, 'handleButtonRepeat', this.buttonRepeatDuration, controllerIdx, button); }; v2.handleButtonRepeat = function (controllerIdx, button) { this.dispatchEventAndSound({'type': 'click', 'controllerIdx': controllerIdx, 'button': button}); }; v2.clearRepeatInterval = function () { clearInterval(this.buttonRepeatInterval); delete this.buttonRepeatInterval; }; v2.state = 'up'; v2.toggle = false; v2.doubleClickEnabled = false; v2.autoRepeat = false; v2.lockDragStateChange = false; v2.soundMap = {'theme': 'default', 'focusIn': 'focusIn', 'focusOut': 'focusOut', 'select': 'select', 'rollOver': 'rollOver', 'rollOut': 'rollOut', 'press': 'press', 'doubleClick': 'doubleClick', 'click': 'click'}; v2._selected = false; v2._autoSize = 'none'; v2._disableFocus = false; v2._disableConstraints = false; v2.doubleClickDuration = 250; v2.buttonRepeatDuration = 100; v2.buttonRepeatDelay = 100; v2.pressedByKeyboard = false; v2.stateMap = {'up': ['up'], 'over': ['over'], 'down': ['down'], 'release': ['release', 'over'], 'out': ['out', 'up'], 'disabled': ['disabled'], 'selecting': ['selecting', 'over'], 'kb_selecting': ['kb_selecting', 'up'], 'kb_release': ['kb_release', 'out', 'up'], 'kb_down': ['kb_down', 'down']}; v2.addProperty('autoSize', v2.__get__autoSize, v2.__set__autoSize); v2.addProperty('disableConstraints', v2.__get__disableConstraints, v2.__set__disableConstraints); v2.addProperty('disableFocus', v2.__get__disableFocus, v2.__set__disableFocus); v2.addProperty('disabled', v2.__get__disabled, v2.__set__disabled); v2.addProperty('group', v2.__get__group, v2.__set__group); v2.addProperty('groupName', v2.__get__groupName, v2.__set__groupName); v2.addProperty('label', v2.__get__label, v2.__set__label); v2.addProperty('labelID', v2.__get__labelID, v2.__set__labelID); v2.addProperty('selected', v2.__get__selected, v2.__set__selected); ASSetPropFlags(gfx.controls.Button.prototype, null, 1); } #endinitclip } movieClip 316 __Packages.gfx.utils.Locale { #initclip if (!_global.gfx) { _global.gfx = new Object(); } if (!_global.gfx.utils) { _global.gfx.utils = new Object(); } if (!_global.gfx.utils.Locale) { var v1 = function () {}; gfx.utils.Locale = v1; var v2 = v1.prototype; v1.getTranslatedString = function (value) { return value; }; ASSetPropFlags(gfx.utils.Locale.prototype, null, 1); } #endinitclip } movieClip 317 __Packages.gfx.controls.ButtonGroup { #initclip if (!_global.gfx) { _global.gfx = new Object(); } if (!_global.gfx.controls) { _global.gfx.controls = new Object(); } if (!_global.gfx.controls.ButtonGroup) { var v1 = function (name, scope) { super(); this.name = name; this.scope = scope; this.children = []; }; gfx.controls.ButtonGroup = v1; gfx.controls.ButtonGroup extends gfx.events.EventDispatcher; var v2 = v1.prototype; v2.__get__length = function () { return this.children.length; }; v2.addButton = function (button) { this.removeButton(button); this.children.push(button); if (button.selected) { this.setSelectedButton(button); } button.addEventListener('select', this, 'handleSelect'); button.addEventListener('click', this, 'handleClick'); }; v2.removeButton = function (button) { var v3 = this.indexOf(button); if (v3 > -1) { this.children.splice(v3, 1); button.removeEventListener('select', this, 'handleSelect'); button.removeEventListener('click', this, 'handleClick'); } if (this.selectedButton == button) { this.selectedButton = null; } }; v2.indexOf = function (button) { var v4 = this.__get__length(); if (v4 == 0) { return -1; } var v2 = 0; while (v2 < this.__get__length()) { if (this.children[v2] == button) { return v2; } ++v2; } return -1; }; v2.getButtonAt = function (index) { return this.children[index]; }; v2.__get__data = function () { return this.selectedButton.data; }; v2.setSelectedButton = function (button) { if (this.selectedButton == button || this.indexOf(button) == -1 && button != null) { return undefined; } if (this.selectedButton != null && this.selectedButton._name != null) { this.selectedButton.selected = false; } this.selectedButton = button; if (this.selectedButton != null) { this.selectedButton.selected = true; this.dispatchEvent({'type': 'change', 'item': this.selectedButton, 'data': this.selectedButton.data}); } }; v2.toString = function () { return '[Scaleform RadioButtonGroup ' + this.name + ']'; }; v2.handleSelect = function (event) { if (event.target.selected) { this.setSelectedButton(event.target); return undefined; } this.setSelectedButton(null); }; v2.handleClick = function (event) { this.dispatchEvent({'type': 'itemClick', 'item': event.target}); this.setSelectedButton(event.target); }; v2.name = 'buttonGroup'; v2.addProperty('data', v2.__get__data, function () {}); v2.addProperty('length', v2.__get__length, function () {}); ASSetPropFlags(gfx.controls.ButtonGroup.prototype, null, 1); } #endinitclip } movieClip 318 __Packages.gfx.utils.Constraints { #initclip if (!_global.gfx) { _global.gfx = new Object(); } if (!_global.gfx.utils) { _global.gfx.utils = new Object(); } if (!_global.gfx.utils.Constraints) { var v1 = function (scope, scaled) { this.scope = scope; this.scaled = scaled; this.elements = []; }; gfx.utils.Constraints = v1; var v2 = v1.prototype; v2.addElement = function (clip, edges) { if (clip != null) { var v7 = 100 / this.scope._xscale; var v8 = 100 / this.scope._yscale; var v4 = this.scope._width; var v5 = this.scope._height; if (this.scope == _root) { v4 = Stage.width; v5 = Stage.height; } var v6 = {'clip': clip, 'edges': edges, 'metrics': {'left': clip._x, 'top': clip._y, 'right': v4 * v7 - (clip._x + clip._width), 'bottom': v5 * v8 - (clip._y + clip._height), 'xscale': clip._xscale, 'yscale': clip._yscale}}; var v16 = v6.metrics; this.elements.push(v6); } }; v2.removeElement = function (clip) { var v2 = 0; for (;;) { if (v2 >= this.elements.length) { return undefined; } if (this.elements[v2].clip == clip) { this.elements.splice(v2, 1); return undefined; } ++v2; } }; v2.getElement = function (clip) { var v2 = 0; while (v2 < this.elements.length) { if (this.elements[v2].clip == clip) { return this.elements[v2]; } ++v2; } return null; }; v2.update = function (width, height) { var v9 = 100 / this.scope._xscale; var v8 = 100 / this.scope._yscale; if (!this.scaled) { this.scope._xscale = 100; this.scope._yscale = 100; } var v14 = 0; for (;;) { if (v14 >= this.elements.length) { return undefined; } var v7 = this.elements[v14]; var v4 = v7.edges; var v2 = v7.clip; var v3 = v7.metrics; var v12 = (v2.width == null) ? '_width' : 'width'; var v13 = (v2.height == null) ? '_height' : 'height'; if (this.scaled) { v2._xscale = v3.xscale * v9; v2._yscale = v3.yscale * v8; if ((v4 & gfx.utils.Constraints.LEFT) > 0) { v2._x = v3.left * v9; if ((v4 & gfx.utils.Constraints.RIGHT) > 0) { var v5 = width - v3.left - v3.right; if (!(v2 instanceof TextField)) { v5 *= v9; } v2[v12] = v5; } } else { if ((v4 & gfx.utils.Constraints.RIGHT) > 0) { v2._x = (width - v3.right) * v9 - v2._width; } } if ((v4 & gfx.utils.Constraints.TOP) > 0) { v2._y = v3.top * v8; if ((v4 & gfx.utils.Constraints.BOTTOM) > 0) { var v6 = height - v3.top - v3.bottom; if (!(v2 instanceof TextField)) { v6 *= v8; } v2[v13] = v6; } } else { if ((v4 & gfx.utils.Constraints.BOTTOM) > 0) { v2._y = (height - v3.bottom) * v8 - v2._height; } } } else { if ((v4 & gfx.utils.Constraints.RIGHT) > 0) { if ((v4 & gfx.utils.Constraints.LEFT) > 0) { v2[v12] = width - v3.left - v3.right; } else { v2._x = width - v2._width - v3.right; } } if ((v4 & gfx.utils.Constraints.BOTTOM) > 0) { if ((v4 & gfx.utils.Constraints.TOP) > 0) { v2[v13] = height - v3.top - v3.bottom; } else { v2._y = height - v2._height - v3.bottom; } } } ++v14; } }; v2.toString = function () { return '[Scaleform Constraints]'; }; v1.LEFT = 1; v1.RIGHT = 2; v1.TOP = 4; v1.BOTTOM = 8; v1.ALL = gfx.utils.Constraints.LEFT | gfx.utils.Constraints.RIGHT | gfx.utils.Constraints.TOP | gfx.utils.Constraints.BOTTOM; v2.scaled = false; ASSetPropFlags(gfx.utils.Constraints.prototype, null, 1); } #endinitclip } movieClip 319 __Packages.gfx.controls.ScrollBar { #initclip if (!_global.gfx) { _global.gfx = new Object(); } if (!_global.gfx.controls) { _global.gfx.controls = new Object(); } if (!_global.gfx.controls.ScrollBar) { var v1 = function () { super(); }; gfx.controls.ScrollBar = v1; gfx.controls.ScrollBar extends gfx.controls.ScrollIndicator; var v2 = v1.prototype; v2.__get__disabled = function () { return this._disabled; }; v2.__set__disabled = function (value) { if (this._disabled != value) { super.__set__disabled(value); this.gotoAndPlay(this._disabled ? 'disabled' : 'default'); if (this.initialized) { this.upArrow.disabled = this._disabled; this.downArrow.disabled = this._disabled; this.track.disabled = this._disabled; } return undefined; } return this.__get__disabled(); }; v2.__get__position = function () { return super.__get__position(); }; v2.__set__position = function (value) { value = Math.round(value); if (value != this.__get__position()) { super.__set__position(value); this.updateScrollTarget(); return undefined; } return this.__get__position(); }; v2.__get__trackMode = function () { return this._trackMode; }; v2.__set__trackMode = function (value) { if (value != this._trackMode) { this._trackMode = value; if (this.initialized) { this.track.autoRepeat = this.__get__trackMode() == 'scrollPage'; } return undefined; } return this.__get__trackMode(); }; v2.__get__availableHeight = function () { return this.track.height - this.thumb.height + this.offsetBottom + this.offsetTop; }; v2.toString = function () { return '[Scaleform ScrollBar ' + this._name + ']'; }; v2.configUI = function () { super.configUI(); delete this.onRelease; if (this.upArrow) { this.upArrow.addEventListener('click', this, 'scrollUp'); this.upArrow.useHandCursor = !this._disabled; this.upArrow.disabled = this._disabled; this.upArrow.focusTarget = this; this.upArrow.autoRepeat = true; } if (this.downArrow) { this.downArrow.addEventListener('click', this, 'scrollDown'); this.downArrow.useHandCursor = !this._disabled; this.downArrow.disabled = this._disabled; this.downArrow.focusTarget = this; this.downArrow.autoRepeat = true; } this.thumb.addEventListener('press', this, 'beginDrag'); this.thumb.useHandCursor = !this._disabled; this.thumb.lockDragStateChange = true; this.track.addEventListener('press', this, 'beginTrackScroll'); this.track.addEventListener('click', this, 'trackScroll'); this.track.disabled = this._disabled; this.track.autoRepeat = this.__get__trackMode() == 'scrollPage'; Mouse.addListener(this); var v3 = this._rotation; this._rotation = 0; this.constraints = new gfx.utils.Constraints(this); if (this.downArrow) { this.constraints.addElement(this.downArrow, gfx.utils.Constraints.BOTTOM); } this.constraints.addElement(this.track, gfx.utils.Constraints.TOP | gfx.utils.Constraints.BOTTOM); this._rotation = v3; }; v2.draw = function () { if (this.direction == 'horizontal') { this.constraints.update(this.__height, this.__width); } else { this.constraints.update(this.__width, this.__height); } if (this._scrollTarget instanceof TextField) { this.setScrollProperties(this._scrollTarget.bottomScroll - this._scrollTarget.scroll, 1, this._scrollTarget.maxscroll); return undefined; } this.updateThumb(); }; v2.updateThumb = function () { if (!this.initialized) { this.invalidate(); return undefined; } if (this._disabled) { return undefined; } var v7 = Math.max(1, this.maxPosition - this.minPosition + this.pageSize); var v2 = this.track.height + this.offsetTop + this.offsetBottom; var v6 = v2; this.thumb.height = Math.max(10, Math.min(v2, (this.pageSize / v7) * v6)); var v4 = (this._position - this.minPosition) / (this.maxPosition - this.minPosition); var v3 = this.track._y - this.offsetTop; var v5 = v4 * this.__get__availableHeight() + v3; this.thumb._y = Math.max(v3, Math.min(this.track._y + this.track.height - this.thumb.height + this.offsetBottom, v5)); this.thumb.visible = !(isNaN(v4) || this.maxPosition <= 0 || this.maxPosition == Infinity); if (this.thumb.visible) { this.track.disabled = false; if (this.upArrow) { if (this._position == this.minPosition) { this.upArrow.disabled = true; } else { this.upArrow.disabled = false; } } if (this.downArrow) { if (this._position == this.maxPosition) { this.downArrow.disabled = true; } else { this.downArrow.disabled = false; } } return undefined; } if (this.upArrow) { this.upArrow.disabled = true; } if (this.downArrow) { this.downArrow.disabled = true; } this.track.disabled = true; }; v2.scrollUp = function () { this.__set__position(this.__get__position() - this.pageScrollSize); }; v2.scrollDown = function () { this.__set__position(this.__get__position() + this.pageScrollSize); }; v2.beginDrag = function () { if (this.isDragging != true) { this.isDragging = true; this.onMouseMove = this.doDrag; this.onMouseUp = this.endDrag; this.dragOffset = {'y': this._ymouse - this.thumb._y}; } }; v2.doDrag = function () { var v2 = (this._ymouse - this.dragOffset.y - this.track._y) / this.__get__availableHeight(); this.__set__position(this.minPosition + v2 * (this.maxPosition - this.minPosition)); }; v2.endDrag = function () { delete this.onMouseUp; delete this.onMouseMove; this.isDragging = false; if (this.trackDragMouseIndex != undefined) { if (this.thumb.hitTest(_root._xmouse, _root._ymouse)) { this.thumb.onRelease(this.trackDragMouseIndex); } else { this.thumb.onReleaseOutside(this.trackDragMouseIndex); } } delete this.trackDragMouseIndex; }; v2.beginTrackScroll = function (e) { var v2 = (this._ymouse - this.thumb.height / 2 - this.track._y) / this.__get__availableHeight(); this.trackScrollPosition = Math.round(v2 * (this.maxPosition - this.minPosition) + this.minPosition); if (Key.isDown(16) || this.__get__trackMode() == 'scrollToCursor') { this.__set__position(this.trackScrollPosition); this.trackDragMouseIndex = e.controllerIdx; this.thumb.onPress(this.trackDragMouseIndex); this.dragOffset = {'y': this.thumb.height / 2}; } }; v2.trackScroll = function () { if (this.isDragging || this.__get__position() == this.trackScrollPosition) { return undefined; } var v2 = this.__get__position() >= this.trackScrollPosition ? -this.trackScrollPageSize : this.trackScrollPageSize; var v3 = this.__get__position() + v2; this.__set__position(v2 >= 0 ? Math.min(v3, this.trackScrollPosition) : Math.max(v3, this.trackScrollPosition)); }; v2.updateScrollTarget = function () { if (this._scrollTarget != null) { if (this._scrollTarget && !this._disabled) { this._scrollTarget.scroll = this._position; } } }; v2.scrollWheel = function (delta) { this.__set__position(this.__get__position() - delta * this.pageScrollSize); }; v2.trackScrollPageSize = 1; v2._trackMode = 'scrollPage'; v2.trackScrollPosition = -1; v2.addProperty('availableHeight', v2.__get__availableHeight, function () {}); v2.addProperty('disabled', v2.__get__disabled, v2.__set__disabled); v2.addProperty('position', v2.__get__position, v2.__set__position); v2.addProperty('trackMode', v2.__get__trackMode, v2.__set__trackMode); ASSetPropFlags(gfx.controls.ScrollBar.prototype, null, 1); } #endinitclip } movieClip 320 __Packages.SystemPage { #initclip if (!_global.SystemPage) { var v1 = function () { super(); this.CategoryList = this.CategoryList_mc.List_mc; this.SaveLoadListHolder = this.SaveLoadPanel; this.SettingsList = this.SettingsPanel.List_mc; this.MappingList = this.InputMappingPanel.List_mc; this.PCQuitList = this.PCQuitPanel.List_mc; this.HelpList = this.HelpListPanel.List_mc; this.HelpText = this.HelpTextPanel.HelpTextHolder.HelpText; this.HelpButtonHolder = this.HelpTextPanel.HelpTextHolder.ButtonArtHolder; this.HelpTitleText = this.HelpTextPanel.HelpTextHolder.TitleText; this.ConfirmTextField = this.ConfirmPanel.ConfirmText.textField; this.TopmostPanel = this.PanelRect; this.bUpdated = false; this.bRemapMode = false; this.bSettingsChanged = false; this.bMenuClosing = false; this.bSavingSettings = false; this.bShowKinectTunerButton = false; this.iPlatform = 0; this.bDefaultButtonVisible = false; this._showModMenu = false; }; _global.SystemPage = v1; _global.SystemPage extends MovieClip; var v2 = v1.prototype; v2.GetIsRemoteDevice = function () { return this.bIsRemoteDevice; }; v2.onLoad = function () { this.CategoryList.entryList.push({'text': '$QUICKSAVE'}); this.CategoryList.entryList.push({'text': '$SAVE'}); this.CategoryList.entryList.push({'text': '$LOAD'}); this.CategoryList.entryList.push({'text': '$SETTINGS'}); this.CategoryList.entryList.push({'text': '$MOD CONFIGURATION'}); this.CategoryList.entryList.push({'text': '$CONTROLS'}); this.CategoryList.entryList.push({'text': '$HELP'}); this.CategoryList.entryList.push({'text': '$QUIT'}); this.CategoryList.InvalidateData(); this.ConfirmPanel.handleInput = function () { return false; }; this.SaveLoadListHolder.addEventListener('saveGameSelected', this, 'ConfirmSaveGame'); this.SaveLoadListHolder.addEventListener('loadGameSelected', this, 'ConfirmLoadGame'); this.SaveLoadListHolder.addEventListener('saveListCharactersPopulated', this, 'OnSaveListCharactersOpenSuccess'); this.SaveLoadListHolder.addEventListener('saveListPopulated', this, 'OnSaveListOpenSuccess'); this.SaveLoadListHolder.addEventListener('saveListOnBatchAdded', this, 'OnSaveListBatchAdded'); this.SaveLoadListHolder.addEventListener('OnCharacterSelected', this, 'OnCharacterSelected'); gfx.io.GameDelegate.addCallBack('OnSaveDataEventSaveSUCCESS', this, 'OnSaveDataEventSaveSUCCESS'); gfx.io.GameDelegate.addCallBack('OnSaveDataEventSaveCANCEL', this, 'OnSaveDataEventSaveCANCEL'); gfx.io.GameDelegate.addCallBack('OnSaveDataEventLoadCANCEL', this, 'OnSaveDataEventLoadCANCEL'); this.SaveLoadListHolder.addEventListener('saveHighlighted', this, 'onSaveHighlight'); this.SaveLoadListHolder.List_mc.addEventListener('listPress', this, 'onSaveLoadListPress'); this.CategoryList.addEventListener('itemPress', this, 'onCategoryButtonPress'); this.CategoryList.addEventListener('listPress', this, 'onCategoryListPress'); this.CategoryList.addEventListener('listMovedUp', this, 'onCategoryListMoveUp'); this.CategoryList.addEventListener('listMovedDown', this, 'onCategoryListMoveDown'); this.CategoryList.addEventListener('selectionChange', this, 'onCategoryListMouseSelectionChange'); this.CategoryList.disableInput = true; this.SettingsList.entryList = [{'text': '$Gameplay'}, {'text': '$Display'}, {'text': '$Audio'}]; this.SettingsList.InvalidateData(); this.SettingsList.addEventListener('itemPress', this, 'onSettingsCategoryPress'); this.SettingsList.disableInput = true; this.InputMappingPanel.List_mc.addEventListener('itemPress', this, 'onInputMappingPress'); gfx.io.GameDelegate.addCallBack('FinishRemapMode', this, 'onFinishRemapMode'); gfx.io.GameDelegate.addCallBack('SettingsSaved', this, 'onSettingsSaved'); gfx.io.GameDelegate.addCallBack('RefreshSystemButtons', this, 'RefreshSystemButtons'); this.PCQuitList.entryList = [{'text': '$Main Menu'}, {'text': '$Desktop'}]; this.PCQuitList.UpdateList(); this.PCQuitList.addEventListener('itemPress', this, 'onPCQuitButtonPress'); this.HelpList.addEventListener('itemPress', this, 'onHelpItemPress'); this.HelpList.disableInput = true; this.HelpTitleText.textAutoSize = 'shrink'; this.BottomBar_mc = this._parent._parent.BottomBar_mc; gfx.io.GameDelegate.addCallBack('BackOutFromLoadGame', this, 'BackOutFromLoadGame'); gfx.io.GameDelegate.addCallBack('SetRemoteDevice', this, 'SetRemoteDevice'); gfx.io.GameDelegate.addCallBack('UpdatePermissions', this, 'UpdatePermissions'); }; v2.SetShowMod = function (bshow) { this._showModMenu = bshow; if (this._showModMenu && this.CategoryList.entryList && this.CategoryList.entryList.length > 0) { this.CategoryList.entryList.splice(SystemPage.MOD_MANAGER_BUTTON_INDEX, 0, {'text': '$MOD MANAGER'}); this.CategoryList.InvalidateData(); } }; v2.startPage = function () { this.CategoryList.disableInput = false; if (!this.bUpdated) { this.__set__currentState(SystemPage.MAIN_STATE); gfx.io.GameDelegate.call('SetVersionText', [this.VersionText]); var v2 = this.VersionText.text.split('.'); this._skyrimVersion = v2[0]; this._skyrimVersionMinor = v2[1]; this._skyrimVersionBuild = v2[2]; gfx.io.GameDelegate.call('ShouldShowKinectTunerOption', [], this, 'SetShouldShowKinectTunerOption'); this.UpdatePermissions(); this.bUpdated = true; } else { this.UpdateStateFocus(this.iCurrentState); } }; v2.endPage = function () { this.BottomBar_mc.buttonPanel.clearButtons(); this.CategoryList.disableInput = true; }; v2.__get__currentState = function () { return this.iCurrentState; }; v2.__set__currentState = function (aiNewState) { if (aiNewState == undefined) { return undefined; } if (aiNewState == SystemPage.MAIN_STATE) { this.SaveLoadListHolder.isShowingCharacterList = false; } else { if (aiNewState == SystemPage.SAVE_LOAD_STATE && this.SaveLoadListHolder.isShowingCharacterList) { aiNewState = SystemPage.CHARACTER_SELECTION_STATE; } } var v3 = this.GetPanelForState(aiNewState); this.iCurrentState = aiNewState; if (v3 != this.TopmostPanel) { v3.swapDepths(this.TopmostPanel); this.TopmostPanel = v3; } this.UpdateStateFocus(aiNewState); return this.__get__currentState(); }; v2.OnSaveDataEventSaveSUCCESS = function () { if (this.iPlatform == SystemPage.CONTROLLER_ORBIS) { this.bMenuClosing = true; this.EndState(); } }; v2.OnSaveDataEventSaveCANCEL = function () { if (this.iPlatform == SystemPage.CONTROLLER_ORBIS) { this.HideErrorText(); this.EndState(); this.StartState(SystemPage.SAVE_LOAD_STATE); } }; v2.OnSaveDataEventLoadCANCEL = function () { this.StartState(SystemPage.CHARACTER_SELECTION_STATE); }; v2.handleInput = function (details, pathToFocus) { var v3 = false; if (this.bRemapMode || this.bMenuClosing || this.bSavingSettings || this.iCurrentState == SystemPage.TRANSITIONING) { v3 = true; return v3; } if (Shared.GlobalFunc.IsKeyPressed(details, this.iCurrentState != SystemPage.INPUT_MAPPING_STATE)) { if (this.iCurrentState != SystemPage.OPTIONS_LISTS_STATE) { if (details.navEquivalent == gfx.ui.NavigationCode.RIGHT && this.iCurrentState == SystemPage.MAIN_STATE) { details.navEquivalent = gfx.ui.NavigationCode.ENTER; } else { if (details.navEquivalent == gfx.ui.NavigationCode.LEFT && this.iCurrentState != SystemPage.MAIN_STATE) { details.navEquivalent = gfx.ui.NavigationCode.TAB; } } } if ((details.navEquivalent == gfx.ui.NavigationCode.GAMEPAD_L2 || details.navEquivalent == gfx.ui.NavigationCode.GAMEPAD_R2) && this.isConfirming()) { v3 = true; return v3; } if ((details.navEquivalent == gfx.ui.NavigationCode.GAMEPAD_X || details.code == 88) && this.iCurrentState == SystemPage.SAVE_LOAD_STATE) { if (this.iPlatform == SystemPage.CONTROLLER_ORBIS) { gfx.io.GameDelegate.call('ORBISDeleteSave', []); } else { this.ConfirmDeleteSave(); } v3 = true; return v3; } if ((details.navEquivalent == gfx.ui.NavigationCode.GAMEPAD_Y || details.code == 84) && this.iCurrentState == SystemPage.SAVE_LOAD_STATE && !this.SaveLoadListHolder.isSaving) { this.StartState(SystemPage.CHARACTER_LOAD_STATE); v3 = true; return v3; } if ((details.navEquivalent == gfx.ui.NavigationCode.GAMEPAD_Y || details.code == 84) && (this.iCurrentState == SystemPage.OPTIONS_LISTS_STATE || this.iCurrentState == SystemPage.INPUT_MAPPING_STATE)) { this.ConfirmTextField.SetText('$Reset settings to default values?'); this.StartState(SystemPage.DEFAULT_SETTINGS_CONFIRM_STATE); v3 = true; return v3; } if (this.bShowKinectTunerButton && details.navEquivalent == gfx.ui.NavigationCode.GAMEPAD_R1 && this.iCurrentState == SystemPage.OPTIONS_LISTS_STATE) { gfx.io.GameDelegate.call('OpenKinectTuner', []); v3 = true; return v3; } if (!pathToFocus[0].handleInput(details, pathToFocus.slice(1))) { if (details.navEquivalent == gfx.ui.NavigationCode.ENTER) { v3 = this.onAcceptPress(); return v3; } if (details.navEquivalent == gfx.ui.NavigationCode.TAB) { v3 = this.onCancelPress(); } } } return v3; }; v2.onAcceptPress = function () { var v2 = true; switch (this.iCurrentState) { case SystemPage.CHARACTER_SELECTION_STATE: gfx.io.GameDelegate.call('PlaySound', ['UIMenuOK']); gfx.io.GameDelegate.call('CharacterSelected', [this.SaveLoadListHolder.selectedIndex]); return v2; case SystemPage.SAVE_LOAD_CONFIRM_STATE: case SystemPage.TRANSITIONING: if (this.SaveLoadListHolder.List_mc.disableSelection) { gfx.io.GameDelegate.call('PlaySound', ['UIMenuOK']); if (this.iPlatform == SystemPage.CONTROLLER_ORBIS) { if (this.SaveLoadListHolder.isSaving) { this.iSaveDelayTimerID = setInterval(this, 'DoSaveGame', 1); } else { gfx.io.GameDelegate.call('LoadGame', [this.SaveLoadListHolder.selectedIndex]); } } else { this.bMenuClosing = true; if (this.SaveLoadListHolder.isSaving) { this.ConfirmPanel._visible = false; if (this.iPlatform > 1) { this.ErrorText.SetText('$Saving content. Please don\'t turn off your console.'); } else { this.ErrorText.SetText('$Saving...'); } this.iSaveDelayTimerID = setInterval(this, 'DoSaveGame', 1); } else { gfx.io.GameDelegate.call('LoadGame', [this.SaveLoadListHolder.selectedIndex]); } } } return v2; case SystemPage.QUIT_CONFIRM_STATE: gfx.io.GameDelegate.call('PlaySound', ['UIMenuOK']); gfx.io.GameDelegate.call('QuitToMainMenu', []); this.bMenuClosing = true; return v2; case SystemPage.PC_QUIT_CONFIRM_STATE: if (this.PCQuitList.selectedIndex == 0) { gfx.io.GameDelegate.call('QuitToMainMenu', []); this.bMenuClosing = true; } else { if (this.PCQuitList.selectedIndex == 1) { gfx.io.GameDelegate.call('QuitToDesktop', []); } } return v2; case SystemPage.DELETE_SAVE_CONFIRM_STATE: this.SaveLoadListHolder.DeleteSelectedSave(); if (this.SaveLoadListHolder.numSaves == 0) { (this.GetPanelForState(SystemPage.SAVE_LOAD_STATE)).gotoAndStop(1); (this.GetPanelForState(SystemPage.DELETE_SAVE_CONFIRM_STATE)).gotoAndStop(1); this.__set__currentState(SystemPage.MAIN_STATE); this.SystemDivider.gotoAndStop('Right'); } else { this.EndState(); } return v2; case SystemPage.DEFAULT_SETTINGS_CONFIRM_STATE: gfx.io.GameDelegate.call('PlaySound', ['UIMenuOK']); if (this.ConfirmPanel.returnState == SystemPage.OPTIONS_LISTS_STATE) { this.ResetSettingsToDefaults(); } else { if (this.ConfirmPanel.returnState == SystemPage.INPUT_MAPPING_STATE) { this.ResetControlsToDefaults(); } } this.EndState(); return v2; } v2 = false; return v2; }; v2.onCancelPress = function () { var v2 = true; switch (this.iCurrentState) { case SystemPage.CHARACTER_LOAD_STATE: case SystemPage.CHARACTER_SELECTION_STATE: case SystemPage.SAVE_LOAD_STATE: this.SaveLoadListHolder.ForceStopLoading(); case SystemPage.PC_QUIT_LIST_STATE: case SystemPage.HELP_LIST_STATE: case SystemPage.SAVE_LOAD_CONFIRM_STATE: case SystemPage.QUIT_CONFIRM_STATE: case SystemPage.DEFAULT_SETTINGS_CONFIRM_STATE: case SystemPage.PC_QUIT_CONFIRM_STATE: case SystemPage.DELETE_SAVE_CONFIRM_STATE: gfx.io.GameDelegate.call('PlaySound', ['UIMenuCancel']); this.EndState(); return v2; case SystemPage.HELP_TEXT_STATE: gfx.io.GameDelegate.call('PlaySound', ['UIMenuCancel']); this.EndState(); this.StartState(SystemPage.HELP_LIST_STATE); this.HelpListPanel.bCloseToMainState = true; return v2; case SystemPage.OPTIONS_LISTS_STATE: gfx.io.GameDelegate.call('PlaySound', ['UIMenuCancel']); this.EndState(); this.StartState(SystemPage.SETTINGS_CATEGORY_STATE); this.SettingsPanel.bCloseToMainState = true; return v2; case SystemPage.INPUT_MAPPING_STATE: case SystemPage.SETTINGS_CATEGORY_STATE: gfx.io.GameDelegate.call('PlaySound', ['UIMenuCancel']); if (this.bSettingsChanged) { this.ErrorText.SetText('$Saving...'); this.bSavingSettings = true; if (this.iCurrentState == SystemPage.INPUT_MAPPING_STATE) { this.iSavingSettingsTimerID = setInterval(this, 'SaveControls', 1000); } else { if (this.iCurrentState == SystemPage.SETTINGS_CATEGORY_STATE) { this.iSavingSettingsTimerID = setInterval(this, 'SaveSettings', 1000); } } } else { this.onSettingsSaved(); } return v2; } v2 = false; return v2; }; v2.isConfirming = function () { return this.iCurrentState == SystemPage.SAVE_LOAD_CONFIRM_STATE || this.iCurrentState == SystemPage.QUIT_CONFIRM_STATE || this.iCurrentState == SystemPage.PC_QUIT_CONFIRM_STATE || this.iCurrentState == SystemPage.DELETE_SAVE_CONFIRM_STATE || this.iCurrentState == SystemPage.DEFAULT_SETTINGS_CONFIRM_STATE; }; v2.onAcceptMousePress = function () { if (this.isConfirming()) { this.onAcceptPress(); } }; v2.onCancelMousePress = function () { if (this.isConfirming()) { this.onCancelPress(); } }; v2.onCategoryButtonPress = function (event) { if (event.entry.disabled) { gfx.io.GameDelegate.call('PlaySound', ['UIMenuCancel']); return undefined; } if (this.iCurrentState == SystemPage.MAIN_STATE) { var v3 = event.index; if (!this._showModMenu && v3 >= SystemPage.MOD_MANAGER_BUTTON_INDEX) { ++v3; } switch (v3) { case 0: gfx.io.GameDelegate.call('PlaySound', ['UIMenuOK']); gfx.io.GameDelegate.call('QuickSave', []); break; case 1: gfx.io.GameDelegate.call('UseCurrentCharacterFilter', []); this.SaveLoadListHolder.isSaving = true; if (this.iPlatform == 3) { this.SaveLoadListHolder.PopulateEmptySaveList(); } else { gfx.io.GameDelegate.call('SAVE', [this.SaveLoadListHolder.List_mc.entryList, this.SaveLoadListHolder.batchSize]); } break; case 2: this.SaveLoadListHolder.isSaving = false; gfx.io.GameDelegate.call('LOAD', [this.SaveLoadListHolder.List_mc.entryList, this.SaveLoadListHolder.batchSize]); break; case 3: gfx.io.GameDelegate.call('ModManager', []); break; case 4: this.StartState(SystemPage.SETTINGS_CATEGORY_STATE); gfx.io.GameDelegate.call('PlaySound', ['UIMenuOK']); break; case 5: _root.QuestJournalFader.Menu_mc.ConfigPanelOpen(); break; case 6: if (this.MappingList.entryList.length == 0) { this.requestInputMappings(); } this.StartState(SystemPage.INPUT_MAPPING_STATE); gfx.io.GameDelegate.call('PlaySound', ['UIMenuOK']); break; case 7: if (this.HelpList.entryList.length == 0) { gfx.io.GameDelegate.call('PopulateHelpTopics', [this.HelpList.entryList]); this.HelpList.entryList.sort(this.doABCSort); this.HelpList.InvalidateData(); } if (this.HelpList.entryList.length == 0) { gfx.io.GameDelegate.call('PlaySound', ['UIMenuCancel']); } else { this.StartState(SystemPage.HELP_LIST_STATE); gfx.io.GameDelegate.call('PlaySound', ['UIMenuOK']); } break; case 8: gfx.io.GameDelegate.call('PlaySound', ['UIMenuOK']); gfx.io.GameDelegate.call('RequestIsOnPC', [], this, 'populateQuitList'); break; default: gfx.io.GameDelegate.call('PlaySound', ['UIMenuCancel']); } } }; v2.onCategoryListPress = function (event) { if (!this.bRemapMode && !this.bMenuClosing && !this.bSavingSettings && this.iCurrentState != SystemPage.TRANSITIONING) { this.onCancelPress(); this.CategoryList.disableSelection = false; this.CategoryList.UpdateList(); this.CategoryList.disableSelection = true; } }; v2.doABCSort = function (aObj1, aObj2) { if (aObj1.text < aObj2.text) { return -1; } if (aObj1.text > aObj2.text) { return 1; } return 0; }; v2.onCategoryListMoveUp = function (event) { gfx.io.GameDelegate.call('PlaySound', ['UIMenuFocus']); if (event.scrollChanged == true) { this.CategoryList._parent.gotoAndPlay('moveUp'); } }; v2.onCategoryListMoveDown = function (event) { gfx.io.GameDelegate.call('PlaySound', ['UIMenuFocus']); if (event.scrollChanged == true) { this.CategoryList._parent.gotoAndPlay('moveDown'); } }; v2.onCategoryListMouseSelectionChange = function (event) { if (event.keyboardOrMouse == 0 && event.index != -1) { gfx.io.GameDelegate.call('PlaySound', ['UIMenuFocus']); } }; v2.OnCharacterSelected = function () { if (this.iPlatform != 3) { this.StartState(SystemPage.SAVE_LOAD_STATE); } }; v2.OnSaveListCharactersOpenSuccess = function () { if (this.SaveLoadListHolder.numSaves > 0) { gfx.io.GameDelegate.call('PlaySound', ['UIMenuOK']); this.StartState(SystemPage.CHARACTER_SELECTION_STATE); } else { gfx.io.GameDelegate.call('PlaySound', ['UIMenuCancel']); } }; v2.OnSaveListOpenSuccess = function () { if (this.SaveLoadListHolder.numSaves > 0) { gfx.io.GameDelegate.call('PlaySound', ['UIMenuOK']); this.StartState(SystemPage.SAVE_LOAD_STATE); } else { this.StartState(SystemPage.CHARACTER_LOAD_STATE); } }; v2.OnSaveListBatchAdded = function () {}; v2.ConfirmSaveGame = function (event) { this.SaveLoadListHolder.List_mc.disableSelection = true; if (this.iCurrentState == SystemPage.SAVE_LOAD_STATE) { if (event.index == 0) { this.iCurrentState = SystemPage.SAVE_LOAD_CONFIRM_STATE; this.onAcceptPress(); } else { this.ConfirmTextField.SetText('$Save over this game?'); this.StartState(SystemPage.SAVE_LOAD_CONFIRM_STATE); gfx.io.GameDelegate.call('PlaySound', ['UIMenuOK']); } } }; v2.DoSaveGame = function () { clearInterval(this.iSaveDelayTimerID); gfx.io.GameDelegate.call('SaveGame', [this.SaveLoadListHolder.selectedIndex]); if (this.iPlatform != SystemPage.CONTROLLER_ORBIS) { this._parent._parent.CloseMenu(); } }; v2.onSaveHighlight = function (event) { if (this.iCurrentState == SystemPage.SAVE_LOAD_STATE && !this.SaveLoadListHolder.isShowingCharacterList) { if (this._deleteButton != null) { this._deleteButton._alpha = (event.index == -1) ? 50 : 100; } if (this.iPlatform == 0) { gfx.io.GameDelegate.call('PlaySound', ['UIMenuFocus']); } } }; v2.onSaveLoadListPress = function () { this.onAcceptPress(); }; v2.ConfirmLoadGame = function (event) { this.SaveLoadListHolder.List_mc.disableSelection = true; if (this.iCurrentState == SystemPage.SAVE_LOAD_STATE) { this.ConfirmTextField.SetText('$Load this game? All unsaved progress will be lost.'); this.StartState(SystemPage.SAVE_LOAD_CONFIRM_STATE); gfx.io.GameDelegate.call('PlaySound', ['UIMenuOK']); } }; v2.ConfirmDeleteSave = function () { if (!this.SaveLoadListHolder.isSaving || this.SaveLoadListHolder.selectedIndex != 0) { this.SaveLoadListHolder.List_mc.disableSelection = true; if (this.iCurrentState == SystemPage.SAVE_LOAD_STATE) { this.ConfirmTextField.SetText('$Delete this save?'); this.StartState(SystemPage.DELETE_SAVE_CONFIRM_STATE); } } }; v2.onSettingsCategoryPress = function () { var v2 = this.OptionsListsPanel.OptionsLists.List_mc; switch (this.SettingsList.selectedIndex) { case 0: v2.entryList = [{'text': '$Invert Y', 'movieType': 2}, {'text': '$Look Sensitivity', 'movieType': 0}, {'text': '$Vibration', 'movieType': 2}, {'text': '$360 Controller', 'movieType': 2}, {'text': '$Survival Mode', 'movieType': 2}, {'text': '$Difficulty', 'movieType': 1, 'options': ['$Very Easy', '$Easy', '$Normal', '$Hard', '$Very Hard', '$Legendary']}, {'text': '$Show Floating Markers', 'movieType': 2}, {'text': '$Save on Rest', 'movieType': 2}, {'text': '$Save on Wait', 'movieType': 2}, {'text': '$Save on Travel', 'movieType': 2}, {'text': '$Save on Pause', 'movieType': 1, 'options': ['$5 Mins', '$10 Mins', '$15 Mins', '$30 Mins', '$45 Mins', '$60 Mins', '$Disabled']}, {'text': '$Use Kinect Commands', 'movieType': 2}]; gfx.io.GameDelegate.call('RequestGameplayOptions', [v2.entryList]); break; case 1: v2.entryList = [{'text': '$Brightness', 'movieType': 0}, {'text': '$HUD Opacity', 'movieType': 0}, {'text': '$Actor Fade', 'movieType': 0}, {'text': '$Item Fade', 'movieType': 0}, {'text': '$Object Fade', 'movieType': 0}, {'text': '$Grass Fade', 'movieType': 0}, {'text': '$Shadow Fade', 'movieType': 0}, {'text': '$Light Fade', 'movieType': 0}, {'text': '$Specularity Fade', 'movieType': 0}, {'text': '$Tree LOD Fade', 'movieType': 0}, {'text': '$Crosshair', 'movieType': 2}, {'text': '$Dialogue Subtitles', 'movieType': 2}, {'text': '$General Subtitles', 'movieType': 2}, {'text': '$DDOF Intensity', 'movieType': 0}]; gfx.io.GameDelegate.call('RequestDisplayOptions', [v2.entryList]); break; case 2: v2.entryList = [{'text': '$Master', 'movieType': 0}]; gfx.io.GameDelegate.call('RequestAudioOptions', [v2.entryList]); for (var v3 in v2.entryList) { v2.entryList[v3].movieType = 0; } } var v3 = 0; while (v3 < v2.entryList.length) { if (v2.entryList[v3].ID == undefined) { v2.entryList.splice(v3, 1); } else { ++v3; } } if (this.iPlatform != 0) { v2.selectedIndex = 0; } v2.InvalidateData(); this.SettingsPanel.bCloseToMainState = false; this.EndState(); this.StartState(SystemPage.OPTIONS_LISTS_STATE); gfx.io.GameDelegate.call('PlaySound', ['UIMenuOK']); this.bSettingsChanged = true; }; v2.ResetSettingsToDefaults = function () { var v2 = this.OptionsListsPanel.OptionsLists.List_mc; for (var v3 in v2.entryList) { if (v2.entryList[v3].defaultVal != undefined) { v2.entryList[v3].value = v2.entryList[v3].defaultVal; gfx.io.GameDelegate.call('OptionChange', [v2.entryList[v3].ID, v2.entryList[v3].value]); } } v2.bAllowValueOverwrite = true; v2.UpdateList(); v2.bAllowValueOverwrite = false; }; v2.onInputMappingPress = function (event) { if (this.bRemapMode == false && this.iCurrentState == SystemPage.INPUT_MAPPING_STATE) { this.MappingList.disableSelection = true; this.bRemapMode = true; this.ErrorText.SetText('$Press a button to map to this action.'); gfx.io.GameDelegate.call('PlaySound', ['UIMenuPrevNext']); gfx.io.GameDelegate.call('StartRemapMode', [event.entry.text, this.MappingList.entryList]); } }; v2.onFinishRemapMode = function (abSuccess) { if (abSuccess) { this.HideErrorText(); this.MappingList.entryList.sort(this.inputMappingSort); this.MappingList.UpdateList(); this.bSettingsChanged = true; gfx.io.GameDelegate.call('PlaySound', ['UIMenuFocus']); } else { this.ErrorText.SetText('$That button is reserved.'); gfx.io.GameDelegate.call('PlaySound', ['UIMenuCancel']); this.iHideErrorTextID = setInterval(this, 'HideErrorText', 1000); } this.MappingList.disableSelection = false; this.iDebounceRemapModeID = setInterval(this, 'ClearRemapMode', 200); }; v2.inputMappingSort = function (a_obj1, a_obj2) { if (a_obj1.sortIndex < a_obj2.sortIndex) { return -1; } if (a_obj1.sortIndex > a_obj2.sortIndex) { return 1; } return 0; }; v2.HideErrorText = function () { if (this.iHideErrorTextID != undefined) { clearInterval(this.iHideErrorTextID); } this.ErrorText.SetText(' '); }; v2.ClearRemapMode = function () { if (this.iDebounceRemapModeID != undefined) { clearInterval(this.iDebounceRemapModeID); delete this.iDebounceRemapModeID; } this.bRemapMode = false; }; v2.ResetControlsToDefaults = function () { gfx.io.GameDelegate.call('ResetControlsToDefaults', [this.MappingList.entryList]); this.requestInputMappings(true); this.bSettingsChanged = true; }; v2.onHelpItemPress = function () { gfx.io.GameDelegate.call('RequestHelpText', [this.HelpList.selectedEntry.index, this.HelpTitleText, this.HelpText]); this.ApplyHelpTextButtonArt(); this.HelpListPanel.bCloseToMainState = false; this.EndState(); this.StartState(SystemPage.HELP_TEXT_STATE); }; v2.ApplyHelpTextButtonArt = function () { var v2 = this.HelpButtonHolder.CreateButtonArt(this.HelpText.textField); if (v2 != undefined) { this.HelpText.htmlText = v2; } }; v2.populateQuitList = function (abOnPC) { if (abOnPC) { if (this.iPlatform != 0) { this.PCQuitList.selectedIndex = 0; } this.StartState(SystemPage.PC_QUIT_LIST_STATE); return undefined; } this.ConfirmTextField.textAutoSize = 'shrink'; this.ConfirmTextField.SetText('$Quit to main menu? Any unsaved progress will be lost.'); this.StartState(SystemPage.QUIT_CONFIRM_STATE); }; v2.onPCQuitButtonPress = function (event) { if (this.iCurrentState == SystemPage.PC_QUIT_LIST_STATE) { this.PCQuitList.disableSelection = true; if (event.index == 0) { this.ConfirmTextField.textAutoSize = 'shrink'; this.ConfirmTextField.SetText('$Quit to main menu? Any unsaved progress will be lost.'); } else { if (event.index == 1) { this.ConfirmTextField.textAutoSize = 'shrink'; this.ConfirmTextField.SetText('$Quit to desktop? Any unsaved progress will be lost.'); } } this.StartState(SystemPage.PC_QUIT_CONFIRM_STATE); } }; v2.SaveControls = function () { clearInterval(this.iSavingSettingsTimerID); gfx.io.GameDelegate.call('SaveControls', []); }; v2.SaveSettings = function () { clearInterval(this.iSavingSettingsTimerID); gfx.io.GameDelegate.call('SaveSettings', []); }; v2.onSettingsSaved = function () { this.bSavingSettings = false; this.bSettingsChanged = false; this.ErrorText.SetText(' '); this.EndState(); }; v2.RefreshSystemButtons = function () { if (this._showModMenu) { gfx.io.GameDelegate.call('SetSaveDisabled', [this.CategoryList.entryList[0], this.CategoryList.entryList[1], this.CategoryList.entryList[2], this.CategoryList.entryList[4], this.CategoryList.entryList[6], this.CategoryList.entryList[8], true]); } else { gfx.io.GameDelegate.call('SetSaveDisabled', [this.CategoryList.entryList[0], this.CategoryList.entryList[1], this.CategoryList.entryList[2], this.CategoryList.entryList[3], this.CategoryList.entryList[5], this.CategoryList.entryList[7], true]); } this.CategoryList.UpdateList(); }; v2.StartState = function (aiState) { this.BottomBar_mc.buttonPanel.clearButtons(); switch (aiState) { case SystemPage.CHARACTER_LOAD_STATE: this.SaveLoadListHolder.isShowingCharacterList = true; this.SystemDivider.gotoAndStop('Left'); gfx.io.GameDelegate.call('PopulateCharacterList', [this.SaveLoadListHolder.List_mc.entryList, this.SaveLoadListHolder.batchSize]); break; case SystemPage.CHARACTER_SELECTION_STATE: this.BottomBar_mc.buttonPanel.addButton({'text': '$Cancel', 'controls': this._cancelControls}); break; case SystemPage.SAVE_LOAD_STATE: this.SaveLoadListHolder.isShowingCharacterList = false; this.SystemDivider.gotoAndStop('Left'); this._deleteButton = this.BottomBar_mc.buttonPanel.addButton({'text': '$Delete', 'controls': this._deleteControls}); if (this.SaveLoadListHolder.isSaving == false) { this.BottomBar_mc.buttonPanel.addButton({'text': '$CharacterSelection', 'controls': this._characterSelectionControls}); } this.BottomBar_mc.buttonPanel.addButton({'text': '$Cancel', 'controls': this._cancelControls}); this.BottomBar_mc.buttonPanel.updateButtons(true); break; case SystemPage.INPUT_MAPPING_STATE: this.SystemDivider.gotoAndStop('Left'); if (this.bIsRemoteDevice) { this.bDefaultButtonVisible = false; } else { this.BottomBar_mc.buttonPanel.addButton({'text': '$Defaults', 'controls': this._defaultControls}); this.bDefaultButtonVisible = true; } this.BottomBar_mc.buttonPanel.addButton({'text': '$Cancel', 'controls': this._cancelControls}); this.BottomBar_mc.buttonPanel.updateButtons(true); break; case SystemPage.OPTIONS_LISTS_STATE: this.BottomBar_mc.buttonPanel.addButton({'text': '$Defaults', 'controls': this._defaultControls}); if (aiState == SystemPage.OPTIONS_LISTS_STATE && this.bShowKinectTunerButton && this.iPlatform == 2 && this.SettingsList.selectedIndex == 0) { this.BottomBar_mc.buttonPanel.addButton({'text': '$Kinect Tuner', 'controls': this._kinectControls}); } this.BottomBar_mc.buttonPanel.addButton({'text': '$Cancel', 'controls': this._cancelControls}); this.BottomBar_mc.buttonPanel.updateButtons(true); break; case SystemPage.HELP_TEXT_STATE: case SystemPage.HELP_LIST_STATE: case SystemPage.SETTINGS_CATEGORY_STATE: this.BottomBar_mc.buttonPanel.addButton({'text': '$Cancel', 'controls': this._cancelControls}); this.BottomBar_mc.buttonPanel.updateButtons(true); this.SystemDivider.gotoAndStop('Left'); break; case SystemPage.SAVE_LOAD_CONFIRM_STATE: case SystemPage.QUIT_CONFIRM_STATE: case SystemPage.PC_QUIT_CONFIRM_STATE: case SystemPage.DELETE_SAVE_CONFIRM_STATE: case SystemPage.DEFAULT_SETTINGS_CONFIRM_STATE: this.ConfirmPanel.confirmType = aiState; this.ConfirmPanel.returnState = this.iCurrentState; } this.iCurrentState = SystemPage.TRANSITIONING; (this.GetPanelForState(aiState)).gotoAndPlay('start'); }; v2.EndState = function () { this.BottomBar_mc.buttonPanel.clearButtons(); switch (this.iCurrentState) { case SystemPage.CHARACTER_LOAD_STATE: case SystemPage.CHARACTER_SELECTION_STATE: case SystemPage.SAVE_LOAD_STATE: case SystemPage.INPUT_MAPPING_STATE: case SystemPage.HELP_TEXT_STATE: if (this.iPlatform != SystemPage.CONTROLLER_ORBIS) { this.SystemDivider.gotoAndStop('Right'); } break; break; case SystemPage.OPTIONS_LISTS_STATE: case SystemPage.HELP_LIST_STATE: this.HelpList.disableInput = true; if (this.HelpListPanel.bCloseToMainState != false) { this.SystemDivider.gotoAndStop('Right'); } break; case SystemPage.SETTINGS_CATEGORY_STATE: this.SettingsList.disableInput = true; if (this.SettingsPanel.bCloseToMainState != false) { this.SystemDivider.gotoAndStop('Right'); } break; case SystemPage.PC_QUIT_LIST_STATE: this.SystemDivider.gotoAndStop('Right'); } if (this.iCurrentState != SystemPage.MAIN_STATE) { (this.GetPanelForState(this.iCurrentState)).gotoAndPlay('end'); this.iCurrentState = SystemPage.TRANSITIONING; } }; v2.GetPanelForState = function (aiState) { switch (aiState) { case SystemPage.MAIN_STATE: return this.PanelRect; case SystemPage.SETTINGS_CATEGORY_STATE: return this.SettingsPanel; case SystemPage.OPTIONS_LISTS_STATE: return this.OptionsListsPanel; case SystemPage.INPUT_MAPPING_STATE: return this.InputMappingPanel; case SystemPage.CHARACTER_LOAD_STATE: case SystemPage.CHARACTER_SELECTION_STATE: case SystemPage.SAVE_LOAD_STATE: return this.SaveLoadPanel; case SystemPage.SAVE_LOAD_CONFIRM_STATE: case SystemPage.PC_QUIT_CONFIRM_STATE: case SystemPage.QUIT_CONFIRM_STATE: case SystemPage.DELETE_SAVE_CONFIRM_STATE: case SystemPage.DEFAULT_SETTINGS_CONFIRM_STATE: return this.ConfirmPanel; case SystemPage.PC_QUIT_LIST_STATE: return this.PCQuitPanel; case SystemPage.HELP_LIST_STATE: return this.HelpListPanel; case SystemPage.HELP_TEXT_STATE: return this.HelpTextPanel; } }; v2.UpdateStateFocus = function (aiNewState) { this.CategoryList.disableSelection = aiNewState != SystemPage.MAIN_STATE; switch (aiNewState) { case SystemPage.MAIN_STATE: (gfx.managers.FocusHandler.__get__instance()).setFocus(this.CategoryList, 0); break; case SystemPage.SETTINGS_CATEGORY_STATE: this.SettingsList.disableInput = false; (gfx.managers.FocusHandler.__get__instance()).setFocus(this.SettingsList, 0); break; case SystemPage.OPTIONS_LISTS_STATE: (gfx.managers.FocusHandler.__get__instance()).setFocus(this.OptionsListsPanel.OptionsLists.List_mc, 0); break; case SystemPage.INPUT_MAPPING_STATE: (gfx.managers.FocusHandler.__get__instance()).setFocus(this.MappingList, 0); break; case SystemPage.SAVE_LOAD_STATE: case SystemPage.CHARACTER_LOAD_STATE: case SystemPage.CHARACTER_SELECTION_STATE: (gfx.managers.FocusHandler.__get__instance()).setFocus(this.SaveLoadListHolder.List_mc, 0); this.SaveLoadListHolder.List_mc.disableSelection = false; break; case SystemPage.SAVE_LOAD_CONFIRM_STATE: case SystemPage.QUIT_CONFIRM_STATE: case SystemPage.PC_QUIT_CONFIRM_STATE: case SystemPage.DELETE_SAVE_CONFIRM_STATE: case SystemPage.DEFAULT_SETTINGS_CONFIRM_STATE: (gfx.managers.FocusHandler.__get__instance()).setFocus(this.ConfirmPanel, 0); break; case SystemPage.PC_QUIT_LIST_STATE: (gfx.managers.FocusHandler.__get__instance()).setFocus(this.PCQuitList, 0); this.PCQuitList.disableSelection = false; break; case SystemPage.HELP_LIST_STATE: this.HelpList.disableInput = false; (gfx.managers.FocusHandler.__get__instance()).setFocus(this.HelpList, 0); break; case SystemPage.HELP_TEXT_STATE: (gfx.managers.FocusHandler.__get__instance()).setFocus(this.HelpText, 0); } }; v2.SetPlatform = function (a_platform, a_bPS3Switch) { this.BottomBar_mc.SetPlatform(a_platform, a_bPS3Switch); this.CategoryList.SetPlatform(a_platform, a_bPS3Switch); if (a_platform != 0) { this.SettingsList.selectedIndex = 0; this.PCQuitList.selectedIndex = 0; this.HelpList.selectedIndex = 0; this.MappingList.selectedIndex = 0; this._deleteControls = {'keyCode': 278}; this._defaultControls = {'keyCode': 279}; this._kinectControls = {'keyCode': 275}; this._acceptControls = {'keyCode': 276}; this._cancelControls = {'keyCode': 277}; this._characterSelectionControls = {'keyCode': 279}; } else { this._deleteControls = {'keyCode': 45}; this._defaultControls = {'keyCode': 20}; this._kinectControls = {'keyCode': 37}; this._acceptControls = {'keyCode': 28}; this._cancelControls = {'keyCode': 15}; this._characterSelectionControls = {'keyCode': 20}; } this.ConfirmPanel.buttonPanel.clearButtons(); this._acceptButton = this.ConfirmPanel.buttonPanel.addButton({'text': '$Yes', 'controls': this._acceptControls}); this._acceptButton.addEventListener('click', this, 'onAcceptMousePress'); this._cancelButton = this.ConfirmPanel.buttonPanel.addButton({'text': '$No', 'controls': this._cancelControls}); this._cancelButton.addEventListener('click', this, 'onCancelMousePress'); this.ConfirmPanel.buttonPanel.updateButtons(true); this.iPlatform = a_platform; this.SaveLoadListHolder.platform = a_platform; this.requestInputMappings(); }; v2.BackOutFromLoadGame = function () { this.bMenuClosing = false; this.onCancelPress(); }; v2.SetShouldShowKinectTunerOption = function (abFlag) { this.bShowKinectTunerButton = abFlag == true; }; v2.SetRemoteDevice = function (abISRemoteDevice) { this.bIsRemoteDevice = abISRemoteDevice; if (this.bIsRemoteDevice) { this.MappingList.entryList.clear(); } }; v2.UpdatePermissions = function () { if (this._showModMenu) { gfx.io.GameDelegate.call('SetSaveDisabled', [this.CategoryList.entryList[0], this.CategoryList.entryList[1], this.CategoryList.entryList[2], this.CategoryList.entryList[4], this.CategoryList.entryList[6], this.CategoryList.entryList[8], false]); this.CategoryList.entryList[7].disabled = false; } else { gfx.io.GameDelegate.call('SetSaveDisabled', [this.CategoryList.entryList[0], this.CategoryList.entryList[1], this.CategoryList.entryList[2], this.CategoryList.entryList[3], this.CategoryList.entryList[5], this.CategoryList.entryList[7], false]); this.CategoryList.entryList[6].disabled = false; } this.CategoryList.UpdateList(); }; v2.requestInputMappings = function (a_updateOnly) { this.MappingList.entryList.splice(0); gfx.io.GameDelegate.call('RequestInputMappings', [this.MappingList.entryList]); this.MappingList.entryList.sort(this.inputMappingSort); if (a_updateOnly) { this.MappingList.UpdateList(); } else { this.MappingList.InvalidateData(); } }; v1.MAIN_STATE = 0; v1.SAVE_LOAD_STATE = 1; v1.SAVE_LOAD_CONFIRM_STATE = 2; v1.SETTINGS_CATEGORY_STATE = 3; v1.OPTIONS_LISTS_STATE = 4; v1.DEFAULT_SETTINGS_CONFIRM_STATE = 5; v1.INPUT_MAPPING_STATE = 6; v1.QUIT_CONFIRM_STATE = 7; v1.PC_QUIT_LIST_STATE = 8; v1.PC_QUIT_CONFIRM_STATE = 9; v1.DELETE_SAVE_CONFIRM_STATE = 10; v1.HELP_LIST_STATE = 11; v1.HELP_TEXT_STATE = 12; v1.TRANSITIONING = 13; v1.CHARACTER_LOAD_STATE = 14; v1.CHARACTER_SELECTION_STATE = 15; v1.MOD_MANAGER_BUTTON_INDEX = 3; v1.CONTROLLER_ORBIS = 3; v2.addProperty('currentState', v2.__get__currentState, v2.__set__currentState); ASSetPropFlags(_global.SystemPage.prototype, null, 1); } #endinitclip } movieClip 321 __Packages.Shared.ButtonTextArtHolder { #initclip if (!_global.Shared) { _global.Shared = new Object(); } if (!_global.Shared.ButtonTextArtHolder) { var v1 = function () { super(); }; Shared.ButtonTextArtHolder = v1; Shared.ButtonTextArtHolder extends MovieClip; var v2 = v1.prototype; v2.SetButtonName = function (aText) { this.strButtonName = aText; }; v2.CreateButtonArt = function (aInputText) { var v6 = aInputText.text.indexOf('['); var v3 = (v6 == -1) ? -1 : aInputText.text.indexOf(']', v6); var v2; if (v6 != -1 && v3 != -1) { v2 = aInputText.text.substr(0, v6); for (;;) { if (!(v6 != -1 && v3 != -1)) break; var v11 = aInputText.text.substring(v6 + 1, v3); gfx.io.GameDelegate.call('GetButtonFromUserEvent', [v11], this, 'SetButtonName'); if (this.strButtonName == undefined) { v2 += aInputText.text.substring(v6, v3 + 1); } else { var v7 = flash.display.BitmapData.loadBitmap(this.strButtonName + '.png'); if (v7 != undefined && v7.height > 0) { var v8 = 26; var v10 = Math.floor((v8 / v7.height) * v7.width); v2 += '<img src=\'' + this.strButtonName + '.png\' vspace=\'-5\' height=\'' + v8 + '\' width=\'' + v10 + '\'>'; } else { v2 += aInputText.text.substring(v6, v3 + 1); } } var v5 = aInputText.text.indexOf('[', v3); var v9 = (v5 == -1) ? -1 : aInputText.text.indexOf(']', v5); if (v5 != -1 && v9 != -1) { v2 += aInputText.text.substring(v3 + 1, v5); } else { v2 += aInputText.text.substr(v3 + 1); } v6 = v5; v3 = v9; } } return v2; }; ASSetPropFlags(Shared.ButtonTextArtHolder.prototype, null, 1); } #endinitclip } movieClip 322 __Packages.gfx.io.GameDelegate { #initclip if (!_global.gfx) { _global.gfx = new Object(); } if (!_global.gfx.io) { _global.gfx.io = new Object(); } if (!_global.gfx.io.GameDelegate) { var v1 = function () {}; gfx.io.GameDelegate = v1; var v2 = v1.prototype; v1.call = function (methodName, params, scope, callBack) { if (!gfx.io.GameDelegate.initialized) { gfx.io.GameDelegate.initialize(); } var v1 = gfx.io.GameDelegate.nextID; gfx.io.GameDelegate.responseHash[v1] = [scope, callBack]; params.unshift(methodName, v1); flash.external.ExternalInterface.call.apply(null, params); delete gfx.io.GameDelegate.responseHash[v1]; }; v1.receiveResponse = function (uid) { var v2 = gfx.io.GameDelegate.responseHash[uid]; if (v2 == null) { return undefined; } var v3 = v2[0]; var v4 = v2[1]; v3[v4].apply(v3, arguments.slice(1)); }; v1.addCallBack = function (methodName, scope, callBack) { if (!gfx.io.GameDelegate.initialized) { gfx.io.GameDelegate.initialize(); } gfx.io.GameDelegate.callBackHash[methodName] = [scope, callBack]; }; v1.removeCallBack = function (methodName) { gfx.io.GameDelegate.callBackHash[methodName] = null; }; v1.receiveCall = function (methodName) { var v2 = gfx.io.GameDelegate.callBackHash[methodName]; if (v2 == null) { return undefined; } var v3 = v2[0]; var v4 = v2[1]; v3[v4].apply(v3, arguments.slice(1)); }; v1.initialize = function () { gfx.io.GameDelegate.initialized = true; flash.external.ExternalInterface.addCallback('call', gfx.io.GameDelegate, gfx.io.GameDelegate.receiveCall); flash.external.ExternalInterface.addCallback('respond', gfx.io.GameDelegate, gfx.io.GameDelegate.receiveResponse); }; v1.responseHash = {}; v1.callBackHash = {}; v1.nextID = 0; v1.initialized = false; ASSetPropFlags(gfx.io.GameDelegate.prototype, null, 1); } #endinitclip } movieClip 323 __Packages.Shared.GlobalFunc { #initclip if (!_global.Shared) { _global.Shared = new Object(); } if (!_global.Shared.GlobalFunc) { var v1 = function () {}; Shared.GlobalFunc = v1; var v2 = v1.prototype; v1.Lerp = function (aTargetMin, aTargetMax, aSourceMin, aSourceMax, aSource, abClamp) { var v1 = aTargetMin + ((aSource - aSourceMin) / (aSourceMax - aSourceMin)) * (aTargetMax - aTargetMin); if (abClamp) { v1 = Math.min(Math.max(v1, aTargetMin), aTargetMax); } return v1; }; v1.IsKeyPressed = function (aInputInfo, abProcessKeyHeldDown) { if (abProcessKeyHeldDown == undefined) { abProcessKeyHeldDown = true; } return aInputInfo.value == 'keyDown' || abProcessKeyHeldDown && aInputInfo.value == 'keyHold'; }; v1.RoundDecimal = function (aNumber, aPrecision) { var v1 = Math.pow(10, aPrecision); return Math.round(v1 * aNumber) / v1; }; v1.MaintainTextFormat = function () { TextField.prototype.SetText = function (aText, abHTMLText) { if (aText == undefined || aText == '') { aText = ' '; } var v2 = this.getTextFormat(); if (abHTMLText) { var v4 = v2.letterSpacing; var v5 = v2.kerning; this.htmlText = aText; v2 = this.getTextFormat(); v2.letterSpacing = v4; v2.kerning = v5; this.setTextFormat(v2); return undefined; } this.text = aText; this.setTextFormat(v2); return undefined; }; _global.ASSetPropFlags(TextField.prototype, 'SetText', 1, 0); }; v1.SetLockFunction = function () { MovieClip.prototype.Lock = function (aPosition) { var v3 = {'x': Stage.visibleRect.x + Stage.safeRect.x, 'y': Stage.visibleRect.y + Stage.safeRect.y}; var v4 = {'x': Stage.visibleRect.x + Stage.visibleRect.width - Stage.safeRect.x, 'y': Stage.visibleRect.y + Stage.visibleRect.height - Stage.safeRect.y}; this._parent.globalToLocal(v3); this._parent.globalToLocal(v4); if (aPosition == 'T' || aPosition == 'TL' || aPosition == 'TR') { this._y = v3.y; } if (aPosition == 'B' || aPosition == 'BL' || aPosition == 'BR') { this._y = v4.y; } if (aPosition == 'L' || aPosition == 'TL' || aPosition == 'BL') { this._x = v3.x; } if (aPosition == 'R' || aPosition == 'TR' || aPosition == 'BR') { this._x = v4.x; } }; _global.ASSetPropFlags(MovieClip.prototype, 'Lock', 1, 0); }; v1.AddMovieExploreFunctions = function () { MovieClip.prototype.getMovieClips = function () { var v3 = new Array(); var v2 = 0; while (v2 < this.length) { if (this[v2] instanceof MovieClip && this[v2] != this) { v3.push(this[v2]); } ++v2; } return v3; }; MovieClip.prototype.showMovieClips = function () { var v2 = 0; while (v2 < this.length) { if (this[v2] instanceof MovieClip && this[v2] != this) { trace(this[v2]); this[v2].showMovieClips(); } ++v2; } }; _global.ASSetPropFlags(MovieClip.prototype, ['getMovieClips', 'showMovieClips'], 1, 0); }; v1.AddReverseFunctions = function () { MovieClip.prototype.PlayReverse = function () { if (this._currentframe > 1) { this.gotoAndStop(this._currentframe - 1); this.onEnterFrame = function () { if (this._currentframe > 1) { this.gotoAndStop(this._currentframe - 1); return undefined; } delete this.onEnterFrame; }; return undefined; } this.gotoAndStop(1); }; MovieClip.prototype.PlayForward = function (aFrameLabel) { delete this.onEnterFrame; this.gotoAndPlay(aFrameLabel); }; MovieClip.prototype.PlayForward = function (aFrame) { delete this.onEnterFrame; this.gotoAndPlay(aFrame); }; _global.ASSetPropFlags(MovieClip.prototype, ['PlayReverse', 'PlayForward'], 1, 0); }; v1.GetTextField = function (aParentClip, aName) { if (Shared.GlobalFunc.RegisteredTextFields[aName + aParentClip._name] != undefined) { return Shared.GlobalFunc.RegisteredTextFields[aName + aParentClip._name]; } trace(aName + ' is not registered a TextField name.'); }; v1.GetMovieClip = function (aParentClip, aName) { if (Shared.GlobalFunc.RegisteredMovieClips[aName + aParentClip._name] != undefined) { return Shared.GlobalFunc.RegisteredMovieClips[aName + aParentClip._name]; } trace(aName + ' is not registered a MovieClip name.'); }; v1.AddRegisterTextFields = function () { TextField.prototype.RegisterTextField = function (aStartingClip) { if (Shared.GlobalFunc.RegisteredTextFields[this._name + aStartingClip._name] == undefined) { Shared.GlobalFunc.RegisteredTextFields[this._name + aStartingClip._name] = this; } }; _global.ASSetPropFlags(TextField.prototype, 'RegisterTextField', 1, 0); }; v1.RegisterTextFields = function (aStartingClip) { var v1 = 0; while (v1 < aStartingClip.length) { if (aStartingClip[v1] instanceof TextField) { aStartingClip[v1].RegisterTextField(aStartingClip); } ++v1; } }; v1.RegisterAllTextFieldsInTimeline = function (aStartingClip) { var v1 = 1; for (;;) { if (!(aStartingClip._totalFrames && v1 <= aStartingClip._totalFrames)) break; aStartingClip.gotoAndStop(v1); Shared.GlobalFunc.RegisterTextFields(aStartingClip); ++v1; } }; v1.AddRegisterMovieClips = function () { MovieClip.prototype.RegisterMovieClip = function (aStartingClip) { if (Shared.GlobalFunc.RegisteredMovieClips[this._name + aStartingClip._name] == undefined) { Shared.GlobalFunc.RegisteredMovieClips[this._name + aStartingClip._name] = this; } }; _global.ASSetPropFlags(MovieClip.prototype, 'RegisterMovieClip', 1, 0); }; v1.RegisterMovieClips = function (aStartingClip) { var v1 = 0; while (v1 < aStartingClip.length) { if (aStartingClip[v1] instanceof MovieClip) { aStartingClip[v1].RegisterMovieClip(aStartingClip); } ++v1; } }; v1.RecursiveRegisterMovieClips = function (aStartingClip, aRootClip) { var v1 = 0; while (v1 < aStartingClip.length) { if (aStartingClip[v1] instanceof MovieClip) { if (aStartingClip[v1] != aStartingClip) { Shared.GlobalFunc.RecursiveRegisterMovieClips(aStartingClip[v1], aRootClip); } aStartingClip[v1].RegisterMovieClip(aRootClip); } ++v1; } }; v1.RegisterAllMovieClipsInTimeline = function (aStartingClip) { var v1 = 0; for (;;) { if (!(aStartingClip._totalFrames && v1 <= aStartingClip._totalFrames)) break; aStartingClip.gotoAndStop(v1); Shared.GlobalFunc.RegisterMovieClips(aStartingClip); ++v1; } }; v1.StringTrim = function (astrText) { var v2 = 0; var v1 = 0; var v5 = astrText.length; var v3; for (;;) { if (!(astrText.charAt(v2) == ' ' || astrText.charAt(v2) == '\n' || astrText.charAt(v2) == '\r' || astrText.charAt(v2) == '\t')) break; ++v2; } v3 = astrText.substring(v2); v1 = v3.length - 1; for (;;) { if (!(v3.charAt(v1) == ' ' || v3.charAt(v1) == '\n' || v3.charAt(v1) == '\r' || v3.charAt(v1) == '\t')) break; --v1; } v3 = v3.substring(0, v1 + 1); return v3; }; v1.RegisteredTextFields = new Object(); v1.RegisteredMovieClips = new Object(); ASSetPropFlags(Shared.GlobalFunc.prototype, null, 1); } #endinitclip } movieClip 324 __Packages.skyui.components.MappedButton { #initclip if (!_global.skyui) { _global.skyui = new Object(); } if (!_global.skyui.components) { _global.skyui.components = new Object(); } if (!_global.skyui.components.MappedButton) { var v1 = function () { super(); this._keyCodes = []; this.buttonArt = []; var v3 = 0; while (this['buttonArt' + v3] != undefined) { this.buttonArt.push(this['buttonArt' + v3]); ++v3; } }; skyui.components.MappedButton = v1; skyui.components.MappedButton extends gfx.controls.Button; var v2 = v1.prototype; v2.__set__hiddenBackground = function (a_flag) { this.background._visible = !a_flag; return this.__get__hiddenBackground(); }; v2.__get__hiddenBackground = function () { return this.background._visible; }; v2.__get__width = function () { return this.background._width; }; v2.__set__width = function (a_value) { this.background._width = a_value; return this.__get__width(); }; v2.onLoad = function () { super.onLoad(); if (this._parent.onButtonLoad != undefined) { this._parent.onButtonLoad(this); } }; v2.updateAfterStateChange = function () { if (this.textField != null && this._label != null) { this.textField.autoSize = 'left'; this.textField.text = this._label; this.textField._width = (this.textField.getLineMetrics(0)).width; } this.update(); this.dispatchEvent({'type': 'stateChange', 'state': this.state}); }; v2.setPlatform = function (a_platform) { this._platform = a_platform; if (this.__get__label() != null && (this.__get__label()).length > 0) { this.update(); } }; v2.setButtonData = function (a_buttonData) { this.textField.autoSize = 'left'; this.__set__label(a_buttonData.text); this.textField._width = (this.textField.getLineMetrics(0)).width; this.setMappedControls(a_buttonData.controls); }; v2.setMappedControls = function (a_controls) { this.constraints = null; this._keyCodes.splice(0); var v7; if (a_controls instanceof Array) { v7 = a_controls; } else { skyui.components.MappedButton._arrayWrap[0] = a_controls; v7 = skyui.components.MappedButton._arrayWrap; } var v4 = 0; while (v4 < v7.length) { var v2 = v7[v4]; if (v2 == null) { } else { var v3 = -1; if (v2.keyCode != null) { v3 = v2.keyCode; } else { var v5 = String(v2.name); var v6 = Number(v2.context); v3 = skyui.util.GlobalFunctions.getMappedKey(v5, v6, this._platform != 0); } if (v3 == -1) { v3 = 282; } this._keyCodes.push(v3); } ++v4; } this.update(); }; v2.update = function () { var v4 = 0; var v3 = 0; while (v3 < this.buttonArt.length) { var v2 = this.buttonArt[v3]; if (this._keyCodes[v3] > 0) { v2._visible = true; v2.gotoAndStop(this._keyCodes[v3]); v2._x = v4; v2._y = (this._height - v2._height) / 2; v4 += v2._width - 2; } else { v2._visible = false; } ++v3; } this.textField._x = v4 + 1; v4 += this.textField._width + 6; this.background._width = v4; }; v1._arrayWrap = []; v2.addProperty('hiddenBackground', v2.__get__hiddenBackground, v2.__set__hiddenBackground); v2.addProperty('width', v2.__get__width, v2.__set__width); ASSetPropFlags(skyui.components.MappedButton.prototype, null, 1); } #endinitclip } movieClip 325 __Packages.Shared.BSScrollingList { #initclip if (!_global.Shared) { _global.Shared = new Object(); } if (!_global.Shared.BSScrollingList) { var v1 = function () { super(); this.EntriesA = new Array(); this.bDisableSelection = false; this.bDisableInput = false; this.bMouseDrivenNav = false; gfx.events.EventDispatcher.initialize(this); Mouse.addListener(this); this.iSelectedIndex = -1; this.iScrollPosition = 0; this.iMaxScrollPosition = 0; this.iListItemsShown = 0; this.iPlatform = 1; this.fListHeight = this.border._height; this.ListScrollbar = this.scrollbar; this.iMaxItemsShown = 0; var v3 = this.GetClipByIndex(this.iMaxItemsShown); while (v3 != undefined) { v3.clipIndex = this.iMaxItemsShown; v3.onRollOver = function () { if (!this._parent.listAnimating && !this._parent.bDisableInput && this.itemIndex != undefined) { this._parent.doSetSelectedIndex(this.itemIndex, 0); this._parent.bMouseDrivenNav = true; } }; v3.onPress = function (aiMouseIndex, aiKeyboardOrMouse) { if (this.itemIndex != undefined) { this._parent.onItemPress(aiKeyboardOrMouse); if (!this._parent.bDisableInput && this.onMousePress != undefined) { this.onMousePress(); } } }; v3.onPressAux = function (aiMouseIndex, aiKeyboardOrMouse, aiButtonIndex) { if (this.itemIndex != undefined) { this._parent.onItemPressAux(aiKeyboardOrMouse, aiButtonIndex); } }; v3 = this.GetClipByIndex(++this.iMaxItemsShown); } }; Shared.BSScrollingList = v1; Shared.BSScrollingList extends MovieClip; var v2 = v1.prototype; v2.onLoad = function () { if (this.ListScrollbar != undefined) { this.ListScrollbar.position = 0; this.ListScrollbar.addEventListener('scroll', this, 'onScroll'); } }; v2.ClearList = function () { this.EntriesA.splice(0, this.EntriesA.length); }; v2.GetClipByIndex = function (aiIndex) { return this['Entry' + aiIndex]; }; v2.handleInput = function (details, pathToFocus) { var v2 = false; if (!this.bDisableInput) { var v4 = this.GetClipByIndex(this.__get__selectedIndex() - this.__get__scrollPosition()); v2 = v4 != undefined && v4.handleInput != undefined && v4.handleInput(details, pathToFocus.slice(1)); if (!v2 && Shared.GlobalFunc.IsKeyPressed(details)) { if (details.navEquivalent == gfx.ui.NavigationCode.UP) { this.moveSelectionUp(); v2 = true; return v2; } if (details.navEquivalent == gfx.ui.NavigationCode.DOWN) { this.moveSelectionDown(); v2 = true; return v2; } if (!this.bDisableSelection && details.navEquivalent == gfx.ui.NavigationCode.ENTER) { this.onItemPress(); v2 = true; } } } return v2; }; v2.onMouseWheel = function (delta) { if (!this.bDisableInput) { var v2 = Mouse.getTopMostEntity(); for (;;) { if (!(v2 && v2 != undefined)) break; if (v2 == this) { this.doSetSelectedIndex(-1, 0); if (delta < 0) { this.__set__scrollPosition(this.__get__scrollPosition() + 1); } else { if (delta > 0) { this.__set__scrollPosition(this.__get__scrollPosition() - 1); } } } v2 = v2._parent; } } }; v2.__get__selectedIndex = function () { return this.iSelectedIndex; }; v2.__set__selectedIndex = function (aiNewIndex) { this.doSetSelectedIndex(aiNewIndex); return this.__get__selectedIndex(); }; v2.__get__listAnimating = function () { return this.bListAnimating; }; v2.__set__listAnimating = function (abFlag) { this.bListAnimating = abFlag; return this.__get__listAnimating(); }; v2.doSetSelectedIndex = function (aiNewIndex, aiKeyboardOrMouse) { if (!this.bDisableSelection && aiNewIndex != this.iSelectedIndex) { var v2 = this.iSelectedIndex; this.iSelectedIndex = aiNewIndex; if (v2 != -1) { this.SetEntry(this.GetClipByIndex(this.EntriesA[v2].clipIndex), this.EntriesA[v2]); } if (this.iSelectedIndex != -1) { if (this.iPlatform != 0) { if (this.iSelectedIndex < this.iScrollPosition) { this.__set__scrollPosition(this.iSelectedIndex); } else { if (this.iSelectedIndex >= this.iScrollPosition + this.iListItemsShown) { this.__set__scrollPosition(Math.min(this.iSelectedIndex - this.iListItemsShown + 1, this.iMaxScrollPosition)); } else { this.SetEntry(this.GetClipByIndex(this.EntriesA[this.iSelectedIndex].clipIndex), this.EntriesA[this.iSelectedIndex]); } } } else { this.SetEntry(this.GetClipByIndex(this.EntriesA[this.iSelectedIndex].clipIndex), this.EntriesA[this.iSelectedIndex]); } } this.dispatchEvent({'type': 'selectionChange', 'index': this.iSelectedIndex, 'keyboardOrMouse': aiKeyboardOrMouse}); } }; v2.__get__scrollPosition = function () { return this.iScrollPosition; }; v2.__get__maxScrollPosition = function () { return this.iMaxScrollPosition; }; v2.__set__scrollPosition = function (aiNewPosition) { if (aiNewPosition != this.iScrollPosition && aiNewPosition >= 0 && aiNewPosition <= this.iMaxScrollPosition) { if (this.ListScrollbar == undefined) { this.updateScrollPosition(aiNewPosition); } else { this.ListScrollbar.position = aiNewPosition; } } return this.__get__scrollPosition(); }; v2.updateScrollPosition = function (aiPosition) { this.iScrollPosition = aiPosition; this.UpdateList(); }; v2.__get__selectedEntry = function () { return this.EntriesA[this.iSelectedIndex]; }; v2.__get__entryList = function () { return this.EntriesA; }; v2.__set__entryList = function (anewArray) { this.EntriesA = anewArray; return this.__get__entryList(); }; v2.__get__disableSelection = function () { return this.bDisableSelection; }; v2.__set__disableSelection = function (abFlag) { this.bDisableSelection = abFlag; return this.__get__disableSelection(); }; v2.__get__disableInput = function () { return this.bDisableInput; }; v2.__set__disableInput = function (abFlag) { this.bDisableInput = abFlag; return this.__get__disableInput(); }; v2.__get__maxEntries = function () { return this.iMaxItemsShown; }; v2.__get__textOption = function () { return this.iTextOption; }; v2.__set__textOption = function (strNewOption) { if (strNewOption == 'None') { this.iTextOption = Shared.BSScrollingList.TEXT_OPTION_NONE; } else { if (strNewOption == 'Shrink To Fit') { this.iTextOption = Shared.BSScrollingList.TEXT_OPTION_SHRINK_TO_FIT; } else { if (strNewOption == 'Multi-Line') { this.iTextOption = Shared.BSScrollingList.TEXT_OPTION_MULTILINE; } } } return this.__get__textOption(); }; v2.UpdateList = function () { var v6 = (this.GetClipByIndex(0))._y; var v4 = 0; var v2 = 0; while (v2 < this.iScrollPosition) { this.EntriesA[v2].clipIndex = undefined; ++v2; } this.iListItemsShown = 0; v2 = this.iScrollPosition; for (;;) { if (!(v2 < this.EntriesA.length && this.iListItemsShown < this.iMaxItemsShown && v4 <= this.fListHeight)) break; var v3 = this.GetClipByIndex(this.iListItemsShown); this.SetEntry(v3, this.EntriesA[v2]); this.EntriesA[v2].clipIndex = this.iListItemsShown; v3.itemIndex = v2; v3._y = v6 + v4; v3._visible = true; v4 += v3._height; if (v4 <= this.fListHeight && this.iListItemsShown < this.iMaxItemsShown) { ++this.iListItemsShown; } ++v2; } var v5 = this.iListItemsShown; while (v5 < this.iMaxItemsShown) { (this.GetClipByIndex(v5))._visible = false; ++v5; } if (this.ScrollUp != undefined) { this.ScrollUp._visible = this.__get__scrollPosition() > 0; } if (this.ScrollDown != undefined) { this.ScrollDown._visible = this.__get__scrollPosition() < this.iMaxScrollPosition; } }; v2.InvalidateData = function () { var v2 = this.iMaxScrollPosition; this.fListHeight = this.border._height; this.CalculateMaxScrollPosition(); if (this.ListScrollbar != undefined) { if (v2 == this.iMaxScrollPosition) { this.SetScrollbarVisibility(); } else { this.ListScrollbar._visible = false; this.ListScrollbar.setScrollProperties(this.iMaxItemsShown, 0, this.iMaxScrollPosition); if (this.iScrollbarDrawTimerID != undefined) { clearInterval(this.iScrollbarDrawTimerID); } this.iScrollbarDrawTimerID = setInterval(this, 'SetScrollbarVisibility', 50); } } if (this.iSelectedIndex >= this.EntriesA.length) { this.iSelectedIndex = this.EntriesA.length - 1; } if (this.iScrollPosition > this.iMaxScrollPosition) { this.iScrollPosition = this.iMaxScrollPosition; } this.UpdateList(); }; v2.SetScrollbarVisibility = function () { clearInterval(this.iScrollbarDrawTimerID); this.iScrollbarDrawTimerID = undefined; this.ListScrollbar._visible = this.iMaxScrollPosition > 0; }; v2.CalculateMaxScrollPosition = function () { var v3 = 0; var v2 = this.EntriesA.length - 1; for (;;) { if (!(v2 >= 0 && v3 <= this.fListHeight)) break; v3 += this.GetEntryHeight(v2); if (v3 <= this.fListHeight) { --v2; } } this.iMaxScrollPosition = v2 + 1; }; v2.GetEntryHeight = function (aiEntryIndex) { var v2 = this.GetClipByIndex(0); this.SetEntry(v2, this.EntriesA[aiEntryIndex]); return v2._height; }; v2.moveSelectionUp = function () { if (!this.bDisableSelection) { if (this.__get__selectedIndex() > 0) { this.__set__selectedIndex(this.__get__selectedIndex() - 1); } return undefined; } this.__set__scrollPosition(this.__get__scrollPosition() - 1); }; v2.moveSelectionDown = function () { if (!this.bDisableSelection) { if (this.__get__selectedIndex() < this.EntriesA.length - 1) { this.__set__selectedIndex(this.__get__selectedIndex() + 1); } return undefined; } this.__set__scrollPosition(this.__get__scrollPosition() + 1); }; v2.onItemPress = function (aiKeyboardOrMouse) { if (!this.bDisableInput && !this.bDisableSelection && this.iSelectedIndex != -1) { this.dispatchEvent({'type': 'itemPress', 'index': this.iSelectedIndex, 'entry': this.EntriesA[this.iSelectedIndex], 'keyboardOrMouse': aiKeyboardOrMouse}); return undefined; } this.dispatchEvent({'type': 'listPress'}); }; v2.onItemPressAux = function (aiKeyboardOrMouse, aiButtonIndex) { if (!this.bDisableInput && !this.bDisableSelection && this.iSelectedIndex != -1 && aiButtonIndex == 1) { this.dispatchEvent({'type': 'itemPressAux', 'index': this.iSelectedIndex, 'entry': this.EntriesA[this.iSelectedIndex], 'keyboardOrMouse': aiKeyboardOrMouse}); } }; v2.SetEntry = function (aEntryClip, aEntryObject) { if (aEntryClip != undefined) { if (aEntryObject == this.__get__selectedEntry()) { aEntryClip.gotoAndStop('Selected'); } else { aEntryClip.gotoAndStop('Normal'); } this.SetEntryText(aEntryClip, aEntryObject); } }; v2.SetEntryText = function (aEntryClip, aEntryObject) { if (aEntryClip.textField != undefined) { if (this.__get__textOption() == Shared.BSScrollingList.TEXT_OPTION_SHRINK_TO_FIT) { aEntryClip.textField.textAutoSize = 'shrink'; } else { if (this.__get__textOption() == Shared.BSScrollingList.TEXT_OPTION_MULTILINE) { aEntryClip.textField.verticalAutoSize = 'top'; } } if (aEntryObject.text == undefined) { aEntryClip.textField.SetText(' '); } else { aEntryClip.textField.SetText(aEntryObject.text); } if (aEntryObject.enabled != undefined) { aEntryClip.textField.textColor = (aEntryObject.enabled == false) ? 6316128 : 16777215; } if (aEntryObject.disabled != undefined) { aEntryClip.textField.textColor = (aEntryObject.disabled == true) ? 6316128 : 16777215; } } }; v2.SetPlatform = function (aiPlatform, abPS3Switch) { this.iPlatform = aiPlatform; this.bMouseDrivenNav = this.iPlatform == 0; }; v2.onScroll = function (event) { this.updateScrollPosition(Math.floor(event.position + 0.5)); }; v1.TEXT_OPTION_NONE = 0; v1.TEXT_OPTION_SHRINK_TO_FIT = 1; v1.TEXT_OPTION_MULTILINE = 2; v2.addProperty('disableInput', v2.__get__disableInput, v2.__set__disableInput); v2.addProperty('disableSelection', v2.__get__disableSelection, v2.__set__disableSelection); v2.addProperty('entryList', v2.__get__entryList, v2.__set__entryList); v2.addProperty('listAnimating', v2.__get__listAnimating, v2.__set__listAnimating); v2.addProperty('maxEntries', v2.__get__maxEntries, function () {}); v2.addProperty('maxScrollPosition', v2.__get__maxScrollPosition, function () {}); v2.addProperty('scrollPosition', v2.__get__scrollPosition, v2.__set__scrollPosition); v2.addProperty('selectedEntry', v2.__get__selectedEntry, function () {}); v2.addProperty('selectedIndex', v2.__get__selectedIndex, v2.__set__selectedIndex); v2.addProperty('textOption', v2.__get__textOption, v2.__set__textOption); ASSetPropFlags(Shared.BSScrollingList.prototype, null, 1); } #endinitclip } movieClip 326 __Packages.Shared.CenteredScrollingList { #initclip if (!_global.Shared) { _global.Shared = new Object(); } if (!_global.Shared.CenteredScrollingList) { var v1 = function () { super(); this._filterer = new Shared.ListFilterer(); this._filterer.addEventListener('filterChange', this, 'onFilterChange'); this.bRecenterSelection = false; this.iMaxTextLength = 256; this.iDividerIndex = -1; this.iNumUnfilteredItems = 0; }; Shared.CenteredScrollingList = v1; Shared.CenteredScrollingList extends Shared.BSScrollingList; var v2 = v1.prototype; v2.__get__filterer = function () { return this._filterer; }; v2.__set__maxTextLength = function (aLength) { if (aLength > 3) { this.iMaxTextLength = aLength; } return this.__get__maxTextLength(); }; v2.__get__numUnfilteredItems = function () { return this.iNumUnfilteredItems; }; v2.__get__maxTextLength = function () { return this.iMaxTextLength; }; v2.__get__numTopHalfEntries = function () { return this.iNumTopHalfEntries; }; v2.__set__numTopHalfEntries = function (aiNum) { this.iNumTopHalfEntries = aiNum; return this.__get__numTopHalfEntries(); }; v2.__get__centeredEntry = function () { return this.EntriesA[(this.GetClipByIndex(this.iNumTopHalfEntries)).itemIndex]; }; v2.IsDivider = function (aEntry) { return aEntry.divider == true || aEntry.flag == 0; }; v2.__get__dividerIndex = function () { return this.iDividerIndex; }; v2.RestoreScrollPosition = function (aiNewPosition, abRecenterSelection) { this.iScrollPosition = aiNewPosition; if (this.iScrollPosition < 0) { this.iScrollPosition = 0; } if (this.iScrollPosition > this.iMaxScrollPosition) { this.iScrollPosition = this.iMaxScrollPosition; } this.bRecenterSelection = abRecenterSelection; }; v2.UpdateList = function () { var v6 = (this.GetClipByIndex(0))._y; var v4 = 0; var v2 = (this.__get__filterer()).ClampIndex(0); this.iDividerIndex = -1; var v5 = 0; while (v5 < this.EntriesA.length) { if (this.IsDivider(this.EntriesA[v5])) { this.iDividerIndex = v5; } ++v5; } if (this.bRecenterSelection || this.iPlatform != 0) { this.iSelectedIndex = -1; } else { this.iSelectedIndex = (this.__get__filterer()).ClampIndex(this.iSelectedIndex); } v5 = 0; while (v5 < this.iScrollPosition - this.iNumTopHalfEntries) { this.EntriesA[v2].clipIndex = undefined; v2 = (this.__get__filterer()).GetNextFilterMatch(v2); ++v5; } this.iListItemsShown = 0; this.iNumUnfilteredItems = 0; v5 = 0; while (v5 < this.iNumTopHalfEntries) { var v3 = this.GetClipByIndex(v5); if (this.iScrollPosition - this.iNumTopHalfEntries + v5 >= 0) { this.SetEntry(v3, this.EntriesA[v2]); v3._visible = true; v3.itemIndex = (this.IsDivider(this.EntriesA[v2]) == true) ? undefined : v2; this.EntriesA[v2].clipIndex = v5; v2 = (this.__get__filterer()).GetNextFilterMatch(v2); ++this.iNumUnfilteredItems; } else { v3._visible = false; v3.itemIndex = undefined; } v3._y = v6 + v4; v4 += v3._height; ++this.iListItemsShown; ++v5; } if (v2 != undefined && (this.bRecenterSelection || this.iPlatform != 0)) { this.iSelectedIndex = v2; } for (;;) { if (!(v2 != undefined && v2 != -1 && v2 < this.EntriesA.length && this.iListItemsShown < this.iMaxItemsShown && v4 <= this.fListHeight)) break; v3 = this.GetClipByIndex(this.iListItemsShown); this.SetEntry(v3, this.EntriesA[v2]); this.EntriesA[v2].clipIndex = this.iListItemsShown; v3.itemIndex = (this.IsDivider(this.EntriesA[v2]) == true) ? undefined : v2; v3._y = v6 + v4; v3._visible = true; v4 += v3._height; if (v4 <= this.fListHeight && this.iListItemsShown < this.iMaxItemsShown) { ++this.iListItemsShown; ++this.iNumUnfilteredItems; } v2 = (this.__get__filterer()).GetNextFilterMatch(v2); } v5 = this.iListItemsShown; while (v5 < this.iMaxItemsShown) { (this.GetClipByIndex(v5))._visible = false; (this.GetClipByIndex(v5)).itemIndex = undefined; ++v5; } if (this.bMouseDrivenNav && !this.bRecenterSelection) { v3 = Mouse.getTopMostEntity(); while (v3 != undefined) { if (v3._parent == this && v3._visible && v3.itemIndex != undefined) { this.doSetSelectedIndex(v3.itemIndex, 0); } v3 = v3._parent; } } this.bRecenterSelection = false; }; v2.InvalidateData = function () { (this.__get__filterer()).__set__filterArray(this.EntriesA); this.fListHeight = this.border._height; this.CalculateMaxScrollPosition(); if (this.iScrollPosition > this.iMaxScrollPosition) { this.iScrollPosition = this.iMaxScrollPosition; } this.UpdateList(); }; v2.onFilterChange = function () { this.iSelectedIndex = (this.__get__filterer()).ClampIndex(this.iSelectedIndex); this.CalculateMaxScrollPosition(); }; v2.moveSelectionUp = function () { var v2 = (this.__get__filterer()).GetPrevFilterMatch(this.iSelectedIndex); var v3 = this.iScrollPosition; if (v2 != undefined && this.IsDivider(this.EntriesA[v2]) == true) { --this.iScrollPosition; v2 = (this.__get__filterer()).GetPrevFilterMatch(v2); } if (v2 != undefined) { this.iSelectedIndex = v2; if (this.iScrollPosition > 0) { --this.iScrollPosition; } this.bMouseDrivenNav = false; this.UpdateList(); this.dispatchEvent({'type': 'listMovedUp', 'index': this.iSelectedIndex, 'scrollChanged': v3 != this.iScrollPosition}); } }; v2.moveSelectionDown = function () { var v2 = (this.__get__filterer()).GetNextFilterMatch(this.iSelectedIndex); var v3 = this.iScrollPosition; if (v2 != undefined && this.IsDivider(this.EntriesA[v2]) == true) { ++this.iScrollPosition; v2 = (this.__get__filterer()).GetNextFilterMatch(v2); } if (v2 != undefined) { this.iSelectedIndex = v2; if (this.iScrollPosition < this.iMaxScrollPosition) { ++this.iScrollPosition; } this.bMouseDrivenNav = false; this.UpdateList(); this.dispatchEvent({'type': 'listMovedDown', 'index': this.iSelectedIndex, 'scrollChanged': v3 != this.iScrollPosition}); } }; v2.onMouseWheel = function (delta) { if (this.bDisableInput) { return undefined; } var v2 = Mouse.getTopMostEntity(); for (;;) { if (!(v2 && v2 != undefined)) break; if (v2 == this) { if (delta < 0) { var v3 = this.GetClipByIndex(this.iNumTopHalfEntries + 1); if (v3._visible == true) { if (v3.itemIndex == undefined) { this.__set__scrollPosition(this.__get__scrollPosition() + 2); } else { this.__set__scrollPosition(this.__get__scrollPosition() + 1); } } } else { if (delta > 0) { var v3 = this.GetClipByIndex(this.iNumTopHalfEntries - 1); if (v3._visible == true) { if (v3.itemIndex == undefined) { this.__set__scrollPosition(this.__get__scrollPosition() - 2); } else { this.__set__scrollPosition(this.__get__scrollPosition() - 1); } } } } } v2 = v2._parent; } this.bMouseDrivenNav = true; }; v2.CalculateMaxScrollPosition = function () { this.iMaxScrollPosition = -1; var v2 = (this.__get__filterer()).ClampIndex(0); while (v2 != undefined) { ++this.iMaxScrollPosition; v2 = (this.__get__filterer()).GetNextFilterMatch(v2); } if (this.iMaxScrollPosition == undefined || this.iMaxScrollPosition < 0) { this.iMaxScrollPosition = 0; } }; v2.SetEntry = function (aEntryClip, aEntryObject) { if (aEntryClip != undefined) { if (this.IsDivider(aEntryObject) == true) { aEntryClip.gotoAndStop('Divider'); } else { aEntryClip.gotoAndStop('Normal'); } if (this.iPlatform == 0) { aEntryClip._alpha = (aEntryObject == this.__get__selectedEntry()) ? 100 : 60; } else { var v3 = 4; if (aEntryClip.clipIndex < this.iNumTopHalfEntries) { aEntryClip._alpha = 60 - v3 * (this.iNumTopHalfEntries - aEntryClip.clipIndex); } else { if (aEntryClip.clipIndex > this.iNumTopHalfEntries) { aEntryClip._alpha = 60 - v3 * (aEntryClip.clipIndex - this.iNumTopHalfEntries); } else { aEntryClip._alpha = 100; } } } this.SetEntryText(aEntryClip, aEntryObject); } }; v2.addProperty('centeredEntry', v2.__get__centeredEntry, function () {}); v2.addProperty('dividerIndex', v2.__get__dividerIndex, function () {}); v2.addProperty('filterer', v2.__get__filterer, function () {}); v2.addProperty('maxTextLength', v2.__get__maxTextLength, v2.__set__maxTextLength); v2.addProperty('numTopHalfEntries', v2.__get__numTopHalfEntries, v2.__set__numTopHalfEntries); v2.addProperty('numUnfilteredItems', v2.__get__numUnfilteredItems, function () {}); ASSetPropFlags(Shared.CenteredScrollingList.prototype, null, 1); } #endinitclip } movieClip 327 __Packages.Shared.ListFilterer { #initclip if (!_global.Shared) { _global.Shared = new Object(); } if (!_global.Shared.ListFilterer) { var v1 = function () { this.iItemFilter = 4294967295.0; this.EntryMatchesFunc = this.EntryMatchesFilter; gfx.events.EventDispatcher.initialize(this); }; Shared.ListFilterer = v1; var v2 = v1.prototype; v2.__get__itemFilter = function () { return this.iItemFilter; }; v2.__set__itemFilter = function (aiNewFilter) { var v2 = this.iItemFilter != aiNewFilter; this.iItemFilter = aiNewFilter; if (v2 == true) { this.dispatchEvent({'type': 'filterChange'}); } return this.__get__itemFilter(); }; v2.__get__filterArray = function () { return this._filterArray; }; v2.__set__filterArray = function (aNewArray) { this._filterArray = aNewArray; return this.__get__filterArray(); }; v2.SetPartitionedFilterMode = function (abPartition) { this.EntryMatchesFunc = abPartition ? this.EntryMatchesPartitionedFilter : this.EntryMatchesFilter; }; v2.EntryMatchesFilter = function (aEntry) { return aEntry != undefined && (aEntry.filterFlag == undefined || (aEntry.filterFlag & this.iItemFilter) != 0); }; v2.EntryMatchesPartitionedFilter = function (aEntry) { var v3 = false; if (aEntry != undefined) { if (this.iItemFilter == 4294967295.0) { v3 = true; return v3; } var v2 = aEntry.filterFlag; var v5 = v2 & 255; var v4 = (v2 & 65280) >>> 8; var v7 = (v2 & 16711680) >>> 16; var v6 = (v2 & 4278190080.0) >>> 24; v3 = v5 == this.iItemFilter || v4 == this.iItemFilter || v7 == this.iItemFilter || v6 == this.iItemFilter; } return v3; }; v2.GetPrevFilterMatch = function (aiStartIndex) { var v3; if (aiStartIndex != undefined) { var v2 = aiStartIndex - 1; for (;;) { if (!(v2 >= 0 && v3 == undefined)) break; if (this.EntryMatchesFunc(this._filterArray[v2])) { v3 = v2; } --v2; } } return v3; }; v2.GetNextFilterMatch = function (aiStartIndex) { var v3; if (aiStartIndex != undefined) { var v2 = aiStartIndex + 1; for (;;) { if (!(v2 < this._filterArray.length && v3 == undefined)) break; if (this.EntryMatchesFunc(this._filterArray[v2])) { v3 = v2; } ++v2; } } return v3; }; v2.ClampIndex = function (aiStartIndex) { var v2 = aiStartIndex; if (aiStartIndex != undefined && !this.EntryMatchesFunc(this._filterArray[v2])) { var v4 = this.GetNextFilterMatch(v2); var v3 = this.GetPrevFilterMatch(v2); if (v4 == undefined) { if (v3 == undefined) { v2 = -1; } else { v2 = v3; } } else { v2 = v4; } if (v4 != undefined && v3 != undefined && v3 != v4 && v2 == v4 && this._filterArray[v3].text == this._filterArray[aiStartIndex].text) { v2 = v3; } } return v2; }; v2.addProperty('filterArray', v2.__get__filterArray, v2.__set__filterArray); v2.addProperty('itemFilter', v2.__get__itemFilter, v2.__set__itemFilter); ASSetPropFlags(Shared.ListFilterer.prototype, null, 1); } #endinitclip } movieClip 328 __Packages.QuestCenteredList { #initclip if (!_global.QuestCenteredList) { var v1 = function () { super(); }; _global.QuestCenteredList = v1; _global.QuestCenteredList extends Shared.CenteredScrollingList; var v2 = v1.prototype; v2.SetEntryText = function (aEntryClip, aEntryObject) { super.SetEntryText(aEntryClip, aEntryObject); if (aEntryClip.textField != undefined) { aEntryClip.textField.textColor = (aEntryObject.completed == true) ? 6316128 : 16777215; } if (aEntryClip.EquipIcon != undefined) { if (aEntryObject != undefined && aEntryObject.active) { aEntryClip.EquipIcon.gotoAndStop('Equipped'); return undefined; } aEntryClip.EquipIcon.gotoAndStop('None'); } }; ASSetPropFlags(_global.QuestCenteredList.prototype, null, 1); } #endinitclip } movieClip 329 __Packages.ObjectiveScrollingList { #initclip if (!_global.ObjectiveScrollingList) { var v1 = function () { super(); }; _global.ObjectiveScrollingList = v1; _global.ObjectiveScrollingList extends Shared.BSScrollingList; var v2 = v1.prototype; v2.SetEntry = function (aEntryClip, aEntryObject) { if (aEntryObject.text == undefined) { aEntryClip.gotoAndStop('None'); } else { var v2 = ''; if (aEntryObject.active) { v2 += 'Active'; } else { if (aEntryObject.completed) { v2 += 'Completed'; } else { if (aEntryObject.failed) { v2 += 'Failed'; } else { v2 += 'Normal'; } } } if (aEntryObject == this.__get__selectedEntry()) { v2 += 'Selected'; } aEntryClip.gotoAndStop(v2); } this.SetEntryText(aEntryClip, aEntryObject); }; ASSetPropFlags(_global.ObjectiveScrollingList.prototype, null, 1); } #endinitclip } movieClip 330 __Packages.QuestsPage { #initclip if (!_global.QuestsPage) { var v1 = function () { super(); this.TitleList = this.TitleList_mc.List_mc; this.DescriptionText = this.questDescriptionText; this.QuestTitleText = this.questTitleText; this.ObjectiveList = this.objectiveList; this.ObjectivesHeader = this.objectivesHeader; this.bHasMiscQuests = false; this.bUpdated = false; this._bottomBar = this._parent._parent.BottomBar_mc; }; _global.QuestsPage = v1; _global.QuestsPage extends MovieClip; var v2 = v1.prototype; v2.onLoad = function () { this.QuestTitleText.SetText(' '); this.DescriptionText.SetText(' '); this.DescriptionText.verticalAutoSize = 'top'; this.QuestTitleText.textAutoSize = 'shrink'; this.TitleList.addEventListener('itemPress', this, 'onTitleListSelect'); this.TitleList.addEventListener('listMovedUp', this, 'onTitleListMoveUp'); this.TitleList.addEventListener('listMovedDown', this, 'onTitleListMoveDown'); this.TitleList.addEventListener('selectionChange', this, 'onTitleListMouseSelectionChange'); this.TitleList.disableInput = true; this.ObjectiveList.addEventListener('itemPress', this, 'onObjectiveListSelect'); this.ObjectiveList.addEventListener('selectionChange', this, 'onObjectiveListHighlight'); }; v2.startPage = function () { this.TitleList.disableInput = false; if (!this.bUpdated) { gfx.io.GameDelegate.call('RequestQuestsData', [this.TitleList], this, 'onQuestsDataComplete'); this.bUpdated = true; } this._bottomBar.buttonPanel.clearButtons(); this._toggleActiveButton = this._bottomBar.buttonPanel.addButton({'text': '$Toggle Active', 'controls': this._toggleActiveControls}); if (this.bAllowShowOnMap) { this._showOnMapButton = this._bottomBar.buttonPanel.addButton({'text': '$Show on Map', 'controls': this._showOnMapControls}); } this._bottomBar.buttonPanel.updateButtons(true); this.switchFocusToTitles(); }; v2.endPage = function () { this._showOnMapButton._alpha = 100; this._toggleActiveButton._alpha = 100; this._bottomBar.buttonPanel.clearButtons(); this.TitleList.disableInput = true; }; v2.__get__selectedQuestID = function () { return this.TitleList.entryList.length <= 0 ? undefined : this.TitleList.centeredEntry.formID; }; v2.__get__selectedQuestInstance = function () { return this.TitleList.entryList.length <= 0 ? undefined : this.TitleList.centeredEntry.instance; }; v2.handleInput = function (details, pathToFocus) { var v2 = false; if (Shared.GlobalFunc.IsKeyPressed(details)) { if ((details.navEquivalent == gfx.ui.NavigationCode.GAMEPAD_X || details.code == 77) && this.bAllowShowOnMap) { this.onShowMap(); v2 = true; } else { if (this.TitleList.entryList.length > 0) { if (details.navEquivalent == gfx.ui.NavigationCode.LEFT && (gfx.managers.FocusHandler.__get__instance()).getFocus(0) != this.TitleList) { this.switchFocusToTitles(); v2 = true; } else { if (details.navEquivalent == gfx.ui.NavigationCode.RIGHT && (gfx.managers.FocusHandler.__get__instance()).getFocus(0) != this.ObjectiveList) { this.switchFocusToObjectives(); v2 = true; } } } } } if (!v2 && pathToFocus != undefined && pathToFocus.length > 0) { v2 = pathToFocus[0].handleInput(details, pathToFocus.slice(1)); } return v2; }; v2.onShowMap = function () { var v2; if (this.ObjectiveList.selectedEntry != undefined && this.ObjectiveList.selectedEntry.questTargetID != undefined) { v2 = this.ObjectiveList.selectedEntry; } else { v2 = this.ObjectiveList.entryList[0]; } if (v2 != undefined && v2.questTargetID != undefined) { this._parent._parent.CloseMenu(); gfx.io.GameDelegate.call('ShowTargetOnMap', [v2.questTargetID]); } else { gfx.io.GameDelegate.call('PlaySound', ['UIMenuCancel']); } }; v2.isViewingMiscObjectives = function () { return this.bHasMiscQuests && this.TitleList.selectedEntry.formID == 0; }; v2.onTitleListSelect = function () { if (this.TitleList.selectedEntry != undefined && !this.TitleList.selectedEntry.completed) { if (!this.isViewingMiscObjectives()) { gfx.io.GameDelegate.call('ToggleQuestActiveStatus', [this.TitleList.selectedEntry.formID, this.TitleList.selectedEntry.instance], this, 'onToggleQuestActive'); return undefined; } this.TitleList.selectedEntry.active = !this.TitleList.selectedEntry.active; gfx.io.GameDelegate.call('ToggleShowMiscObjectives', [this.TitleList.selectedEntry.active]); this.TitleList.UpdateList(); } }; v2.onObjectiveListSelect = function () { if (this.isViewingMiscObjectives()) { gfx.io.GameDelegate.call('ToggleQuestActiveStatus', [this.ObjectiveList.selectedEntry.formID, this.ObjectiveList.selectedEntry.instance], this, 'onToggleQuestActive'); } }; v2.switchFocusToTitles = function () { (gfx.managers.FocusHandler.__get__instance()).setFocus(this.TitleList, 0); this.Divider.gotoAndStop('Right'); this._toggleActiveButton._alpha = 100; this.ObjectiveList.selectedIndex = -1; if (this.iPlatform != 0) { this.ObjectiveList.disableSelection = true; } this.updateShowOnMapButtonAlpha(0); }; v2.switchFocusToObjectives = function () { (gfx.managers.FocusHandler.__get__instance()).setFocus(this.ObjectiveList, 0); this.Divider.gotoAndStop('Left'); this._toggleActiveButton._alpha = this.isViewingMiscObjectives() ? 100 : 50; if (this.iPlatform != 0) { this.ObjectiveList.disableSelection = false; } this.ObjectiveList.selectedIndex = 0; this.updateShowOnMapButtonAlpha(0); }; v2.onObjectiveListHighlight = function (event) { this.updateShowOnMapButtonAlpha(event.index); }; v2.updateShowOnMapButtonAlpha = function (a_entryIdx) { var v2 = 50; if (this.bAllowShowOnMap && (a_entryIdx >= 0 && this.ObjectiveList.entryList[a_entryIdx].questTargetID != undefined) || this.ObjectiveList.entryList.length > 0 && this.ObjectiveList.entryList[0].questTargetID != undefined) { v2 = 100; } this._toggleActiveButton._alpha = !this.TitleList.selectedEntry.completed ? 100 : 50; this._showOnMapButton._alpha = v2; }; v2.onToggleQuestActive = function (a_bnewActiveStatus) { if (this.isViewingMiscObjectives()) { var v2 = this.ObjectiveList.selectedEntry.formID; var v4 = this.ObjectiveList.selectedEntry.instance; for (var v5 in this.ObjectiveList.entryList) { if (this.ObjectiveList.entryList[v5].formID == v2 && this.ObjectiveList.entryList[v5].instance == v4) { this.ObjectiveList.entryList[v5].active = a_bnewActiveStatus; } } this.ObjectiveList.UpdateList(); } else { this.TitleList.selectedEntry.active = a_bnewActiveStatus; this.TitleList.UpdateList(); } if (a_bnewActiveStatus) { gfx.io.GameDelegate.call('PlaySound', ['UIQuestActive']); return undefined; } gfx.io.GameDelegate.call('PlaySound', ['UIQuestInactive']); }; v2.onQuestsDataComplete = function (auiSavedFormID, auiSavedInstance, abAddMiscQuest, abMiscQuestActive, abAllowShowOnMap) { this.bAllowShowOnMap = abAllowShowOnMap; if (abAddMiscQuest) { this.TitleList.entryList.push({'text': '$MISCELLANEOUS', 'formID': 0, 'instance': 0, 'active': abMiscQuestActive, 'completed': false, 'type': 0}); this.bHasMiscQuests = true; } var v3; var v6 = false; var v4 = false; var v2 = 0; while (v2 < this.TitleList.entryList.length) { if (this.TitleList.entryList[v2].formID == 0) { this.TitleList.entryList[v2].timeIndex = Number.MAX_VALUE; } else { this.TitleList.entryList[v2].timeIndex = v2; } if (this.TitleList.entryList[v2].completed) { if (v3 == undefined) { v3 = this.TitleList.entryList[v2].timeIndex - 0.5; } v6 = true; } else { v4 = true; } ++v2; } if (v3 != undefined && v6 && v4) { this.TitleList.entryList.push({'divider': true, 'completed': true, 'timeIndex': v3}); } this.TitleList.entryList.sort(this.completedQuestSort); var v5 = 0; v2 = 0; while (v2 < this.TitleList.entryList.length) { if (this.TitleList.entryList[v2].text != undefined) { this.TitleList.entryList[v2].text = this.TitleList.entryList[v2].text.toUpperCase(); } if (this.TitleList.entryList[v2].formID == auiSavedFormID && this.TitleList.entryList[v2].instance == auiSavedInstance) { v5 = v2; } ++v2; } this.TitleList.InvalidateData(); this.TitleList.RestoreScrollPosition(v5, true); this.TitleList.UpdateList(); this.onQuestHighlight(); }; v2.completedQuestSort = function (aObj1, aObj2) { if (!aObj1.completed && aObj2.completed) { return -1; } if (aObj1.completed && !aObj2.completed) { return 1; } if (aObj1.timeIndex < aObj2.timeIndex) { return -1; } if (aObj1.timeIndex > aObj2.timeIndex) { return 1; } return 0; }; v2.onQuestHighlight = function () { if (this.TitleList.entryList.length > 0) { var v2 = ['Misc', 'Main', 'MagesGuild', 'ThievesGuild', 'DarkBrotherhood', 'Companion', 'Favor', 'Daedric', 'Misc', 'CivilWar', 'DLC01', 'DLC02']; this.QuestTitleText.SetText(this.TitleList.selectedEntry.text); if (this.TitleList.selectedEntry.objectives == undefined) { gfx.io.GameDelegate.call('RequestObjectivesData', []); } this.ObjectiveList.entryList = this.TitleList.selectedEntry.objectives; this.SetDescriptionText(); this.questTitleEndpieces.gotoAndStop(v2[this.TitleList.selectedEntry.type]); this.questTitleEndpieces._visible = true; this.ObjectivesHeader._visible = !this.isViewingMiscObjectives(); this.ObjectiveList.selectedIndex = -1; this.ObjectiveList.scrollPosition = 0; if (this.iPlatform != 0) { this.ObjectiveList.disableSelection = true; } this._showOnMapButton._visible = true; this.updateShowOnMapButtonAlpha(0); } else { this.NoQuestsText.SetText('No Active Quests'); this.DescriptionText.SetText(' '); this.QuestTitleText.SetText(' '); this.ObjectiveList.ClearList(); this.questTitleEndpieces._visible = false; this.ObjectivesHeader._visible = false; this._showOnMapButton._visible = false; } this.ObjectiveList.InvalidateData(); }; v2.UpdateButtonVisiblity = function () { var v2 = this.TitleList.entryList.length > 0 && this.TitleList.entryList.selectedEntry != null; this._toggleActiveButton._visible = v2 && !this.TitleList.selectedEntry.completed; this._showOnMapButton._visible = v2 && !this.TitleList.selectedEntry.completed && this.bAllowShowOnMap; }; v2.SetDescriptionText = function () { var v2 = 25; var v4 = 10; var v3 = 470; var v5 = 40; this.DescriptionText.SetText(this.TitleList.selectedEntry.description); var v6 = this.DescriptionText.getCharBoundaries(this.DescriptionText.getLineOffset(this.DescriptionText.numLines - 1)); this.ObjectivesHeader._y = this.DescriptionText._y + v6.bottom + v2; if (this.isViewingMiscObjectives()) { this.ObjectiveList._y = this.DescriptionText._y; } else { this.ObjectiveList._y = this.ObjectivesHeader._y + this.ObjectivesHeader._height + v4; } this.ObjectiveList.border._height = Math.max(v3 - this.ObjectiveList._y, v5); this.ObjectiveList.scrollbar.height = this.ObjectiveList.border._height - 20; }; v2.onTitleListMoveUp = function (event) { this.onQuestHighlight(); gfx.io.GameDelegate.call('PlaySound', ['UIMenuFocus']); if (event.scrollChanged == true) { this.TitleList._parent.gotoAndPlay('moveUp'); } }; v2.onTitleListMoveDown = function (event) { this.onQuestHighlight(); gfx.io.GameDelegate.call('PlaySound', ['UIMenuFocus']); if (event.scrollChanged == true) { this.TitleList._parent.gotoAndPlay('moveDown'); } }; v2.onTitleListMouseSelectionChange = function (event) { if (event.keyboardOrMouse == 0 && event.index != -1) { this.onQuestHighlight(); gfx.io.GameDelegate.call('PlaySound', ['UIMenuFocus']); } }; v2.onRightStickInput = function (afX, afY) { if (afY < 0) { this.ObjectiveList.moveSelectionDown(); return undefined; } this.ObjectiveList.moveSelectionUp(); }; v2.SetPlatform = function (a_platform, a_bPS3Switch) { if (a_platform == 0) { this._toggleActiveControls = {'keyCode': 28}; this._showOnMapControls = {'keyCode': 50}; this._deleteControls = {'keyCode': 45}; } else { this._toggleActiveControls = {'keyCode': 276}; this._showOnMapControls = {'keyCode': 278}; this._deleteControls = {'keyCode': 278}; } this.iPlatform = a_platform; this.TitleList.SetPlatform(a_platform, a_bPS3Switch); this.ObjectiveList.SetPlatform(a_platform, a_bPS3Switch); }; v2.addProperty('selectedQuestID', v2.__get__selectedQuestID, function () {}); v2.addProperty('selectedQuestInstance', v2.__get__selectedQuestInstance, function () {}); ASSetPropFlags(_global.QuestsPage.prototype, null, 1); } #endinitclip } movieClip 331 __Packages.StatsList { #initclip if (!_global.StatsList) { var v1 = function () { super(); this.scrollbar.focusTarget = this; }; _global.StatsList = v1; _global.StatsList extends Shared.BSScrollingList; var v2 = v1.prototype; v2.SetEntryText = function (aEntryClip, aEntryObject) { super.SetEntryText(aEntryClip, aEntryObject); aEntryClip.valueText.textAutoSize = 'shrink'; if (aEntryObject.text != undefined) { aEntryClip.valueText.SetText(aEntryObject.value.toString()); return undefined; } aEntryClip.valueText.SetText(' '); }; ASSetPropFlags(_global.StatsList.prototype, null, 1); } #endinitclip } movieClip 332 __Packages.StatsPage { #initclip if (!_global.StatsPage) { var v1 = function () { super(); this.CategoryList = this.CategoryList_mc.List_mc; this._StatsList = this.StatsList_mc; this.bUpdated = false; }; _global.StatsPage = v1; _global.StatsPage extends MovieClip; var v2 = v1.prototype; v2.onLoad = function () { this.CategoryList.entryList.push({'text': '$GENERAL', 'stats': new Array(), 'savedHighlight': 0}); this.CategoryList.entryList.push({'text': '$QUEST', 'stats': new Array(), 'savedHighlight': 0}); this.CategoryList.entryList.push({'text': '$COMBAT', 'stats': new Array(), 'savedHighlight': 0}); this.CategoryList.entryList.push({'text': '$MAGIC', 'stats': new Array(), 'savedHighlight': 0}); this.CategoryList.entryList.push({'text': '$CRAFTING', 'stats': new Array(), 'savedHighlight': 0}); this.CategoryList.entryList.push({'text': '$CRIME', 'stats': new Array(), 'savedHighlight': 0}); this.CategoryList.InvalidateData(); this.CategoryList.addEventListener('listMovedUp', this, 'onCategoryListMoveUp'); this.CategoryList.addEventListener('listMovedDown', this, 'onCategoryListMoveDown'); this.CategoryList.addEventListener('selectionChange', this, 'onCategoryListMouseSelectionChange'); this.CategoryList.disableInput = true; this._StatsList.disableSelection = true; }; v2.startPage = function () { this.CategoryList.disableInput = false; (gfx.managers.FocusHandler.__get__instance()).setFocus(this.CategoryList, 0); if (this.bUpdated) { return undefined; } gfx.io.GameDelegate.call('updateStats', [], this, 'PopulateStatsList'); this.bUpdated = true; }; v2.endPage = function () { this.CategoryList.disableInput = true; }; v2.PopulateStatsList = function () { var v10 = 0; var v9 = 1; var v7 = 2; var v11 = 3; var v8 = 4; var v3 = 0; while (v3 < arguments.length) { var v4 = {'text': '$' + arguments[v3 + v10], 'value': arguments[v3 + v9]}; this.CategoryList.entryList[arguments[v3 + v7]].stats.push(v4); v3 += v8; } this.onCategoryHighlight(); }; v2.onCategoryHighlight = function () { var v3 = this.CategoryList.selectedEntry.stats; this._StatsList.ClearList(); this._StatsList.scrollPosition = 0; var v2 = 0; while (v2 < v3.length) { this._StatsList.entryList.push(v3[v2]); ++v2; } this._StatsList.InvalidateData(); }; v2.onCategoryListMoveUp = function (event) { this.onCategoryHighlight(); gfx.io.GameDelegate.call('PlaySound', ['UIMenuFocus']); if (event.scrollChanged == true) { this.CategoryList._parent.gotoAndPlay('moveUp'); } }; v2.onCategoryListMoveDown = function (event) { this.onCategoryHighlight(); gfx.io.GameDelegate.call('PlaySound', ['UIMenuFocus']); if (event.scrollChanged == true) { this.CategoryList._parent.gotoAndPlay('moveDown'); } }; v2.onCategoryListMouseSelectionChange = function (event) { if (event.keyboardOrMouse == 0 && event.index != -1) { this.onCategoryHighlight(); gfx.io.GameDelegate.call('PlaySound', ['UIMenuFocus']); } }; v2.onRightStickInput = function (afX, afY) { if (afY < 0) { this._StatsList.moveSelectionDown(); return undefined; } this._StatsList.moveSelectionUp(); }; v2.SetPlatform = function (aiPlatform, abPS3Switch) { this.CategoryList.SetPlatform(aiPlatform, abPS3Switch); this._StatsList.SetPlatform(aiPlatform, abPS3Switch); }; ASSetPropFlags(_global.StatsPage.prototype, null, 1); } #endinitclip } movieClip 333 __Packages.gfx.controls.TextInput { #initclip if (!_global.gfx) { _global.gfx = new Object(); } if (!_global.gfx.controls) { _global.gfx.controls = new Object(); } if (!_global.gfx.controls.TextInput) { var v1 = function () { super(); this.tabEnabled = !this._disabled; this.focusEnabled = !this._disabled; this.defaultTextFormat = this.textField.getNewTextFormat(); this.defaultTextFormat.italic = true; this.defaultTextFormat.color = 11184810; }; gfx.controls.TextInput = v1; gfx.controls.TextInput extends gfx.core.UIComponent; var v2 = v1.prototype; v2.__get__textID = function () { return null; }; v2.__set__textID = function (value) { if (value != '') { this.__set__text(gfx.utils.Locale.getTranslatedString(value)); } return this.__get__textID(); }; v2.__get__text = function () { return this._text; }; v2.__set__text = function (value) { this._text = value; this.isHtml = false; this.updateText(); return this.__get__text(); }; v2.__get__htmlText = function () { return this._text; }; v2.__set__htmlText = function (value) { this._text = value; this.isHtml = true; this.updateText(); return this.__get__htmlText(); }; v2.__get__editable = function () { return this._editable; }; v2.__set__editable = function (value) { this._editable = value; this.tabEnabled = !this._disabled && !this._editable; this.updateTextField(); return this.__get__editable(); }; v2.__get__password = function () { return this.textField.password; }; v2.__set__password = function (value) { this.textField.password = value; this._password = this.textField.password; return this.__get__password(); }; v2.__get__maxChars = function () { return this._maxChars; }; v2.__set__maxChars = function (value) { this.textField.maxChars = value; this._maxChars = this.textField.maxChars; return this.__get__maxChars(); }; v2.__get__disabled = function () { return this._disabled; }; v2.__set__disabled = function (value) { super.__set__disabled(value); this.tabEnabled = !this._disabled; this.focusEnabled = !this._disabled; if (this.initialized) { this.setMouseHandlers(); this.setState(); this.updateTextField(); } return this.__get__disabled(); }; v2.appendText = function (text) { this._text += text; if (this.isHtml) { this.textField.html = false; } this.isHtml = false; this.textField.appendText(text); }; v2.appendHtml = function (text) { this._text += text; if (!this.isHtml) { this.textField.html = true; } this.isHtml = true; this.textField.appendHtml(text); }; v2.__get__length = function () { return this.textField.length; }; v2.handleInput = function (details, pathToFocus) { if (details.value != 'keyDown' && details.value != 'keyHold') { return false; } var v2 = details.controllerIdx; if (Selection.getFocus(v2) != null) { return false; } Selection.setFocus(this.textField, v2); return true; }; v2.toString = function () { return '[Scaleform TextInput ' + this._name + ']'; }; v2.configUI = function () { super.configUI(); this.constraints = new gfx.utils.Constraints(this, true); this.constraints.addElement(this.textField, gfx.utils.Constraints.ALL); this.setState(); this.updateTextField(); this.setMouseHandlers(); }; v2.setState = function () { this.gotoAndPlay(this._disabled ? 'disabled' : (this._focused ? 'focused' : 'default')); }; v2.setMouseHandlers = function () { if (this.actAsButton != false) { if (this._disabled || this._focused) { delete this.onRollOver; delete this.onRollOut; delete this.onPress; return undefined; } if (this._editable) { this.onRollOver = this.handleMouseRollOver; this.onRollOut = this.handleMouseRollOut; this.onPress = this.handleMousePress; } } }; v2.handleMousePress = function (controllerIdx, keyboardOrMouse, button) { this.dispatchEvent({'type': 'press', 'controllerIdx': controllerIdx, 'button': button}); Selection.setFocus(this.textField, controllerIdx); }; v2.handleMouseRollOver = function (controllerIdx) { this.gotoAndPlay('default'); this.gotoAndPlay('over'); if (this.constraints) { this.constraints.update(this.__width, this.__height); } this.updateTextField(); this.dispatchEvent({'type': 'rollOver', 'controllerIdx': controllerIdx}); }; v2.handleMouseRollOut = function (controllerIdx) { this.gotoAndPlay('default'); this.gotoAndPlay('out'); if (this.constraints) { this.constraints.update(this.__width, this.__height); } this.updateTextField(); this.dispatchEvent({'type': 'rollOut', 'controllerIdx': controllerIdx}); }; v2.draw = function () { if (this.sizeIsInvalid) { this._width = this.__width; this._height = this.__height; } super.draw(); this.constraints.update(this.__width, this.__height); }; v2.changeFocus = function () { this.tabEnabled = !this._disabled; if (!this._focused) { this.hscroll = this.textField.hscroll; } this.setState(); if (this.constraints) { this.constraints.update(this.__width, this.__height); } this.updateTextField(); if (this._focused && this.textField.type == 'input') { this.tabEnabled = false; var v3 = Selection.getFocusBitmask(this); var v2 = 0; while (v2 < System.capabilities.numControllers) { if ((v3 >> v2 & 1) != 0) { Selection.setFocus(this.textField, v2); if (this.textField.noAutoSelection) { Selection.setSelection(this.textField.htmlText.length, this.textField.htmlText.length, v2); } else { Selection.setSelection(0, this.textField.htmlText.length, v2); } } ++v2; } } this.setMouseHandlers(); this.textField.hscroll = this.hscroll; }; v2.updateText = function () { if (this._text != '') { if (this.isHtml) { this.textField.html = true; this.textField.htmlText = this._text; } else { this.textField.html = false; this.textField.text = this._text; } return undefined; } this.textField.text = ''; if (!this._focused && this.defaultText != '') { this.textField.text = this.defaultText; this.textField.setTextFormat(this.defaultTextFormat); } }; v2.updateTextField = function () { if (this.textField != null) { if (!this._selectable) { this._selectable = this.textField.selectable; } this.updateText(); this.textField.maxChars = this._maxChars; this.textField.noAutoSelection = true; this.textField.password = this._password; this.textField.selectable = this._disabled ? false : (this._selectable || this._editable); this.textField.type = (this._editable && !this._disabled) ? 'input' : 'dynamic'; this.textField.focusTarget = this; this.textField.hscroll = this.hscroll; this.textField.addListener(this); } }; v2.onChanged = function (target) { if (this.changeLock) { return undefined; } this._text = this.isHtml ? this.textField.htmlText : this.textField.text; this.dispatchEventAndSound({'type': 'textChange'}); }; v2.defaultText = ''; v2.soundMap = {'theme': 'default', 'focusIn': 'focusIn', 'focusOut': 'focusOut', 'textChange': 'textChange'}; v2._text = ''; v2._maxChars = 0; v2._editable = true; v2.actAsButton = false; v2.hscroll = 0; v2.changeLock = false; v2.addProperty('disabled', v2.__get__disabled, v2.__set__disabled); v2.addProperty('editable', v2.__get__editable, v2.__set__editable); v2.addProperty('htmlText', v2.__get__htmlText, v2.__set__htmlText); v2.addProperty('length', v2.__get__length, function () {}); v2.addProperty('maxChars', v2.__get__maxChars, v2.__set__maxChars); v2.addProperty('password', v2.__get__password, v2.__set__password); v2.addProperty('text', v2.__get__text, v2.__set__text); v2.addProperty('textID', v2.__get__textID, v2.__set__textID); ASSetPropFlags(gfx.controls.TextInput.prototype, null, 1); } #endinitclip } movieClip 334 __Packages.gfx.controls.TextArea { #initclip if (!_global.gfx) { _global.gfx = new Object(); } if (!_global.gfx.controls) { _global.gfx.controls = new Object(); } if (!_global.gfx.controls.TextArea) { var v1 = function () { super(); }; gfx.controls.TextArea = v1; gfx.controls.TextArea extends gfx.controls.TextInput; var v2 = v1.prototype; v2.__get__position = function () { return this._position; }; v2.__set__position = function (value) { this._position = value; this.textField.scroll = this._position; return this.__get__position(); }; v2.__get__scrollPolicy = function () { return this._scrollPolicy; }; v2.__set__scrollPolicy = function (value) { this._scrollPolicy = value; this.updateScrollBar(); return this.__get__scrollPolicy(); }; v2.__get__scrollBar = function () { return this._scrollBar; }; v2.__set__scrollBar = function (value) { if (!this.initialized) { this.inspectableScrollBar = value; return undefined; } if (this._scrollBar != value) { if (this._scrollBar != null) { this._scrollBar.scrollTarget = null; this._scrollBar.focusTarget = null; this._scrollBar.removeEventListener('scroll', this, 'handleScroll'); if (this.autoScrollBar) { this._scrollBar.removeMovieClip(); } } this.autoScrollBar = false; if (typeof value == 'string') { this._scrollBar = MovieClip(this._parent[value.toString()]); if (this._scrollBar == null) { this._scrollBar = this.container.attachMovie(value.toString(), '_scrollBar', 1000, {'_visible': false}); if (this._scrollBar != null) { this.autoScrollBar = true; } } } else { this._scrollBar = MovieClip(value); } if (this._scrollBar != null) { this._scrollBar.focusTarget = this; this._scrollBar.scrollTarget = this.textField; this.maxscroll = this.textField.maxscroll; this.updateScrollBar(); this.changeLock = true; this.onChanged(); this.changeLock = false; return undefined; } } return this.__get__scrollBar(); }; v2.__get__disabled = function () { return this._disabled; }; v2.__set__disabled = function (value) { super.__set__disabled(value); this.updateScrollBar(); return this.__get__disabled(); }; v2.toString = function () { return '[Scaleform TextArea ' + this._name + ']'; }; v2.handleInput = function (details, pathToFocus) { if (details.value != 'keyDown' && details.value != 'keyHold') { return false; } var v4 = details.controllerIdx; if (Selection.getFocus(v4) == null) { Selection.setFocus(this.textField, v4); return true; } if (this._editable) { return false; } __reg0 = details.navEquivalent; if (__reg0 === gfx.ui.NavigationCode.UP) { if (this.__get__position() == 1) { return false; } this.__set__position(Math.max(1, this.__get__position() - 1)); return true; return false; } if (__reg0 === gfx.ui.NavigationCode.DOWN) { if (this.__get__position() == this.maxscroll) { return false; } this.__set__position(Math.min(this.maxscroll, this.__get__position() + 1)); return true; return false; } if (__reg0 === gfx.ui.NavigationCode.END) { this.__set__position(this.maxscroll); return true; return false; } if (__reg0 === gfx.ui.NavigationCode.HOME) { this.__set__position(1); return true; return false; } if (__reg0 === gfx.ui.NavigationCode.PAGE_UP) { var v2 = this.textField.bottomScroll - this.textField.scroll; this.__set__position(Math.max(1, this.__get__position() - v2)); return true; return false; } if (__reg0 === gfx.ui.NavigationCode.PAGE_DOWN) { v2 = this.textField.bottomScroll - this.textField.scroll; this.__set__position(Math.min(this.maxscroll, this.__get__position() + v2)); return true; } return false; }; v2.configUI = function () { super.configUI(); Mouse.addListener(this); this.container = this.createEmptyMovieClip('container', 1); this.container.scale9Grid = new flash.geom.Rectangle(20, 20, 1, 1); if (this.inspectableScrollBar != '') { this.__set__scrollBar(this.inspectableScrollBar); this.inspectableScrollBar = null; } }; v2.draw = function () { super.draw(); this.container._xscale = 10000 / this._xscale; this.container._yscale = 10000 / this._yscale; if (this.autoScrollBar) { this._scrollBar._x = this.__width - this._scrollBar._width; this._scrollBar.height = this.__height - 1; } }; v2.updateText = function () { super.updateText(); this.updateScrollBar(); }; v2.updateTextField = function () { this.resetScrollPosition = true; super.updateTextField(); if (this.textField != null) { if (this._scrollBar != null) { this._scrollBar.scrollTarget = this.textField; } } }; v2.updateScrollBar = function () { this.maxscroll = this.textField.maxscroll; if (this._scrollBar != undefined) { var v2 = this.constraints.getElement(this.textField); if (this._scrollPolicy == 'on' || this._scrollPolicy == 'auto' && this.textField.maxscroll > 1) { if (this.autoScrollBar && !this._scrollBar.visible) { if (v2 != null) { v2.metrics.right += this._scrollBar._width; this.constraints.update(this.__width, this.__height); } this.maxscroll = this.textField.maxscroll; } this._scrollBar.visible = true; } if (this._scrollPolicy == 'off' || this._scrollPolicy == 'auto' && this.textField.maxscroll == 1) { if (this.autoScrollBar && this._scrollBar.visible) { if (v2 != null) { v2.metrics.right -= this._scrollBar._width; this.constraints.update(this.__width, this.__height); } } this._scrollBar.visible = false; } if (this._scrollBar.disabled != this._disabled) { this._scrollBar.disabled = this._disabled; } } }; v2.onChanged = function (target) { if (this.maxscroll != this.textField.maxscroll) { this.updateScrollBar(); } super.onChanged(target); }; v2.onScroller = function () { if (this.resetScrollPosition) { this.textField.scroll = this._position; } else { this._position = this.textField.scroll; } this.resetScrollPosition = false; this.dispatchEventAndSound({'type': 'scroll'}); }; v2.scrollWheel = function (delta) { this.__set__position(Math.max(1, Math.min(this.maxscroll, this._position - delta))); }; v2.soundMap = {'theme': 'default', 'focusIn': 'focusIn', 'focusOut': 'focusOut', 'textChange': 'textChange', 'scroll': 'scroll'}; v2._scrollPolicy = 'auto'; v2._position = 1; v2.maxscroll = 1; v2.autoScrollBar = false; v2.resetScrollPosition = false; v2.addProperty('disabled', v2.__get__disabled, v2.__set__disabled); v2.addProperty('position', v2.__get__position, v2.__set__position); v2.addProperty('scrollBar', v2.__get__scrollBar, v2.__set__scrollBar); v2.addProperty('scrollPolicy', v2.__get__scrollPolicy, v2.__set__scrollPolicy); ASSetPropFlags(gfx.controls.TextArea.prototype, null, 1); } #endinitclip } movieClip 335 __Packages.JournalSaveLoadList { #initclip if (!_global.JournalSaveLoadList) { var v1 = function () { super(); }; _global.JournalSaveLoadList = v1; _global.JournalSaveLoadList extends Shared.BSScrollingList; var v2 = v1.prototype; v2.SetEntry = function (aEntryClip, aEntryObject) { super.SetEntry(aEntryClip, aEntryObject); if (aEntryObject.fileNum == undefined) { aEntryClip.SaveNumber.SetText(' '); } else { if (aEntryObject.fileNum < 10) { aEntryClip.SaveNumber.SetText('00' + aEntryObject.fileNum); } else { if (aEntryObject.fileNum < 100) { aEntryClip.SaveNumber.SetText('0' + aEntryObject.fileNum); } else { aEntryClip.SaveNumber.SetText(aEntryObject.fileNum); } } } if (this.ListScrollbar != undefined) { aEntryClip._x = this.iMaxScrollPosition <= 0 ? 0 : 25; } }; v2.moveSelectionUp = function () { super.moveSelectionUp(); gfx.io.GameDelegate.call('PlaySound', ['UIMenuFocus']); }; v2.moveSelectionDown = function () { super.moveSelectionDown(); gfx.io.GameDelegate.call('PlaySound', ['UIMenuFocus']); }; ASSetPropFlags(_global.JournalSaveLoadList.prototype, null, 1); } #endinitclip } movieClip 336 __Packages.SaveLoadPanel { #initclip if (!_global.SaveLoadPanel) { var v1 = function () { super(); gfx.events.EventDispatcher.initialize(this); this.SaveLoadList_mc = this.List_mc; this.bSaving = true; this.showCharacterBackHint = false; this.showingCharacterList = false; this.lastSelectedIndexMemory = 0; this.uiSaveLoadManagerProcessedElements = 0; this.uiSaveLoadManagerNumElementsToLoad = 0; this.isForceStopping = false; }; _global.SaveLoadPanel = v1; _global.SaveLoadPanel extends MovieClip; var v2 = v1.prototype; v2.onLoad = function () { this.ScreenshotLoader = new MovieClipLoader(); this.ScreenshotLoader.addListener(this); gfx.io.GameDelegate.addCallBack('ConfirmOKToLoad', this, 'onOKToLoadConfirm'); gfx.io.GameDelegate.addCallBack('onSaveLoadBatchComplete', this, 'onSaveLoadBatchComplete'); gfx.io.GameDelegate.addCallBack('onFillCharacterListComplete', this, 'onFillCharacterListComplete'); gfx.io.GameDelegate.addCallBack('ScreenshotReady', this, 'ShowScreenshot'); this.SaveLoadList_mc.addEventListener('itemPress', this, 'onSaveLoadItemPress'); this.SaveLoadList_mc.addEventListener('selectionChange', this, 'onSaveLoadItemHighlight'); this.iBatchSize = this.SaveLoadList_mc.maxEntries; this.PlayerInfoText.createTextField('LevelText', this.PlayerInfoText.getNextHighestDepth(), 0, 0, 200, 30); this.PlayerInfoText.LevelText.text = '$Level'; this.PlayerInfoText.LevelText._visible = false; }; v2.__get__isSaving = function () { return this.bSaving; }; v2.__set__isSaving = function (abFlag) { this.bSaving = abFlag; return this.__get__isSaving(); }; v2.__get__isShowingCharacterList = function () { return this.showingCharacterList; }; v2.__set__isShowingCharacterList = function (abFlag) { this.showingCharacterList = abFlag; if (this.iPlatform != SaveLoadPanel.CONTROLLER_ORBIS) { this.ScreenshotHolder._visible = !this.showingCharacterList; } this.PlayerInfoText._visible = !this.showingCharacterList; return this.__get__isShowingCharacterList(); }; v2.__get__selectedIndex = function () { return this.SaveLoadList_mc.selectedIndex; }; v2.__get__platform = function () { return this.iPlatform; }; v2.__set__platform = function (aiPlatform) { this.iPlatform = aiPlatform; return this.__get__platform(); }; v2.__get__batchSize = function () { return this.iBatchSize; }; v2.__get__numSaves = function () { return this.SaveLoadList_mc.entryList.length; }; v2.__get__selectedEntry = function () { return this.SaveLoadList_mc.entryList[this.SaveLoadList_mc.selectedIndex]; }; v2.__get__LastSelectedIndexMemory = function () { if (this.lastSelectedIndexMemory > this.SaveLoadList_mc.entryList.length - 1) { this.lastSelectedIndexMemory = Math.max(0, this.SaveLoadList_mc.entryList.length - 1); } return this.lastSelectedIndexMemory; }; v2.onSaveLoadItemPress = function (event) { this.lastSelectedIndexMemory = this.SaveLoadList_mc.selectedIndex; if (this.__get__isShowingCharacterList()) { var v3 = this.SaveLoadList_mc.entryList[this.SaveLoadList_mc.selectedIndex]; if (v3 != undefined) { if (this.iPlatform != 0) { this.SaveLoadList_mc.selectedIndex = 0; } var v2 = v3.flags; if (v2 == undefined) { v2 = 0; } var v4 = v3.id; if (v4 == undefined) { v2 = 4294967295.0; } gfx.io.GameDelegate.call('CharacterSelected', [v4, v2, this.bSaving, this.SaveLoadList_mc.entryList, this.iBatchSize]); this.dispatchEvent({'type': 'OnCharacterSelected'}); return undefined; } } if (!this.bSaving) { gfx.io.GameDelegate.call('IsOKtoLoad', [this.SaveLoadList_mc.selectedIndex]); return undefined; } this.dispatchEvent({'type': 'saveGameSelected', 'index': this.SaveLoadList_mc.selectedIndex}); }; v2.onOKToLoadConfirm = function () { this.dispatchEvent({'type': 'loadGameSelected', 'index': this.SaveLoadList_mc.selectedIndex}); }; v2.ForceStopLoading = function () { this.isForceStopping = true; if (this.uiSaveLoadManagerProcessedElements < this.uiSaveLoadManagerNumElementsToLoad) { gfx.io.GameDelegate.call('ForceStopSaveListLoading', []); } }; v2.RemoveScreenshot = function () { if (this.iScreenshotTimerID != undefined) { clearInterval(this.iScreenshotTimerID); this.iScreenshotTimerID = undefined; } if (this.ScreenshotRect != undefined) { this.ScreenshotRect.removeMovieClip(); this.PlayerInfoText.textField.SetText(' '); this.PlayerInfoText.DateText.SetText(' '); this.PlayerInfoText.PlayTimeText.SetText(' '); this.ScreenshotRect = undefined; } }; v2.onSaveLoadItemHighlight = function (event) { if (this.isForceStopping) { return undefined; } this.RemoveScreenshot(); if (this.__get__isShowingCharacterList()) { return undefined; } if (event.index != -1) { this.iScreenshotTimerID = setInterval(this, 'PrepScreenshot', SaveLoadPanel.SCREENSHOT_DELAY); } this.dispatchEvent({'type': 'saveHighlighted', 'index': this.SaveLoadList_mc.selectedIndex}); }; v2.PrepScreenshot = function () { clearInterval(this.iScreenshotTimerID); this.iScreenshotTimerID = undefined; if (this.bSaving) { gfx.io.GameDelegate.call('PrepSaveGameScreenshot', [this.SaveLoadList_mc.selectedIndex - 1, this.SaveLoadList_mc.selectedEntry]); return undefined; } gfx.io.GameDelegate.call('PrepSaveGameScreenshot', [this.SaveLoadList_mc.selectedIndex, this.SaveLoadList_mc.selectedEntry]); }; v2.ShowScreenshot = function () { this.ScreenshotRect = this.ScreenshotHolder.createEmptyMovieClip('ScreenshotRect', 0); this.ScreenshotLoader.loadClip('img://BGSSaveLoadHeader_Screenshot', this.ScreenshotRect); if (this.SaveLoadList_mc.selectedEntry.corrupt == true) { this.PlayerInfoText.textField.SetText('$SAVE CORRUPT'); } else { if (this.SaveLoadList_mc.selectedEntry.obsolete == true) { this.PlayerInfoText.textField.SetText('$SAVE OBSOLETE'); } else { if (this.SaveLoadList_mc.selectedEntry.name == undefined) { this.PlayerInfoText.textField.SetText(' '); } else { var v2 = this.SaveLoadList_mc.selectedEntry.name; var v3 = 20; if (v2.length > v3) { v2 = v2.substr(0, v3 - 3) + '...'; } if (this.SaveLoadList_mc.selectedEntry.raceName != undefined && this.SaveLoadList_mc.selectedEntry.raceName.length > 0) { v2 += ', ' + this.SaveLoadList_mc.selectedEntry.raceName; } if (this.SaveLoadList_mc.selectedEntry.level != undefined && this.SaveLoadList_mc.selectedEntry.level > 0) { v2 += ', ' + this.PlayerInfoText.LevelText.text + ' ' + this.SaveLoadList_mc.selectedEntry.level; } this.PlayerInfoText.textField.textAutoSize = 'shrink'; this.PlayerInfoText.textField.SetText(v2); } } } if (this.SaveLoadList_mc.selectedEntry.playTime == undefined) { this.PlayerInfoText.PlayTimeText.SetText(' '); } else { this.PlayerInfoText.PlayTimeText.SetText(this.SaveLoadList_mc.selectedEntry.playTime); } if (this.SaveLoadList_mc.selectedEntry.dateString != undefined) { this.PlayerInfoText.DateText.SetText(this.SaveLoadList_mc.selectedEntry.dateString); return undefined; } this.PlayerInfoText.DateText.SetText(' '); }; v2.onLoadInit = function (aTargetClip) { aTargetClip._width = this.ScreenshotHolder.sizer._width; aTargetClip._height = this.ScreenshotHolder.sizer._height; }; v2.onFillCharacterListComplete = function (abDoInitialUpdate) { (this.__get__isShowingCharacterList())(true); var v3 = 20; var v2 = 0; while (v2 < this.SaveLoadList_mc.entryList.length) { if (this.SaveLoadList_mc.entryList[v2].text.length > v3) { this.SaveLoadList_mc.entryList[v2].text = this.SaveLoadList_mc.entryList[v2].text.substr(0, v3 - 3) + '...'; } ++v2; } this.SaveLoadList_mc.InvalidateData(); if (this.iPlatform != 0) { this.onSaveLoadItemHighlight({'index': this.__get__LastSelectedIndexMemory()}); this.SaveLoadList_mc.selectedIndex = this.LastSelectedIndexMemory; this.SaveLoadList_mc.UpdateList(); } this.dispatchEvent({'type': 'saveListCharactersPopulated'}); }; v2.onSaveLoadBatchComplete = function (abDoInitialUpdate, aNumProcessed, aSaveCount) { var v3 = 20; this.uiSaveLoadManagerProcessedElements = aNumProcessed; this.uiSaveLoadManagerNumElementsToLoad = aSaveCount; var v2 = 0; while (v2 < this.SaveLoadList_mc.entryList.length) { if (this.iPlatform == SaveLoadPanel.CONTROLLER_ORBIS) { if (this.SaveLoadList_mc.entryList[v2].text == undefined) { this.SaveLoadList_mc.entryList.splice(v2, 1); } } if (this.SaveLoadList_mc.entryList[v2].text.length > v3) { this.SaveLoadList_mc.entryList[v2].text = this.SaveLoadList_mc.entryList[v2].text.substr(0, v3 - 3) + '...'; } ++v2; } var v4 = '$[NEW SAVE]'; if (this.bSaving && this.SaveLoadList_mc.entryList[0].text != v4) { var v5 = {'name': ' ', 'playTime': ' ', 'text': v4}; this.SaveLoadList_mc.entryList.unshift(v5); } else { if (!this.bSaving && this.SaveLoadList_mc.entryList[0].text == v4) { this.SaveLoadList_mc.entryList.shift(); } } this.SaveLoadList_mc.InvalidateData(); if (this.iPlatform == SaveLoadPanel.CONTROLLER_ORBIS) { this.lastSelectedIndexMemory = 0; } if (abDoInitialUpdate) { this.isForceStopping = false; this.__set__isShowingCharacterList(false); this.onSaveLoadItemHighlight({'index': this.__get__LastSelectedIndexMemory()}); this.SaveLoadList_mc.selectedIndex(this.__get__LastSelectedIndexMemory()); this.SaveLoadList_mc.UpdateList(); this.dispatchEvent({'type': 'saveListPopulated'}); return undefined; } if (this.isForceStopping) { return undefined; } this.dispatchEvent({'type': 'saveListOnBatchAdded'}); }; v2.DeleteSelectedSave = function () { if (!this.bSaving || this.SaveLoadList_mc.selectedIndex != 0) { if (this.bSaving) { gfx.io.GameDelegate.call('DeleteSave', [this.SaveLoadList_mc.selectedIndex - 1]); } else { gfx.io.GameDelegate.call('DeleteSave', [this.SaveLoadList_mc.selectedIndex]); } this.SaveLoadList_mc.entryList.splice(this.SaveLoadList_mc.selectedIndex, 1); this.SaveLoadList_mc.InvalidateData(); this.onSaveLoadItemHighlight({'index': this.SaveLoadList_mc.selectedIndex}); } }; v2.PopulateEmptySaveList = function () { this.SaveLoadList_mc.ClearList(); this.SaveLoadList_mc.entryList.push(new Object()); this.onSaveLoadBatchComplete(true, 0, 0); }; v2.OnSelectClicked = function () { this.onSaveLoadItemPress(null); }; v2.OnBackClicked = function () { this.dispatchEvent({'type': 'OnSaveLoadPanelBackClicked'}); }; v1.SCREENSHOT_DELAY = 200; v1.CONTROLLER_PC = 0; v1.CONTROLLER_PC_GAMEPAD = 1; v1.CONTROLLER_DURANGO = 2; v1.CONTROLLER_ORBIS = 3; v2.addProperty('LastSelectedIndexMemory', v2.__get__LastSelectedIndexMemory, function () {}); v2.addProperty('batchSize', v2.__get__batchSize, function () {}); v2.addProperty('isSaving', v2.__get__isSaving, v2.__set__isSaving); v2.addProperty('isShowingCharacterList', v2.__get__isShowingCharacterList, v2.__set__isShowingCharacterList); v2.addProperty('numSaves', v2.__get__numSaves, function () {}); v2.addProperty('platform', v2.__get__platform, v2.__set__platform); v2.addProperty('selectedEntry', v2.__get__selectedEntry, function () {}); v2.addProperty('selectedIndex', v2.__get__selectedIndex, function () {}); ASSetPropFlags(_global.SaveLoadPanel.prototype, null, 1); } #endinitclip } movieClip 337 __Packages.InputMappingArt { #initclip if (!_global.InputMappingArt) { var v1 = function () { super(); }; _global.InputMappingArt = v1; _global.InputMappingArt extends MovieClip; var v2 = v1.prototype; v2.__set__hiddenBackground = function (a_flag) { this.background._visible = !a_flag; return this.__get__hiddenBackground(); }; v2.__get__hiddenBackground = function () { return this.background._visible; }; v2.__get__width = function () { return this.background._width; }; v2.__set__width = function (a_value) { this.background._width = a_value; return this.__get__width(); }; v2.MappedButton = function () { super(); Shared.GlobalFunc.MaintainTextFormat(); }; v2.onLoad = function () { this.buttonArt = []; this._keyCodes = []; this.textField.textAutoSize = 'shrink'; this.textField._visible = false; this.background._visible = false; var v2 = 0; while (this['buttonArt' + v2] != undefined) { this['buttonArt' + v2]._visible = false; this.buttonArt.push(this['buttonArt' + v2]); ++v2; } this._buttonNameMap.1 = 2; this._buttonNameMap.2 = 3; this._buttonNameMap.3 = 4; this._buttonNameMap.4 = 5; this._buttonNameMap.5 = 6; this._buttonNameMap.6 = 7; this._buttonNameMap.7 = 8; this._buttonNameMap.8 = 9; this._buttonNameMap.9 = 10; this._buttonNameMap.0 = 11; this._buttonNameMap.l-ctrl = 29; this._buttonNameMap.l-shift = 42; this._buttonNameMap.r-shift = 54; this._buttonNameMap.l-alt = 56; this._buttonNameMap.r-ctrl = 157; this._buttonNameMap.r-alt = 184; this._buttonNameMap.delete = 211; this._buttonNameMap.360_start = 270; this._buttonNameMap.360_back = 271; this._buttonNameMap.360_l3 = 272; this._buttonNameMap.360_r3 = 273; this._buttonNameMap.360_lb = 274; this._buttonNameMap.360_rb = 275; this._buttonNameMap.360_a = 276; this._buttonNameMap.360_b = 277; this._buttonNameMap.360_x = 278; this._buttonNameMap.360_y = 279; this._buttonNameMap.360_lt = 280; this._buttonNameMap.360_rt = 281; }; v2.setButtonName = function (a_buttonName) { this.textField._visible = false; var v5 = this._buttonNameMap[a_buttonName.toLowerCase()]; if (v5 instanceof Array) { this._keyCodes = v5; } else { this._keyCodes = [v5]; } if (this._keyCodes[0] == null) { var v3 = 0; while (v3 < this.buttonArt.length) { this.buttonArt[v3]._visible = false; ++v3; } this.textField.SetText(a_buttonName); this.textField._width = (this.textField.getLineMetrics(0)).width; this.textField._visible = true; this.background._width = this.textField._width; return undefined; } var v4 = 0; v3 = 0; while (v3 < this.buttonArt.length) { var v2 = this.buttonArt[v3]; if (this._keyCodes[v3] > 0) { v2._visible = true; v2.gotoAndStop(this._keyCodes[v3]); v2._x = v4; v2._y = 0; v4 += v2._width; } else { v2._visible = false; } ++v3; } this.background._width = v4; }; v2._buttonNameMap = {'esc': 1, 'hyphen': 12, 'equal': 13, 'backspace': 14, 'tab': 15, 'q': 16, 'w': 17, 'e': 18, 'r': 19, 't': 20, 'y': 21, 'u': 22, 'i': 23, 'o': 24, 'p': 25, 'bracketleft': 26, 'bracketright': 27, 'enter': 28, 'a': 30, 's': 31, 'd': 32, 'f': 33, 'g': 34, 'h': 35, 'j': 36, 'k': 37, 'l': 38, 'semicolon': 39, 'quotesingle': 40, 'tilde': 41, 'backslash': 43, 'z': 44, 'x': 45, 'c': 46, 'v': 47, 'b': 48, 'n': 49, 'm': 50, 'comma': 51, 'period': 52, 'slash': 53, 'numpadmult': 55, 'space': 57, 'capslock': 58, 'f1': 59, 'f2': 60, 'f3': 61, 'f4': 62, 'f5': 63, 'f6': 64, 'f7': 65, 'f8': 66, 'f9': 67, 'f10': 68, 'numlock': 69, 'scrolllock': 70, 'numpad7': 71, 'numpad8': 72, 'numpad9': 73, 'numpadminus': 74, 'numpad4': 75, 'numpad5': 76, 'numpad6': 77, 'numpadplus': 78, 'numpad1': 79, 'numpad2': 80, 'numpad3': 81, 'numpad0': 82, 'numpaddec': 83, 'f11': 87, 'f12': 88, 'numpadenter': 156, 'numpaddivide': 158, 'printsrc': 183, 'pause': 197, 'home': 199, 'up': 200, 'pgup': 201, 'left': 203, 'right': 205, 'end': 207, 'down': 208, 'pgdn': 209, 'insert': 210, 'mouse1': 256, 'mouse2': 257, 'mouse3': 258, 'mouse4': 259, 'mouse5': 260, 'mouse6': 261, 'mouse7': 262, 'mouse8': 263, 'mousewheelup': 264, 'mousewheeldown': 265, 'ps3_start': 270, 'ps3_back': 271, 'ps3_l3': 272, 'ps3_r3': 273, 'ps3_lb': 274, 'ps3_rb': 275, 'ps3_a': 276, 'ps3_b': 277, 'ps3_x': 278, 'ps3_y': 279, 'ps3_lt': 280, 'ps3_rt': 281}; v2.addProperty('hiddenBackground', v2.__get__hiddenBackground, v2.__set__hiddenBackground); v2.addProperty('width', v2.__get__width, v2.__set__width); ASSetPropFlags(_global.InputMappingArt.prototype, null, 1); } #endinitclip } movieClip 338 __Packages.InputMappingList { #initclip if (!_global.InputMappingList) { var v1 = function () { super(); }; _global.InputMappingList = v1; _global.InputMappingList extends Shared.BSScrollingList; var v2 = v1.prototype; v2.GetEntryHeight = function (aiEntryIndex) { var v2 = this.GetClipByIndex(0); return v2._height; }; v2.SetEntry = function (aEntryClip, aEntryObject) { var v4 = aEntryClip.buttonArt; var v2 = aEntryClip.textField; v4._alpha = (aEntryObject == this.__get__selectedEntry()) ? 100 : 30; v2._alpha = (aEntryObject == this.__get__selectedEntry()) ? 100 : 30; v2.textAutoSize = 'shrink'; v4.setButtonName(aEntryObject.buttonName); v2.SetText('$' + aEntryObject.text); }; ASSetPropFlags(_global.InputMappingList.prototype, null, 1); } #endinitclip } movieClip 339 __Packages.gfx.controls.OptionStepper { #initclip if (!_global.gfx) { _global.gfx = new Object(); } if (!_global.gfx.controls) { _global.gfx.controls = new Object(); } if (!_global.gfx.controls.OptionStepper) { var v1 = function () { super(); this.tabChildren = false; this.tabEnabled = !this._disabled; this.focusEnabled = this.tabEnabled; this.__set__dataProvider([]); }; gfx.controls.OptionStepper = v1; gfx.controls.OptionStepper extends gfx.core.UIComponent; var v2 = v1.prototype; v2.__get__disabled = function () { return this._disabled; }; v2.__set__disabled = function (value) { if (this._disabled != value) { super.__set__disabled(value); this.tabEnabled = !this._disabled; this.focusEnabled = this.tabEnabled; this.gotoAndPlay(this._disabled ? 'disabled' : (this._focused ? 'focused' : 'default')); if (this.initialized) { this.updateAfterStateChange(); this.nextBtn.disabled = this._disabled; this.prevBtn.disabled = this.nextBtn.disabled; return undefined; } } return this.__get__disabled(); }; v2.__get__dataProvider = function () { return this._dataProvider; }; v2.__set__dataProvider = function (value) { if (value != this._dataProvider) { if (this._dataProvider != null) { this._dataProvider.removeEventListener('change', this, 'onDataChange'); } this._dataProvider = value; this.selectedItem = null; if (this._dataProvider != null) { if (value instanceof Array && !value.isDataProvider) { gfx.data.DataProvider.initialize(this._dataProvider); } else { if (this._dataProvider.initialize != null) { this._dataProvider.initialize(this); } } this._dataProvider.addEventListener('change', this, 'onDataChange'); this.updateSelectedItem(); return undefined; } } return this.__get__dataProvider(); }; v2.__get__selectedIndex = function () { return this._selectedIndex; }; v2.__set__selectedIndex = function (value) { var v2 = Math.max(0, Math.min(this._dataProvider.length - 1, value)); if (v2 != this._selectedIndex) { this._selectedIndex = v2; this.updateSelectedItem(); return undefined; } return this.__get__selectedIndex(); }; v2.__get__labelField = function () { return this._labelField; }; v2.__set__labelField = function (value) { this._labelField = value; this.updateLabel(); return this.__get__labelField(); }; v2.__get__labelFunction = function () { return this._labelFunction; }; v2.__set__labelFunction = function (value) { this._labelFunction = value; this.updateLabel(); return this.__get__labelFunction(); }; v2.itemToLabel = function (item) { if (item == null) { return ''; } if (this._labelFunction == null) { if (this._labelField != null && item[this._labelField] != null) { return item[this._labelField]; } return item.toString(); } return this._labelFunction(item); return item.toString(); }; v2.invalidateData = function () { this._dataProvider.requestItemAt(this._selectedIndex, this, 'populateText'); }; v2.handleInput = function (details, pathToFocus) { var v2 = details.value == 'keyDown' || details.value == 'keyHold'; __reg0 = details.navEquivalent; if (__reg0 === gfx.ui.NavigationCode.RIGHT) { if (this._selectedIndex < this._dataProvider.length - 1) { if (v2) { this.onNext(); } return true; } return false; } if (__reg0 === gfx.ui.NavigationCode.LEFT) { if (this._selectedIndex > 0) { if (v2) { this.onPrev(); } return true; } return false; } if (__reg0 === gfx.ui.NavigationCode.HOME) { if (!v2) { this.__set__selectedIndex(0); } return true; return false; } if (__reg0 === gfx.ui.NavigationCode.END) { if (!v2) { this.__set__selectedIndex(this._dataProvider.length - 1); } return true; } return false; }; v2.toString = function () { return '[Scaleform OptionStepper ' + this._name + ']'; }; v2.configUI = function () { super.configUI(); this.nextBtn.addEventListener('click', this, 'onNext'); this.prevBtn.addEventListener('click', this, 'onPrev'); this.nextBtn.focusTarget = this; this.prevBtn.focusTarget = this.nextBtn.focusTarget; this.nextBtn.tabEnabled = false; this.prevBtn.tabEnabled = this.nextBtn.tabEnabled; this.nextBtn.autoRepeat = true; this.prevBtn.autoRepeat = this.nextBtn.autoRepeat; this.nextBtn.disabled = this._disabled; this.prevBtn.disabled = this.nextBtn.disabled; this.constraints = new gfx.utils.Constraints(this, true); this.constraints.addElement(this.textField, gfx.utils.Constraints.ALL); this.updateAfterStateChange(); }; v2.draw = function () { if (this.sizeIsInvalid) { this._width = this.__width; this._height = this.__height; } super.draw(); if (this.constraints != null) { this.constraints.update(this.__width, this.__height); } }; v2.changeFocus = function () { this.gotoAndPlay(this._disabled ? 'disabled' : (this._focused ? 'focused' : 'default')); this.updateAfterStateChange(); this.nextBtn.displayFocus = this._focused != 0; this.prevBtn.displayFocus = this.nextBtn.displayFocus; }; v2.updateAfterStateChange = function () { this.validateNow(); this.updateLabel(); if (this.constraints != null) { this.constraints.update(this.__width, this.__height); } this.dispatchEvent({'type': 'stateChange', 'state': this._disabled ? 'disabled' : (this._focused ? 'focused' : 'default')}); }; v2.updateLabel = function () { if (this.selectedItem != null) { if (this.textField != null) { this.textField.text = this.itemToLabel(this.selectedItem); } } }; v2.updateSelectedItem = function () { this.invalidateData(); }; v2.populateText = function (item) { this.selectedItem = item; this.updateLabel(); this.dispatchEvent({'type': 'change'}); }; v2.onNext = function (evtObj) { this.__set__selectedIndex(this.__get__selectedIndex() + 1); }; v2.onPrev = function (evtObj) { this.__set__selectedIndex(this.__get__selectedIndex() - 1); }; v2.onDataChange = function (event) { this.invalidateData(); }; v2.soundMap = {'theme': 'default', 'focusIn': 'focusIn', 'focusOut': 'focusOut', 'change': 'change'}; v2._selectedIndex = 0; v2._labelField = 'label'; v2.addProperty('dataProvider', v2.__get__dataProvider, v2.__set__dataProvider); v2.addProperty('disabled', v2.__get__disabled, v2.__set__disabled); v2.addProperty('labelField', v2.__get__labelField, v2.__set__labelField); v2.addProperty('labelFunction', v2.__get__labelFunction, v2.__set__labelFunction); v2.addProperty('selectedIndex', v2.__get__selectedIndex, v2.__set__selectedIndex); ASSetPropFlags(gfx.controls.OptionStepper.prototype, null, 1); } #endinitclip } movieClip 340 __Packages.gfx.data.DataProvider { #initclip if (!_global.gfx) { _global.gfx = new Object(); } if (!_global.gfx.data) { _global.gfx.data = new Object(); } if (!_global.gfx.data.DataProvider) { var v1 = function (total) { super(); gfx.events.EventDispatcher.initialize(this); }; gfx.data.DataProvider = v1; gfx.data.DataProvider extends Array; var v2 = v1.prototype; v1.initialize = function (data) { if (gfx.data.DataProvider.instance == undefined) { gfx.data.DataProvider.instance = new gfx.data.DataProvider(); } var v3 = ['indexOf', 'requestItemAt', 'requestItemRange', 'invalidate', 'toString', 'cleanUp', 'isDataProvider']; var v2 = 0; while (v2 < v3.length) { data[v3[v2]] = gfx.data.DataProvider.instance[v3[v2]]; ++v2; } gfx.events.EventDispatcher.initialize(data); _global.ASSetPropFlags(data, v3, 1); _global.ASSetPropFlags(data, 'addEventListener,removeEventListener,hasEventListener,removeAllEventListeners,dispatchEvent,dispatchQueue,cleanUpEvents', 1); }; v2.indexOf = function (value, scope, callBack) { var v2 = 0; v2 = 0; while (v2 < this.length) { if (this[v2] == value) { break; } ++v2; } var v4 = (v2 == this.length) ? -1 : v2; if (callBack) { scope[callBack].call(scope, v4); } return v4; }; v2.requestItemAt = function (index, scope, callBack) { var v2 = this[index]; if (callBack) { scope[callBack].call(scope, v2); } return v2; }; v2.requestItemRange = function (startIndex, endIndex, scope, callBack) { var v2 = this.slice(startIndex, endIndex + 1); if (callBack) { scope[callBack].call(scope, v2); } return v2; }; v2.invalidate = function (length) { this.dispatchEvent({'type': 'change'}); }; v2.cleanUp = function () { this.splice(0, this.length); this.cleanUpEvents(); }; v2.toString = function () { return '[DataProvider (' + this.length + ')]'; }; v2.isDataProvider = true; ASSetPropFlags(gfx.data.DataProvider.prototype, null, 1); } #endinitclip } movieClip 341 __Packages.SettingsOptionItem { #initclip if (!_global.SettingsOptionItem) { var v1 = function () { super(); Mouse.addListener(this); this.ScrollBar_mc = this.scrollBar; this.OptionStepper_mc = this.optionStepper; this.CheckBox_mc = this.checkBox; this.bSendChangeEvent = true; this.textField.textAutoSize = 'shrink'; }; _global.SettingsOptionItem = v1; _global.SettingsOptionItem extends MovieClip; var v2 = v1.prototype; v2.onLoad = function () { this.ScrollBar_mc.setScrollProperties(0.7, 0, 20); this.ScrollBar_mc.addEventListener('scroll', this, 'onScroll'); this.OptionStepper_mc.addEventListener('change', this, 'onStepperChange'); this.bSendChangeEvent = true; }; v2.__get__movieType = function () { return this.iMovieType; }; v2.__set__movieType = function (aiMovieType) { this.iMovieType = aiMovieType; this.ScrollBar_mc.disabled = true; this.ScrollBar_mc.visible = false; this.OptionStepper_mc.disabled = true; this.OptionStepper_mc.visible = false; this.CheckBox_mc._visible = false; switch (this.iMovieType) { case 0: this.ScrollBar_mc.disabled = false; this.ScrollBar_mc.visible = true; break; case 1: this.OptionStepper_mc.disabled = false; this.OptionStepper_mc.visible = true; break; case 2: this.CheckBox_mc._visible = true; } return this.__get__movieType(); }; v2.__get__ID = function () { return this.iID; }; v2.__set__ID = function (aiNewValue) { this.iID = aiNewValue; return this.__get__ID(); }; v2.__get__value = function () { var v2; switch (this.iMovieType) { return v2; case 0: v2 = this.ScrollBar_mc.position / 20; return v2; case 1: v2 = this.OptionStepper_mc.selectedIndex; return v2; case 2: v2 = this.CheckBox_mc._currentframe - 1; return v2; } return v2; }; v2.__set__value = function (afNewValue) { switch (this.iMovieType) { case 0: this.bSendChangeEvent = false; this.ScrollBar_mc.position = afNewValue * 20; this.bSendChangeEvent = true; break; case 1: this.bSendChangeEvent = false; this.OptionStepper_mc.selectedIndex = afNewValue; this.bSendChangeEvent = true; break; case 2: this.CheckBox_mc.gotoAndStop(afNewValue + 1); } return this.__get__value(); }; v2.__get__text = function () { return this.textField.text; }; v2.__set__text = function (astrNew) { this.textField.SetText(astrNew); return this.__get__text(); }; v2.__get__selected = function () { return this.textField._alpha == 100; }; v2.__set__selected = function (abSelected) { this.textField._alpha = abSelected ? 100 : 30; this.ScrollBar_mc._alpha = abSelected ? 100 : 30; this.OptionStepper_mc._alpha = abSelected ? 100 : 30; this.CheckBox_mc._alpha = abSelected ? 100 : 30; return this.__get__selected(); }; v2.handleInput = function (details, pathToFocus) { var v3 = false; if (Shared.GlobalFunc.IsKeyPressed(details)) { switch (this.iMovieType) { return v3; case 0: if (details.navEquivalent == gfx.ui.NavigationCode.LEFT) { this.ScrollBar_mc.position -= 1; v3 = true; } else { if (details.navEquivalent == gfx.ui.NavigationCode.RIGHT) { this.ScrollBar_mc.position += 1; v3 = true; } } return v3; case 1: if (details.navEquivalent == gfx.ui.NavigationCode.LEFT || details.navEquivalent == gfx.ui.NavigationCode.RIGHT) { v3 = this.OptionStepper_mc.handleInput(details, pathToFocus); } return v3; case 2: if (details.navEquivalent == gfx.ui.NavigationCode.ENTER) { this.ToggleCheckbox(); v3 = true; } return v3; } } return v3; }; v2.SetOptionStepperOptions = function (aOptions) { this.bSendChangeEvent = false; this.OptionStepper_mc.dataProvider = aOptions; this.bSendChangeEvent = true; }; v2.onMousePress = function () { var v2 = Mouse.getTopMostEntity(); switch (this.iMovieType) { case 0: if (v2 == this.ScrollBar_mc.thumb) { this.ScrollBar_mc.thumb.onPress(); } else { if (v2._parent == this.ScrollBar_mc.upArrow) { this.ScrollBar_mc.upArrow.onPress(); } else { if (v2._parent == this.ScrollBar_mc.downArrow) { this.ScrollBar_mc.downArrow.onPress(); } else { if (v2 == this.ScrollBar_mc.track) { this.ScrollBar_mc.track.onPress(); } } } } break; case 1: if (v2 == this.OptionStepper_mc.nextBtn || v2 == this.OptionStepper_mc.textField) { this.OptionStepper_mc.nextBtn.onPress(); } else { if (v2 == this.OptionStepper_mc.prevBtn) { this.OptionStepper_mc.prevBtn.onPress(); } } } }; v2.onRelease = function () { var v2 = Mouse.getTopMostEntity(); switch (this.iMovieType) { case 0: if (v2 == this.ScrollBar_mc.thumb) { this.ScrollBar_mc.thumb.onRelease(); } else { if (v2._parent == this.ScrollBar_mc.upArrow) { this.ScrollBar_mc.upArrow.onRelease(); } else { if (v2._parent == this.ScrollBar_mc.downArrow) { this.ScrollBar_mc.downArrow.onRelease(); } else { if (v2 == this.ScrollBar_mc.track) { this.ScrollBar_mc.track.onRelease(); } } } } break; case 1: if (v2 == this.OptionStepper_mc.nextBtn || v2 == this.OptionStepper_mc.textField) { this.OptionStepper_mc.nextBtn.onRelease(); } else { if (v2 == this.OptionStepper_mc.prevBtn) { this.OptionStepper_mc.prevBtn.onRelease(); } } break; case 2: if (v2._parent == this.CheckBox_mc) { this.ToggleCheckbox(); } } }; v2.ToggleCheckbox = function () { if (this.CheckBox_mc._currentframe == 1) { this.CheckBox_mc.gotoAndStop(2); } else { if (this.CheckBox_mc._currentframe == 2) { this.CheckBox_mc.gotoAndStop(1); } } this.DoOptionChange(); }; v2.onStepperChange = function (event) { if (this.bSendChangeEvent) { this.DoOptionChange(); } }; v2.onScroll = function (event) { if (this.bSendChangeEvent) { this.DoOptionChange(); } }; v2.DoOptionChange = function () { gfx.io.GameDelegate.call('OptionChange', [this.__get__ID(), this.__get__value()]); gfx.io.GameDelegate.call('PlaySound', ['UIMenuPrevNext']); this._parent.onValueChange((MovieClip(this)).itemIndex, this.__get__value()); }; v2.addProperty('ID', v2.__get__ID, v2.__set__ID); v2.addProperty('movieType', v2.__get__movieType, v2.__set__movieType); v2.addProperty('selected', v2.__get__selected, v2.__set__selected); v2.addProperty('text', v2.__get__text, v2.__set__text); v2.addProperty('value', v2.__get__value, v2.__set__value); ASSetPropFlags(_global.SettingsOptionItem.prototype, null, 1); } #endinitclip } movieClip 342 __Packages.OptionsList { #initclip if (!_global.OptionsList) { var v1 = function () { super(); this.bAllowValueOverwrite = false; }; _global.OptionsList = v1; _global.OptionsList extends Shared.BSScrollingList; var v2 = v1.prototype; v2.GetEntryHeight = function (aiEntryIndex) { var v2 = this.GetClipByIndex(0); return v2._height; }; v2.onValueChange = function (aiItemIndex, aiNewValue) { if (aiItemIndex != undefined) { this.EntriesA[aiItemIndex].value = aiNewValue; } }; v2.SetEntry = function (aEntryClip, aEntryObject) { if (aEntryClip != undefined) { aEntryClip.selected = aEntryObject == this.__get__selectedEntry(); if (this.bAllowValueOverwrite || aEntryClip.ID != aEntryObject.ID) { aEntryClip.movieType = aEntryObject.movieType; if (aEntryObject.options != undefined) { aEntryClip.SetOptionStepperOptions(aEntryObject.options); } aEntryClip.ID = aEntryObject.ID; aEntryClip.value = aEntryObject.value; aEntryClip.text = aEntryObject.text; } } }; ASSetPropFlags(_global.OptionsList.prototype, null, 1); } #endinitclip } movieClip 343 __Packages.skyui.components.ButtonPanel { #initclip if (!_global.skyui) { _global.skyui = new Object(); } if (!_global.skyui.components) { _global.skyui.components = new Object(); } if (!_global.skyui.components.ButtonPanel) { var v1 = function (a_buttonRenderer, a_maxButtons, a_buttonInitializer) { super(); this.buttons = []; if (a_buttonRenderer != undefined) { this.buttonRenderer = a_buttonRenderer; } if (a_maxButtons != undefined) { this.maxButtons = a_maxButtons; } if (a_buttonInitializer != undefined) { this.buttonInitializer = a_buttonInitializer; } var v3 = 0; while (v3 < this.maxButtons) { var v4 = this.attachMovie(this.buttonRenderer, 'button' + v3, this.getNextHighestDepth(), this.buttonInitializer); v4._visible = false; this.buttons.push(v4); ++v3; } }; skyui.components.ButtonPanel = v1; skyui.components.ButtonPanel extends MovieClip; var v2 = v1.prototype; v2.setPlatform = function (a_platform, a_bPS3Switch) { var v2 = 0; while (v2 < this.buttons.length) { this.buttons[v2].setPlatform(a_platform, a_bPS3Switch); ++v2; } }; v2.showButtons = function () { var v2 = 0; while (v2 < this.buttons.length) { this.buttons[v2]._visible = this.buttons[v2].label.length > 0; ++v2; } }; v2.hideButtons = function () { var v2 = 0; while (v2 < this.buttons.length) { this.buttons[v2]._visible = false; ++v2; } }; v2.clearButtons = function () { this._buttonCount = 0; var v3 = 0; while (v3 < this.buttons.length) { var v2 = this.buttons[v3]; v2._visible = false; v2.label = ''; v2._x = 0; ++v3; } }; v2.addButton = function (a_buttonData) { if (this._buttonCount >= this.buttons.length) { return undefined; } var v2 = this.buttons[this._buttonCount]; v2.setButtonData(a_buttonData); v2._visible = true; ++this._buttonCount; return v2; }; v2.updateButtons = function (a_bInstant) { if (a_bInstant) { this.doUpdateButtons(); } else { if (!this._updateID) { this._updateID = setInterval(this, 'doUpdateButtons', 1); } } }; v2.doUpdateButtons = function () { clearInterval(this._updateID); delete this._updateID; var v3 = 0; var v4 = 0; while (v4 < this.buttons.length) { var v2 = this.buttons[v4]; if (v2.label.length > 0 && v2._visible) { v2.update(); if (this.isReversed) { v3 -= v2.width; v2._x = v3; v3 -= this.spacing; } else { v2._x = v3; v3 += v2.width + this.spacing; } } ++v4; } }; v2._buttonCount = 0; v2.isReversed = false; v2.maxButtons = 0; v2.spacing = 10; ASSetPropFlags(skyui.components.ButtonPanel.prototype, null, 1); } #endinitclip } movieClip 344 __Packages.gfx.controls.RadioButton { #initclip if (!_global.gfx) { _global.gfx = new Object(); } if (!_global.gfx.controls) { _global.gfx.controls = new Object(); } if (!_global.gfx.controls.RadioButton) { var v1 = function () { super(); if (this._group == null) { this.__set__group('buttonGroup'); } }; gfx.controls.RadioButton = v1; gfx.controls.RadioButton extends gfx.controls.Button; var v2 = v1.prototype; v2.toString = function () { return '[Scaleform RadioButton ' + this._name + ']'; }; v2.configUI = function () { super.configUI(); }; ASSetPropFlags(gfx.controls.RadioButton.prototype, null, 1); } #endinitclip } movieClip 345 __Packages.JournalBottomBar { #initclip if (!_global.JournalBottomBar) { var v1 = function () { super(); }; _global.JournalBottomBar = v1; _global.JournalBottomBar extends MovieClip; var v2 = v1.prototype; v2.InitBar = function () { this.LevelMeter_mc = new Components.Meter(this.LevelMeterRect.LevelProgressBar); gfx.io.GameDelegate.call('RequestPlayerInfo', [], this, 'SetPlayerInfo'); }; v2.SetPlayerInfo = function () { this.DateText.SetText(arguments[0]); this.LevelMeterRect.LevelNumberLabel.textAutoSize = 'shrink'; this.LevelMeterRect.LevelNumberLabel.SetText(arguments[1]); this.LevelMeter_mc.SetPercent(arguments[2]); }; v2.setPlatform = function (a_platform, a_bPS3Switch) { this.buttonPanel.setPlatform(a_platform, a_bPS3Switch); }; ASSetPropFlags(_global.JournalBottomBar.prototype, null, 1); } #endinitclip } movieClip 346 __Packages.Components.Meter { #initclip if (!_global.Components) { _global.Components = new Object(); } if (!_global.Components.Meter) { var v1 = function (aMovieClip) { this.Empty = 0; this.Full = 0; this.CurrentPercent = 100; this.TargetPercent = 100; this.FillSpeed = 2; this.EmptySpeed = 3; this.meterMovieClip = aMovieClip; this.meterMovieClip.gotoAndStop('Empty'); this.Empty = this.meterMovieClip._currentframe; this.meterMovieClip.gotoAndStop('Full'); this.Full = this.meterMovieClip._currentframe; }; Components.Meter = v1; var v2 = v1.prototype; v2.SetPercent = function (aPercent) { this.CurrentPercent = Math.min(100, Math.max(aPercent, 0)); this.TargetPercent = this.CurrentPercent; var v2 = Math.floor(Shared.GlobalFunc.Lerp(this.Empty, this.Full, 0, 100, this.CurrentPercent)); this.meterMovieClip.gotoAndStop(v2); }; v2.SetTargetPercent = function (aPercent) { this.TargetPercent = Math.min(100, Math.max(aPercent, 0)); }; v2.SetFillSpeed = function (aSpeed) { this.FillSpeed = aSpeed; }; v2.SetEmptySpeed = function (aSpeed) { this.EmptySpeed = aSpeed; }; v2.Update = function () { if (this.TargetPercent > 0 && this.TargetPercent > this.CurrentPercent) { if (this.TargetPercent - this.CurrentPercent > this.FillSpeed) { this.CurrentPercent += this.FillSpeed; var v3 = Shared.GlobalFunc.Lerp(this.Empty, this.Full, 0, 100, this.CurrentPercent); this.meterMovieClip.gotoAndStop(v3); } else { this.SetPercent(this.TargetPercent); } return undefined; } if (this.TargetPercent <= this.CurrentPercent) { var v2 = this.CurrentPercent - this.TargetPercent > this.EmptySpeed; if (this.TargetPercent > 0 && v2 || this.CurrentPercent > this.EmptySpeed) { if (v2) { this.CurrentPercent -= this.EmptySpeed; } else { this.CurrentPercent = this.TargetPercent; } var v3 = Shared.GlobalFunc.Lerp(this.Empty, this.Full, 0, 100, this.CurrentPercent); this.meterMovieClip.gotoAndStop(v3); return undefined; } if (this.CurrentPercent >= 0) { this.SetPercent(this.TargetPercent); } } }; ASSetPropFlags(Components.Meter.prototype, null, 1); } #endinitclip } movieClip 347 __Packages.Quest_Journal { #initclip if (!_global.Quest_Journal) { var v1 = function () { super(); this.BottomBar_mc = this.BottomBar; this.PageArray = new Array(this.QuestsFader.Page_mc, this.StatsFader.Page_mc, this.SystemFader.Page_mc); this.TopmostPage = this.QuestsFader; this.bTabsDisabled = false; }; _global.Quest_Journal = v1; _global.Quest_Journal extends MovieClip; var v2 = v1.prototype; v2.InitExtensions = function () { Shared.GlobalFunc.SetLockFunction(); (MovieClip(this.BottomBar_mc)).Lock('B'); this.ConfigPanel = _root.ConfigPanelFader.configPanel; this.QuestsTab.__set__disableFocus(true); this.StatsTab.__set__disableFocus(true); this.SystemTab.__set__disableFocus(true); this.TabButtonGroup = gfx.controls.ButtonGroup(this.QuestsTab.__get__group()); this.TabButtonGroup.addEventListener('itemClick', this, 'onTabClick'); this.TabButtonGroup.addEventListener('change', this, 'onTabChange'); gfx.io.GameDelegate.addCallBack('RestoreSavedSettings', this, 'RestoreSavedSettings'); gfx.io.GameDelegate.addCallBack('onRightStickInput', this, 'onRightStickInput'); gfx.io.GameDelegate.addCallBack('HideMenu', this, 'DoHideMenu'); gfx.io.GameDelegate.addCallBack('ShowMenu', this, 'DoShowMenu'); gfx.io.GameDelegate.addCallBack('StartCloseMenu', this, 'CloseMenu'); gfx.io.GameDelegate.call('ShouldShowMod', [], this, 'SetShowMod'); this.BottomBar_mc.InitBar(); this.ConfigPanel.initExtensions(); }; v2.SetShowMod = function () { (SystemPage(this.PageArray[Quest_Journal.PAGE_SYSTEM])).SetShowMod(arguments[0]); }; v2.RestoreSavedSettings = function (aiSavedTab, abTabsDisabled) { this.iCurrentTab = Math.min(Math.max(aiSavedTab, 0), this.TabButtonGroup.__get__length() - 1); this.bTabsDisabled = abTabsDisabled; if (this.bTabsDisabled) { this.iCurrentTab = this.TabButtonGroup.__get__length() - 1; this.QuestsTab.__set__disabled(true); this.StatsTab.__set__disabled(true); } this.SwitchPageToFront(this.iCurrentTab, true); this.TabButtonGroup.setSelectedButton(this.TabButtonGroup.getButtonAt(this.iCurrentTab)); }; v2.SwitchPageToFront = function (aiTab, abForceFade) { if (this.TopmostPage != this.PageArray[this.iCurrentTab]._parent) { this.TopmostPage.gotoAndStop('hide'); this.PageArray[this.iCurrentTab]._parent.swapDepths(this.TopmostPage); this.TopmostPage = this.PageArray[this.iCurrentTab]._parent; } this.TopmostPage.gotoAndPlay(abForceFade ? 'ForceFade' : 'fadeIn'); this.BottomBar_mc.LevelMeterRect._visible = this.iCurrentTab != 0; }; v2.handleInput = function (details, pathToFocus) { var v6 = false; if (pathToFocus != undefined && pathToFocus.length > 0) { v6 = pathToFocus[0].handleInput(details, pathToFocus.slice(1)); } if (!v6 && Shared.GlobalFunc.IsKeyPressed(details, false)) { var v3 = gfx.ui.NavigationCode.GAMEPAD_L2; var v5 = gfx.ui.NavigationCode.GAMEPAD_R2; if ((SystemPage(this.PageArray[Quest_Journal.PAGE_SYSTEM])).GetIsRemoteDevice()) { v3 = gfx.ui.NavigationCode.GAMEPAD_L1; v5 = gfx.ui.NavigationCode.GAMEPAD_R1; } if (details.navEquivalent === gfx.ui.NavigationCode.TAB) { this.CloseMenu(); return true; } if (details.navEquivalent === v3) { if (!this.bTabsDisabled) { this.PageArray[this.iCurrentTab].endPage(); this.iCurrentTab += (details.navEquivalent == v3) ? -1 : 1; if (this.iCurrentTab == -1) { this.iCurrentTab = this.TabButtonGroup.__get__length() - 1; } if (this.iCurrentTab == this.TabButtonGroup.__get__length()) { this.iCurrentTab = 0; } this.SwitchPageToFront(this.iCurrentTab, false); this.TabButtonGroup.setSelectedButton(this.TabButtonGroup.getButtonAt(this.iCurrentTab)); } return true; } if (details.navEquivalent === v5) { if (!this.bTabsDisabled) { this.PageArray[this.iCurrentTab].endPage(); this.iCurrentTab += (details.navEquivalent == v3) ? -1 : 1; if (this.iCurrentTab == -1) { this.iCurrentTab = this.TabButtonGroup.__get__length() - 1; } if (this.iCurrentTab == this.TabButtonGroup.__get__length()) { this.iCurrentTab = 0; } this.SwitchPageToFront(this.iCurrentTab, false); this.TabButtonGroup.setSelectedButton(this.TabButtonGroup.getButtonAt(this.iCurrentTab)); } } } return true; }; v2.CloseMenu = function (abForceClose) { if (abForceClose != true) { gfx.io.GameDelegate.call('PlaySound', ['UIJournalClose']); } gfx.io.GameDelegate.call('CloseMenu', [this.iCurrentTab, this.QuestsFader.Page_mc.selectedQuestID, this.QuestsFader.Page_mc.selectedQuestInstance]); }; v2.onTabClick = function (event) { if (this.bTabsDisabled) { return undefined; } var v2 = this.iCurrentTab; if (event.item == this.QuestsTab) { this.iCurrentTab = 0; } else { if (event.item == this.StatsTab) { this.iCurrentTab = 1; } else { if (event.item == this.SystemTab) { this.iCurrentTab = 2; } } } if (v2 != this.iCurrentTab) { this.PageArray[v2].endPage(); this.SwitchPageToFront(this.iCurrentTab, false); } }; v2.onTabChange = function (event) { event.item.gotoAndPlay('selecting'); this.PageArray[this.iCurrentTab].startPage(); gfx.io.GameDelegate.call('PlaySound', ['UIJournalTabsSD']); }; v2.onRightStickInput = function (afX, afY) { if (this.PageArray[this.iCurrentTab].onRightStickInput != undefined) { this.PageArray[this.iCurrentTab].onRightStickInput(afX, afY); } }; v2.SetPlatform = function (aiPlatform, abPS3Switch) { if (aiPlatform == 0) { this.nextTabButton._visible = false; this.previousTabButton._visible = this.nextTabButton._visible; } else { this.nextTabButton._visible = true; this.previousTabButton._visible = this.nextTabButton._visible; this.previousTabButton.gotoAndStop(280); this.nextTabButton.gotoAndStop(281); } for (var v4 in this.PageArray) { if (this.PageArray[v4].SetPlatform != undefined) { this.PageArray[v4].SetPlatform(aiPlatform, abPS3Switch); } } this.BottomBar_mc.setPlatform(aiPlatform, abPS3Switch); this.ConfigPanel.setPlatform(aiPlatform, abPS3Switch); }; v2.DoHideMenu = function () { this._parent.gotoAndPlay('fadeOut'); }; v2.DoShowMenu = function () { this._parent.gotoAndPlay('fadeIn'); }; v2.DisableTabs = function (abEnable) { this.QuestsTab.__set__disabled(abEnable); this.StatsTab.__set__disabled(abEnable); this.SystemTab.__set__disabled(abEnable); }; v2.ConfigPanelOpen = function () { this.DisableTabs(true); this.SystemFader.Page_mc.endPage(); this.DoHideMenu(); _root.ConfigPanelFader.swapDepths(_root.QuestJournalFader); (gfx.managers.FocusHandler.__get__instance()).setFocus(this.ConfigPanel, 0); this.ConfigPanel.startPage(); }; v2.ConfigPanelClose = function () { this.ConfigPanel.endPage(); _root.QuestJournalFader.swapDepths(_root.ConfigPanelFader); (gfx.managers.FocusHandler.__get__instance()).setFocus(this, 0); this.DoShowMenu(); this.SystemFader.Page_mc.startPage(); this.DisableTabs(false); }; v1.SKYUI_RELEASE_IDX = 2018; v1.SKYUI_VERSION_MAJOR = 5; v1.SKYUI_VERSION_MINOR = 2; v1.SKYUI_VERSION_STRING = Quest_Journal.SKYUI_VERSION_MAJOR + '.' + Quest_Journal.SKYUI_VERSION_MINOR + ' SE'; v1.PAGE_QUEST = 0; v1.PAGE_STATS = 1; v1.PAGE_SYSTEM = 2; v1.QUESTS_TAB = 0; v1.STATS_TAB = 1; v1.SETTINGS_TAB = 2; ASSetPropFlags(_global.Quest_Journal.prototype, null, 1); } #endinitclip }




http://swfchan.com/50/245463/info.shtml
Created: 30/3 -2022 07:29:21 Last modified: 30/3 -2022 07:29:21 Server time: 22/12 -2024 16:15:39