{ "buttons": [ { "actiontype": "accept", "actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_SELECT" }, { "actiontype": "cancel", "actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_BACK" }, { "actiontype": "action-y", "actionlabel": "$loc UI_DIALOG_SHOW_DETAILS" } ], "onpageopened": { "set-selected": { "target": "$arg selectedentrance" } }, "onpageclosed": { "set-mastery-data": {} }, "body": { "$setupcomponents": { "difficulty-manager": { "always-reload-setup": true, "setup": { "difficulty": "$.Contract.Metadata.Difficulty" } } }, "controller": "list", "actions": { "select": { "select-category": {} } }, "children": [ { "controller": "group", "id": "headline_container", "row": 4.25, "col": 0, "selectable": false, "pressable": false, "_comment": "the container that will hold the HeadlineElement. It will show info on whatever item is selected", "children": { "id": "headline_element", "view": "menu3.basic.HeadlineElement" } }, { "id": "category_container", "controller": "list" }, { "view": "menu3.containers.ScrollingTabsContainer", "direction": "horizontal", "data": { "direction": "horizontal", "topnavigation": { "header": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY", "title": { "$if $arg contract-creation": { "$then": "$loc $.Contract.Metadata.Title", "$else": { "$switch $.Contract.Metadata.Type": [ { "case": "usercreated", "return": "$.Contract.Metadata.Title" }, { "case": "featured", "return": "$.Contract.Metadata.Title" }, { "default": "$loc $.Contract.Metadata.Title" } ] } } }, "icon": { "$switch $.Contract.Metadata.Type": [ { "case": "orbis", "return": "ica" }, { "case": "campaign", "return": "mission" }, { "default": "$.Contract.Metadata.Type" } ] } } }, "controller": "category", "id": "category_context", "container": "category_container", "actions": { "select": { "$use $.UserCentric": { "set-mastery-data": { "$setup": { "$set ValidContractType": { "$if $isnull $.Contract": { "$then": true, "$else": { "$switch $.Contract.Metadata.Type": [ { "case": "usercreated", "return": false }, { "case": "featured", "return": false }, { "default": true } ] } } }, "$set HideProgression": { "$if $isnull $.CompletionData": { "$then": "$.Data.LocationHideProgression", "$else": "$.CompletionData.HideProgression" } }, "$set MasteryTitle": { "$if $isnull $.CompletionData": { "$then": "$formatstring {$.Data.LocationLevel,.0f}/{$.Data.LocationMaxLevel,.0f}", "$else": "$formatstring {$.CompletionData.Level,.0f}/{$.CompletionData.MaxLevel,.0f}" } }, "$set MasteryCompletion": { "$if $isnull $.CompletionData": { "$then": "$.Data.LocationCompletion", "$else": "$.CompletionData.Completion" } }, "$set MasteryXpLeft": { "$if $isnull $.CompletionData": { "$then": "$.Data.LocationXpLeft", "$else": "$.CompletionData.XpLeft" } }, "$set CityName": { "$if $isnull $.CompletionData": { "$then": "$loc $formatstring UI_{$.Contract.Metadata.Location}_CITY", "$else": "$loc $formatstring UI_{$.CompletionData.Id}_CITY" } }, "$in": { "$if": { "$condition": { "$and": [ "$arg _isonline", "$not $.HideProgression", "$.ValidContractType" ] }, "$then": { "masteryheader": { "$loc": { "key": "UI_MENU_LOCATION_PROGRESSION_HEADER", "data": ["$.CityName"] } }, "masterytitle": "$.MasteryTitle", "masterycompletion": "$.MasteryCompletion", "masteryxpleft": "$.MasteryXpLeft" }, "$else": {} } } } } } } }, "children": { "view": "menu3.basic.CategoryElement", "data": { "title": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_ENTRANCE", "icon": "starting" }, "children": { "controller": "group", "view": "menu3.containers.ScrollingListContainer", "direction": "horizontal", "data": { "direction": "horizontal" }, "row": 1, "pages": true, "nrows": 3, "ncols": 10, "children": { "$each $arg entrances": { "$setup": { "$set Item": "$.Unlockable", "$set LocalizedReproItem": "$item $.Unlockable", "$in": { "id": "$.id", "view": "menu3.basic.MenuTileSmall", "nrows": 1.5, "ncols": 2, "pressable": "$.unlocked", "data": { "hidebarcode": true, "header": { "$if $.unlocked": { "$then": { "$if $not $isnull $.suitid": { "$then": "$loc $($repository $.suitid).Name", "$else": null } }, "$else": { "$if $stringvalid $.unlocklevel": { "$then": "$formatstring {$loc UI_MENU_PAGE_MASTERY_LEVEL} {$.unlocklevel}", "$else": { "$if $not $isnull $.suitid": { "$then": "$loc $($repository $.suitid).Name", "$else": null } } } } } }, "title": "$loc $($repository $.id).Name_LOC", "image": "$res $($repository $.id).Image", "icon": "starting", "locked": "$not $.unlocked", "masterylocked": "$not $.unlocked", "lockedreason": { "$if $arg _isonline": { "$then": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_INCREASE_MASTERY", "$else": "$loc UI_MENU_PAGE_PLANNING_OFFLINE" } }, "availability": { "$if $.unlocked": { "$then": null, "$else": { "available": true } } } }, "actions": { "accept": { "enable-entrance": { "target": "$.id", "equip": "$.equip" }, "request-back": { "target": [ "contractcreation_planning", "planning" ], "usecache": false } }, "select": { "replace-children": { "target": "headline_container", "children": [ { "view": "menu3.basic.HeadlineElement", "selectable": false, "pressable": false, "data": { "header": { "$if $not $isnull $.suitid": { "$then": "$loc $($repository $.suitid).Name", "$else": null } }, "title": "$loc $($repository $.id).Name_LOC", "typeicon": { "$if $.unlocked": { "$then": "starting", "$else": "locked" } } } } ] } }, "action-y": { "show-modal": { "config": { "type": "online", "view": "menu3.modal.ModalDialogItemDetails", "buttons": [ "$loc UI_DIALOG_OK", { "type": "cancel" } ], "data": { "description": "$.LocalizedReproItem.desc", "type": "$loc UI_MENU_PAGE_PLANNING_ELEMENT_ENTRANCE", "icon": "starting", "item": "$($repository $.id)", "displaybuttons": [ { "actiontype": "cancel", "actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_BACK", "hideIndicator": true } ] } } } } } } } } } } } } ] } }