Peacock/static/LoadMenuTemplate.json

2886 lines
394 KiB
JSON

{
"reopen-page": {
"link": {
"page": "loadpage",
"addtohistory": false,
"args": {
"url": "load",
"args": {
"saveorload": "load"
},
"saveorload": "load"
}
}
},
"buttons": [
{
"actiontype": "accept",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_SELECT"
},
{
"actiontype": "cancel",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_BACK"
}
],
"onpageopened": [
{
"show-background-layers": {
"show-background": {
"$if $arg _isingame": {
"$then": false,
"$else": true
}
},
"showMenuTabsUnderlay": true,
"show-world-map": false,
"show-overlay": false
},
"set-selected": {
"target": "$formatstring id_0"
}
},
{
"$if $not $arg _isingame": {
"$then": {
"set-background": "$res images/backgrounds/menu_bg.jpg"
}
}
}
],
"body": {
"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": "data_list",
"controller": "list"
},
{
"view": "menu3.containers.ScrollingTabsContainer",
"direction": "horizontal",
"data": {
"direction": "horizontal"
},
"_comment": "note the below two fields, the container tells the category controller which container is to be used",
"controller": "category",
"id": "category_container",
"container": "data_list",
"children": {
"view": "menu3.basic.CategoryElement",
"data": {
"title": "$loc UI_DIALOG_LOAD_GAME",
"icon": "load"
},
"children": [
{
"controller": "group",
"row": 1,
"pages": true,
"nrows": 3,
"ncols": 10,
"children": [
{
"view": "menu3.basic.MenuTileSmall",
"nrows": 1.5,
"ncols": 2,
"pressable": false,
"selectable": false,
"data": {
"setassaveslotheader": true,
"header": "$loc UI_MENU_PAGE_SAVELOAD_MANUAL",
"title": "$loc UI_MENU_PAGE_SAVELOAD_SAVESLOTS",
"icon": "savemanual"
}
},
{
"view": "menu3.basic.MenuTileSmall",
"nrows": 1.5,
"ncols": 2,
"pressable": false,
"selectable": false,
"data": {
"setassaveslotheader": true,
"header": "$loc UI_MENU_PAGE_SAVELOAD_AUTO",
"title": "$loc UI_MENU_PAGE_SAVELOAD_SAVESLOTS",
"icon": "saveauto"
}
},
{
"controller": "group",
"view": "menu3.containers.ScrollingListContainer",
"direction": "horizontal",
"data": {
"direction": "horizontal",
"forceMask": true,
"maskwidthoffset": 400,
"maskstartleftoffset": 40,
"masktopoffset": 40,
"maskheightoffset": 40,
"overflowscrolling": "0.3",
"outsidemaskscrolling": true
},
"ncols": 8,
"nrows": 3,
"pages": true,
"id": "scroll-list",
"children": {
"$each $.Savegames": {
"$if $.Metadata.Occupied": {
"$then": {
"view": "menu3.basic.LoadSaveTileSmall",
"nrows": 1.5,
"ncols": 2,
"id": "$formatstring id_{$._index,0.f}",
"stateproviders": [
{
"type": {
"$if": {
"$condition": {
"$and": [
"$.Metadata.Valid",
"$not $.Metadata.Invalidated"
]
},
"$then": "contractavailability",
"$else": ""
}
},
"contract": "$.UserCentricContract.Contract"
}
],
"data": {
"$if": {
"$condition": {
"$and": [
"$.Metadata.Valid",
"$not $.Metadata.Invalidated"
]
},
"$then": {
"timestamp": "$.Metadata.TimestampString",
"header": {
"$if $not $isnull $.UserCentricContract.Contract.Metadata.Location": {
"$then": "$loc $formatstring UI_{$.UserCentricContract.Contract.Metadata.Location}_CITY"
}
},
"title": {
"$if $not $isnull $.UserCentricContract.Contract.Metadata.Location": {
"$then": "$loc $.UserCentricContract.Contract.Metadata.Title",
"$else": "$loc UI_MENU_PAGE_SAVELOAD_OCCUPIED_SAVE_SLOT"
}
},
"online": "$.Metadata.Online",
"useronline": "$arg IsOnline",
"occupied": true,
"image": {
"$savegameimage": {
"slot": "$.Metadata.Slot",
"type": "$.Metadata.Type"
}
},
"icon": "mission",
"difficultyIcon": {
"$if $stringvalid $.Metadata.Difficulty": {
"$then": "$formatstring difficulty{$.Metadata.Difficulty}",
"$else": null
}
},
"valid": true
},
"$else": {
"timestamp": "$.Metadata.TimestampString",
"header": "",
"title": {
"$if $not $.Metadata.Valid": {
"$then": "$loc UI_DIALOG_CORRUPT_SAVE_FILE_TITLE",
"$else": "$loc UI_DIALOG_INVALID_SAVE_FILE_TITLE"
}
},
"online": true,
"useronline": true,
"occupied": true,
"image": "$res images/ui/tiles/corrupted.jpg",
"icon": "corrupt",
"valid": false
}
}
},
"actions": {
"$mergeobjects": [
{
"select": {
"replace-children": {
"target": "headline_container",
"children": {
"id": "headline-element",
"view": "menu3.basic.ItemHeadlineElement",
"data": {
"$if": {
"$condition": {
"$and": [
"$.Metadata.Valid",
"$not $.Metadata.Invalidated"
]
},
"$then": {
"header": {
"$setup": {
"$set HeaderInfo": {
"$if $not $isnull $.UserCentricContract.Contract.Metadata.Location": {
"$then": "$loc $formatstring UI_{$.UserCentricContract.Contract.Metadata.Location}_CITY"
}
},
"$set DifficultyInfo": {
"$if $stringvalid $.Metadata.Difficulty": {
"$then": {
"$loc": {
"key": "UI_MENU_PAGE_PLANNING_PLAY_DIFFICULTY_HEADER",
"data": "$loc $formatstring UI_DIFFICULTY_{$.Metadata.Difficulty}_TITLE"
}
},
"$else": ""
}
},
"$in": {
"$if $stringvalid $.DifficultyInfo": {
"$then": "$formatstring {$.HeaderInfo} / {$.DifficultyInfo}",
"$else": "$.HeaderInfo"
}
}
}
},
"title": {
"$if $not $isnull $.UserCentricContract.Contract.Metadata.Location": {
"$then": "$loc $.UserCentricContract.Contract.Metadata.Title",
"$else": "$loc UI_MENU_PAGE_SAVELOAD_OCCUPIED_SAVE_SLOT"
}
},
"icon": "mission"
},
"$else": {
"header": "",
"title": {
"$if $not $.Metadata.Valid": {
"$then": "$loc UI_DIALOG_CORRUPT_SAVE_FILE_TITLE",
"$else": "$loc UI_DIALOG_INVALID_SAVE_FILE_TITLE"
}
},
"typeicon": "corrupt"
}
}
}
}
}
},
"deselect": {
"replace-children": {
"target": "headline_container",
"children": []
}
},
"accept": {
"$if": {
"$condition": {
"$or": [
"$not $.Metadata.Valid",
"$.Metadata.Invalidated"
]
},
"$then": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": {
"$if $not $.Metadata.Valid": {
"$then": "$loc UI_DIALOG_CORRUPT_SAVE_FILE_TITLE",
"$else": "$loc UI_DIALOG_INVALID_SAVE_FILE_TITLE"
}
},
"description": {
"$if $not $.Metadata.Valid": {
"$then": "$loc UI_LOAD_FAILED_CORRUPT",
"$else": "$loc UI_LOAD_FAILED_INVALID"
}
}
}
},
"onbutton": [
{
"delete-save": {
"name": "$.Metadata.SaveName"
}
}
]
}
}
}
}
},
{
"$mergeobjects": [
{
"$use $.UserCentricContract": {
"on-content-unknown": {
"_comment": "No DLC could be found containing contract",
"alter-actions": {
"path": "accept",
"value": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_OK"
],
"data": {
"title": "$loc UI_CONTENT_UNKNOWN_DLC_TITLE",
"description": "$loc UI_CONTENT_UNKNOWN_DLC_TEXT"
}
},
"onbutton": []
}
}
}
},
"on-content-not-owned": {
"_comment": "DLC is not owned",
"alter-actions": {
"path": "accept",
"value": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_OK"
],
"data": {
"title": "$loc UI_CONTENT_UNKNOWN_DLC_TITLE",
"description": "$loc UI_CONTENT_UNKNOWN_DLC_TEXT"
}
},
"onbutton": []
}
}
}
},
"on-content-not-installed": {
"_comment": "DLC owned but not installed",
"alter-actions": {
"path": "accept",
"value": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_OK"
],
"data": {
"title": "$loc UI_CONTENT_UNKNOWN_DLC_TITLE",
"description": "$loc UI_CONTENT_UNKNOWN_DLC_TEXT"
}
},
"onbutton": []
}
}
}
},
"on-content-downloading": {
"_comment": "DLC owned and currently downloading",
"alter-actions": {
"path": "accept",
"value": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_OK"
],
"data": {
"title": "$loc UI_CONTENT_UNKNOWN_DLC_TITLE",
"description": "$loc UI_CONTENT_UNKNOWN_DLC_TEXT"
}
},
"onbutton": []
}
}
}
},
"on-content-update-required": {
"_comment": "DLC owned and update is required",
"alter-actions": {
"path": "accept",
"value": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_OK"
],
"data": {
"title": "$loc UI_CONTENT_UNKNOWN_DLC_TITLE",
"description": "$loc UI_CONTENT_UNKNOWN_DLC_TEXT"
}
},
"onbutton": []
}
}
}
},
"on-content-installing": {
"_comment": "DLC owned and currently installing",
"alter-actions": {
"path": "accept",
"value": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_OK"
],
"data": {
"title": "$loc UI_CONTENT_UNKNOWN_DLC_TITLE",
"description": "$loc UI_CONTENT_UNKNOWN_DLC_TEXT"
}
},
"onbutton": []
}
}
}
},
"on-entitlement-missing": {
"_comment": "Entitlement missing",
"alter-actions": {
"path": "accept",
"value": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_OK"
],
"data": {
"title": "$loc UI_CONTENT_UNKNOWN_DLC_TITLE",
"description": "$loc UI_CONTENT_UNKNOWN_DLC_TEXT"
}
},
"onbutton": []
}
}
}
}
}
},
{
"on-content-available": {
"alter-actions": {
"path": "accept",
"value": {
"$if $arg MainMenu": {
"$then": {
"$if $arg _isonline": {
"$then": {
"$if $.Metadata.Online": {
"$then": {
"$setup": {
"$set DialogType": "DirectLoad",
"$set Type": "$.Metadata.Type",
"$set Slot": "$.Metadata.Slot",
"$in": {
"$switch $.DialogType": [
{
"case": "DirectLoad",
"return": {
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
},
{
"case": "LoadDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_LOAD_GAME_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_LOADDIALOG"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOfflineDialogMainMenu",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_GO_OFFLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_MAINMENU_GOOFFLINE"
}
},
"onbutton": [
{
"force-offline": {},
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOfflineDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_GO_OFFLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_GOOFFLINE"
}
},
"onbutton": [
{
"force-offline": {},
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOnlineDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_CONNECTION_SWITCH_TO_ONLINE_MODE",
{
"$switch $.Metadata.ContractType": [
{
"case": "mission",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "flashback",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "tutorial",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
}
]
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONNECTION_SWITCH_TO_ONLINE_MODE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_GOONLINE"
}
},
"onbutton": [
{
"try-trigger-online": {}
},
{
"$if": {
"$condition": {
"$or": [
"$eqs ($.Metadata.ContractType,mission)",
"$eqs ($.Metadata.ContractType,flashback)",
"$eqs ($.Metadata.ContractType,tutorial)"
]
},
"$then": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM_TITLE",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_TITLE",
"description": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_DESCRIPTION"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
}
}
]
}
}
},
{
"case": "GoToMainMenuDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_CONNECTION_STATUS_DISCONNECTED_GO_TO_HUB",
{
"$switch $.Metadata.ContractType": [
{
"case": "mission",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "flashback",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "tutorial",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
}
]
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_LOAD_NEED_ONLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_MENU_OR_CONTINUE_OFFLINE"
}
},
"onbutton": [
{
"exit-to-main-menu": {}
},
{
"$if": {
"$condition": {
"$or": [
"$eqs ($.Metadata.ContractType,mission)",
"$eqs ($.Metadata.ContractType,flashback)",
"$eqs ($.Metadata.ContractType,tutorial)"
]
},
"$then": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM_TITLE",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_TITLE",
"description": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_DESCRIPTION"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
}
}
]
}
}
},
{
"default": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_CONFIRM_TITLE",
"description": "This message is not supposed to occur"
}
},
"onbutton": []
}
}
}
]
}
}
},
"$else": {
"$setup": {
"$set DialogType": "GoOfflineDialogMainMenu",
"$set Type": "$.Metadata.Type",
"$set Slot": "$.Metadata.Slot",
"$in": {
"$switch $.DialogType": [
{
"case": "DirectLoad",
"return": {
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
},
{
"case": "LoadDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_LOAD_GAME_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_LOADDIALOG"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOfflineDialogMainMenu",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_GO_OFFLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_MAINMENU_GOOFFLINE"
}
},
"onbutton": [
{
"force-offline": {},
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOfflineDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_GO_OFFLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_GOOFFLINE"
}
},
"onbutton": [
{
"force-offline": {},
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOnlineDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_CONNECTION_SWITCH_TO_ONLINE_MODE",
{
"$switch $.Metadata.ContractType": [
{
"case": "mission",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "flashback",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "tutorial",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
}
]
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONNECTION_SWITCH_TO_ONLINE_MODE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_GOONLINE"
}
},
"onbutton": [
{
"try-trigger-online": {}
},
{
"$if": {
"$condition": {
"$or": [
"$eqs ($.Metadata.ContractType,mission)",
"$eqs ($.Metadata.ContractType,flashback)",
"$eqs ($.Metadata.ContractType,tutorial)"
]
},
"$then": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM_TITLE",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_TITLE",
"description": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_DESCRIPTION"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
}
}
]
}
}
},
{
"case": "GoToMainMenuDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_CONNECTION_STATUS_DISCONNECTED_GO_TO_HUB",
{
"$switch $.Metadata.ContractType": [
{
"case": "mission",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "flashback",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "tutorial",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
}
]
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_LOAD_NEED_ONLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_MENU_OR_CONTINUE_OFFLINE"
}
},
"onbutton": [
{
"exit-to-main-menu": {}
},
{
"$if": {
"$condition": {
"$or": [
"$eqs ($.Metadata.ContractType,mission)",
"$eqs ($.Metadata.ContractType,flashback)",
"$eqs ($.Metadata.ContractType,tutorial)"
]
},
"$then": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM_TITLE",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_TITLE",
"description": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_DESCRIPTION"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
}
}
]
}
}
},
{
"default": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_CONFIRM_TITLE",
"description": "This message is not supposed to occur"
}
},
"onbutton": []
}
}
}
]
}
}
}
}
},
"$else": {
"$if $.Metadata.Online": {
"$then": {
"$setup": {
"$set DialogType": "GoOnlineDialog",
"$set Type": "$.Metadata.Type",
"$set Slot": "$.Metadata.Slot",
"$in": {
"$switch $.DialogType": [
{
"case": "DirectLoad",
"return": {
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
},
{
"case": "LoadDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_LOAD_GAME_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_LOADDIALOG"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOfflineDialogMainMenu",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_GO_OFFLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_MAINMENU_GOOFFLINE"
}
},
"onbutton": [
{
"force-offline": {},
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOfflineDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_GO_OFFLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_GOOFFLINE"
}
},
"onbutton": [
{
"force-offline": {},
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOnlineDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_CONNECTION_SWITCH_TO_ONLINE_MODE",
{
"$switch $.Metadata.ContractType": [
{
"case": "mission",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "flashback",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "tutorial",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
}
]
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONNECTION_SWITCH_TO_ONLINE_MODE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_GOONLINE"
}
},
"onbutton": [
{
"try-trigger-online": {}
},
{
"$if": {
"$condition": {
"$or": [
"$eqs ($.Metadata.ContractType,mission)",
"$eqs ($.Metadata.ContractType,flashback)",
"$eqs ($.Metadata.ContractType,tutorial)"
]
},
"$then": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM_TITLE",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_TITLE",
"description": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_DESCRIPTION"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
}
}
]
}
}
},
{
"case": "GoToMainMenuDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_CONNECTION_STATUS_DISCONNECTED_GO_TO_HUB",
{
"$switch $.Metadata.ContractType": [
{
"case": "mission",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "flashback",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "tutorial",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
}
]
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_LOAD_NEED_ONLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_MENU_OR_CONTINUE_OFFLINE"
}
},
"onbutton": [
{
"exit-to-main-menu": {}
},
{
"$if": {
"$condition": {
"$or": [
"$eqs ($.Metadata.ContractType,mission)",
"$eqs ($.Metadata.ContractType,flashback)",
"$eqs ($.Metadata.ContractType,tutorial)"
]
},
"$then": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM_TITLE",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_TITLE",
"description": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_DESCRIPTION"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
}
}
]
}
}
},
{
"default": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_CONFIRM_TITLE",
"description": "This message is not supposed to occur"
}
},
"onbutton": []
}
}
}
]
}
}
},
"$else": {
"$setup": {
"$set DialogType": "DirectLoad",
"$set Type": "$.Metadata.Type",
"$set Slot": "$.Metadata.Slot",
"$in": {
"$switch $.DialogType": [
{
"case": "DirectLoad",
"return": {
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
},
{
"case": "LoadDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_LOAD_GAME_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_LOADDIALOG"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOfflineDialogMainMenu",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_GO_OFFLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_MAINMENU_GOOFFLINE"
}
},
"onbutton": [
{
"force-offline": {},
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOfflineDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_GO_OFFLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_GOOFFLINE"
}
},
"onbutton": [
{
"force-offline": {},
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOnlineDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_CONNECTION_SWITCH_TO_ONLINE_MODE",
{
"$switch $.Metadata.ContractType": [
{
"case": "mission",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "flashback",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "tutorial",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
}
]
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONNECTION_SWITCH_TO_ONLINE_MODE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_GOONLINE"
}
},
"onbutton": [
{
"try-trigger-online": {}
},
{
"$if": {
"$condition": {
"$or": [
"$eqs ($.Metadata.ContractType,mission)",
"$eqs ($.Metadata.ContractType,flashback)",
"$eqs ($.Metadata.ContractType,tutorial)"
]
},
"$then": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM_TITLE",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_TITLE",
"description": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_DESCRIPTION"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
}
}
]
}
}
},
{
"case": "GoToMainMenuDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_CONNECTION_STATUS_DISCONNECTED_GO_TO_HUB",
{
"$switch $.Metadata.ContractType": [
{
"case": "mission",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "flashback",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "tutorial",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
}
]
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_LOAD_NEED_ONLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_MENU_OR_CONTINUE_OFFLINE"
}
},
"onbutton": [
{
"exit-to-main-menu": {}
},
{
"$if": {
"$condition": {
"$or": [
"$eqs ($.Metadata.ContractType,mission)",
"$eqs ($.Metadata.ContractType,flashback)",
"$eqs ($.Metadata.ContractType,tutorial)"
]
},
"$then": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM_TITLE",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_TITLE",
"description": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_DESCRIPTION"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
}
}
]
}
}
},
{
"default": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_CONFIRM_TITLE",
"description": "This message is not supposed to occur"
}
},
"onbutton": []
}
}
}
]
}
}
}
}
}
}
},
"$else": {
"$if $arg _isonline": {
"$then": {
"$if $.Metadata.Online": {
"$then": {
"$setup": {
"$set DialogType": "LoadDialog",
"$set Type": "$.Metadata.Type",
"$set Slot": "$.Metadata.Slot",
"$in": {
"$switch $.DialogType": [
{
"case": "DirectLoad",
"return": {
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
},
{
"case": "LoadDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_LOAD_GAME_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_LOADDIALOG"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOfflineDialogMainMenu",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_GO_OFFLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_MAINMENU_GOOFFLINE"
}
},
"onbutton": [
{
"force-offline": {},
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOfflineDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_GO_OFFLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_GOOFFLINE"
}
},
"onbutton": [
{
"force-offline": {},
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOnlineDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_CONNECTION_SWITCH_TO_ONLINE_MODE",
{
"$switch $.Metadata.ContractType": [
{
"case": "mission",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "flashback",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "tutorial",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
}
]
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONNECTION_SWITCH_TO_ONLINE_MODE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_GOONLINE"
}
},
"onbutton": [
{
"try-trigger-online": {}
},
{
"$if": {
"$condition": {
"$or": [
"$eqs ($.Metadata.ContractType,mission)",
"$eqs ($.Metadata.ContractType,flashback)",
"$eqs ($.Metadata.ContractType,tutorial)"
]
},
"$then": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM_TITLE",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_TITLE",
"description": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_DESCRIPTION"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
}
}
]
}
}
},
{
"case": "GoToMainMenuDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_CONNECTION_STATUS_DISCONNECTED_GO_TO_HUB",
{
"$switch $.Metadata.ContractType": [
{
"case": "mission",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "flashback",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "tutorial",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
}
]
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_LOAD_NEED_ONLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_MENU_OR_CONTINUE_OFFLINE"
}
},
"onbutton": [
{
"exit-to-main-menu": {}
},
{
"$if": {
"$condition": {
"$or": [
"$eqs ($.Metadata.ContractType,mission)",
"$eqs ($.Metadata.ContractType,flashback)",
"$eqs ($.Metadata.ContractType,tutorial)"
]
},
"$then": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM_TITLE",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_TITLE",
"description": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_DESCRIPTION"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
}
}
]
}
}
},
{
"default": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_CONFIRM_TITLE",
"description": "This message is not supposed to occur"
}
},
"onbutton": []
}
}
}
]
}
}
},
"$else": {
"$setup": {
"$set DialogType": "GoOfflineDialog",
"$set Type": "$.Metadata.Type",
"$set Slot": "$.Metadata.Slot",
"$in": {
"$switch $.DialogType": [
{
"case": "DirectLoad",
"return": {
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
},
{
"case": "LoadDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_LOAD_GAME_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_LOADDIALOG"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOfflineDialogMainMenu",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_GO_OFFLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_MAINMENU_GOOFFLINE"
}
},
"onbutton": [
{
"force-offline": {},
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOfflineDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_GO_OFFLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_GOOFFLINE"
}
},
"onbutton": [
{
"force-offline": {},
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOnlineDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_CONNECTION_SWITCH_TO_ONLINE_MODE",
{
"$switch $.Metadata.ContractType": [
{
"case": "mission",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "flashback",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "tutorial",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
}
]
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONNECTION_SWITCH_TO_ONLINE_MODE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_GOONLINE"
}
},
"onbutton": [
{
"try-trigger-online": {}
},
{
"$if": {
"$condition": {
"$or": [
"$eqs ($.Metadata.ContractType,mission)",
"$eqs ($.Metadata.ContractType,flashback)",
"$eqs ($.Metadata.ContractType,tutorial)"
]
},
"$then": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM_TITLE",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_TITLE",
"description": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_DESCRIPTION"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
}
}
]
}
}
},
{
"case": "GoToMainMenuDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_CONNECTION_STATUS_DISCONNECTED_GO_TO_HUB",
{
"$switch $.Metadata.ContractType": [
{
"case": "mission",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "flashback",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "tutorial",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
}
]
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_LOAD_NEED_ONLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_MENU_OR_CONTINUE_OFFLINE"
}
},
"onbutton": [
{
"exit-to-main-menu": {}
},
{
"$if": {
"$condition": {
"$or": [
"$eqs ($.Metadata.ContractType,mission)",
"$eqs ($.Metadata.ContractType,flashback)",
"$eqs ($.Metadata.ContractType,tutorial)"
]
},
"$then": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM_TITLE",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_TITLE",
"description": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_DESCRIPTION"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
}
}
]
}
}
},
{
"default": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_CONFIRM_TITLE",
"description": "This message is not supposed to occur"
}
},
"onbutton": []
}
}
}
]
}
}
}
}
},
"$else": {
"$if $.Metadata.Online": {
"$then": {
"$setup": {
"$set DialogType": "GoToMainMenuDialog",
"$set Type": "$.Metadata.Type",
"$set Slot": "$.Metadata.Slot",
"$in": {
"$switch $.DialogType": [
{
"case": "DirectLoad",
"return": {
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
},
{
"case": "LoadDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_LOAD_GAME_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_LOADDIALOG"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOfflineDialogMainMenu",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_GO_OFFLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_MAINMENU_GOOFFLINE"
}
},
"onbutton": [
{
"force-offline": {},
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOfflineDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_GO_OFFLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_GOOFFLINE"
}
},
"onbutton": [
{
"force-offline": {},
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOnlineDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_CONNECTION_SWITCH_TO_ONLINE_MODE",
{
"$switch $.Metadata.ContractType": [
{
"case": "mission",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "flashback",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "tutorial",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
}
]
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONNECTION_SWITCH_TO_ONLINE_MODE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_GOONLINE"
}
},
"onbutton": [
{
"try-trigger-online": {}
},
{
"$if": {
"$condition": {
"$or": [
"$eqs ($.Metadata.ContractType,mission)",
"$eqs ($.Metadata.ContractType,flashback)",
"$eqs ($.Metadata.ContractType,tutorial)"
]
},
"$then": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM_TITLE",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_TITLE",
"description": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_DESCRIPTION"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
}
}
]
}
}
},
{
"case": "GoToMainMenuDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_CONNECTION_STATUS_DISCONNECTED_GO_TO_HUB",
{
"$switch $.Metadata.ContractType": [
{
"case": "mission",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "flashback",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "tutorial",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
}
]
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_LOAD_NEED_ONLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_MENU_OR_CONTINUE_OFFLINE"
}
},
"onbutton": [
{
"exit-to-main-menu": {}
},
{
"$if": {
"$condition": {
"$or": [
"$eqs ($.Metadata.ContractType,mission)",
"$eqs ($.Metadata.ContractType,flashback)",
"$eqs ($.Metadata.ContractType,tutorial)"
]
},
"$then": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM_TITLE",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_TITLE",
"description": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_DESCRIPTION"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
}
}
]
}
}
},
{
"default": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_CONFIRM_TITLE",
"description": "This message is not supposed to occur"
}
},
"onbutton": []
}
}
}
]
}
}
},
"$else": {
"$setup": {
"$set DialogType": "LoadDialog",
"$set Type": "$.Metadata.Type",
"$set Slot": "$.Metadata.Slot",
"$in": {
"$switch $.DialogType": [
{
"case": "DirectLoad",
"return": {
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
},
{
"case": "LoadDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_LOAD_GAME_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_LOADDIALOG"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOfflineDialogMainMenu",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_GO_OFFLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_MAINMENU_GOOFFLINE"
}
},
"onbutton": [
{
"force-offline": {},
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOfflineDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_GO_OFFLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_GOOFFLINE"
}
},
"onbutton": [
{
"force-offline": {},
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
},
{
"case": "GoOnlineDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_CONNECTION_SWITCH_TO_ONLINE_MODE",
{
"$switch $.Metadata.ContractType": [
{
"case": "mission",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "flashback",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "tutorial",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
}
]
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONNECTION_SWITCH_TO_ONLINE_MODE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_GOONLINE"
}
},
"onbutton": [
{
"try-trigger-online": {}
},
{
"$if": {
"$condition": {
"$or": [
"$eqs ($.Metadata.ContractType,mission)",
"$eqs ($.Metadata.ContractType,flashback)",
"$eqs ($.Metadata.ContractType,tutorial)"
]
},
"$then": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM_TITLE",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_TITLE",
"description": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_DESCRIPTION"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
}
}
]
}
}
},
{
"case": "GoToMainMenuDialog",
"return": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_CONNECTION_STATUS_DISCONNECTED_GO_TO_HUB",
{
"$switch $.Metadata.ContractType": [
{
"case": "mission",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "flashback",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
},
{
"case": "tutorial",
"return": "$loc UI_CONNECTION_CONTINUE_IN_OFFLINE_MODE"
}
]
},
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_LOAD_NEED_ONLINE_TITLE",
"description": "$loc UI_MENU_PAGE_SAVELOAD_MENU_OR_CONTINUE_OFFLINE"
}
},
"onbutton": [
{
"exit-to-main-menu": {}
},
{
"$if": {
"$condition": {
"$or": [
"$eqs ($.Metadata.ContractType,mission)",
"$eqs ($.Metadata.ContractType,flashback)",
"$eqs ($.Metadata.ContractType,tutorial)"
]
},
"$then": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM_TITLE",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_TITLE",
"description": "$loc UI_CONFIRM_CONTINUE_GAMESESSION_OFFLINE_DESCRIPTION"
}
},
"onbutton": [
{
"load-game": {
"slot": "$.Slot",
"type": "$.Type"
}
}
]
}
}
}
}
]
}
}
},
{
"default": {
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
"$loc UI_DIALOG_CONFIRM",
{
"label": "$loc UI_DIALOG_CANCEL",
"type": "cancel"
}
],
"data": {
"title": "$loc UI_DIALOG_CONFIRM_TITLE",
"description": "This message is not supposed to occur"
}
},
"onbutton": []
}
}
}
]
}
}
}
}
}
}
}
}
}
}
}
}
]
}
]
}
},
"$else": {
"view": "menu3.basic.LoadSaveTileSmall",
"nrows": 1.5,
"ncols": 2,
"pressable": false,
"data": {
"title": "$loc UI_MENU_PAGE_SAVELOAD_EMPTY_SAVE_SLOT",
"occupied": "$.Metadata.Occupied",
"online": true,
"image": "$res images/ui/tiles/empty_saveslot.jpg",
"icon": "mission"
},
"actions": {
"select": {
"replace-children": {
"target": "headline_container",
"children": {
"id": "headline-element",
"view": "menu3.basic.ItemHeadlineElement"
}
},
"update-content": {
"target": "headline-element"
}
},
"deselect": {
"replace-children": {
"target": "headline_container",
"children": []
}
}
}
}
}
}
}
}
]
}
]
}
}
]
}
}