diff --git a/extensions/community/AreaTitle.json b/extensions/community/AreaTitle.json new file mode 100644 index 000000000..e3f2f7be2 --- /dev/null +++ b/extensions/community/AreaTitle.json @@ -0,0 +1,1542 @@ +{ + "author": "", + "category": "User interface", + "extensionNamespace": "", + "fullName": "Area title", + "gdevelopVersion": ">=5.5.230", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PGcgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCI+PGxpbmUgeDE9IjkiIHkxPSIxMyIgeDI9IjIzIiB5Mj0iMTMiLz48bGluZSB4MT0iMTIiIHkxPSIxOCIgeDI9IjIwIiB5Mj0iMTgiLz48bGluZSB4MT0iMiIgeTE9IjE2IiB4Mj0iNiIgeTI9IjE2Ii8+PGxpbmUgeDE9IjI2IiB5MT0iMTYiIHgyPSIzMCIgeTI9IjE2Ii8+PC9nPjwvc3ZnPg==", + "name": "AreaTitle", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Interface Elements/0842ffc478006e9b6687fca9a5761494c4efd1df873220637af5b4ac7253f850_Interface Elements_interface_ui_window_application_app_button_cta.svg", + "shortDescription": "Show the name of an area or a level with a fade, when the player enters it.", + "version": "1.0.0", + "description": [ + "Show the name of an area or a level (with a subtitle, like \"Chapter 1\"), when the player enters it:", + "it fades in, stays a few seconds and fades out.", + "", + "Put it on a UI layer. It is shown when the scene starts, or with the action \"Show a title\", for example when the player enters a new zone.", + "", + "Ready-to-use area titles in many styles are in the asset store [area titles pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=area-titles)." + ], + "origin": { + "identifier": "AreaTitle", + "name": "gdevelop-extension-store" + }, + "tags": [ + "title", + "level", + "area", + "zone", + "name", + "banner", + "ui" + ], + "authorIds": [ + "R0F5QGNCzgOY5w2cxGeKJOq2UaD2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [ + { + "areaMaxX": 640, + "areaMaxY": 170, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreTag": "area titles", + "defaultName": "AreaTitle", + "description": "The name of an area or a level, with a subtitle, shown with a fade when the player enters it.", + "fullName": "Area title", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, + "name": "AreaTitle", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Title", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "string": "Whispering Woods", + "font": "", + "textAlignment": "center", + "characterSize": 56, + "color": { + "r": 0, + "g": 0, + "b": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Whispering Woods", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 56, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Subtitle", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "string": "Chapter 1", + "font": "", + "textAlignment": "center", + "characterSize": 24, + "color": { + "r": 0, + "g": 0, + "b": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Chapter 1", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 24, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 64, + "leftMargin": 0, + "name": "Background", + "rightMargin": 0, + "texture": "", + "tiled": false, + "type": "PanelSpriteObject::PanelSprite", + "width": 64, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Decoration", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "animations": [] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Title" + }, + { + "objectName": "Subtitle" + }, + { + "objectName": "Background" + }, + { + "objectName": "Decoration" + } + ] + }, + "objectsGroups": [ + { + "name": "Elements", + "objects": [ + { + "name": "Title" + }, + { + "name": "Subtitle" + }, + { + "name": "Background" + }, + { + "name": "Decoration" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "height": 70, + "layer": "", + "name": "Title", + "persistentUuid": "96e90d60-71f5-4484-88ef-0c4ccf6b843f", + "width": 640, + "x": 0, + "y": 60, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 30, + "layer": "", + "name": "Subtitle", + "persistentUuid": "e9cdc885-80b5-4d1b-a816-3ffd43d6a7b9", + "width": 640, + "x": 0, + "y": 110, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "propertyDescriptors": [ + { + "value": "Whispering Woods", + "type": "String", + "label": "Title", + "name": "TitleText", + "description": "The name of the area or the level." + }, + { + "value": "Chapter 1", + "type": "String", + "label": "Subtitle", + "name": "SubtitleText", + "description": "Leave it empty to hide the subtitle." + }, + { + "value": "true", + "type": "Boolean", + "label": "Show when created", + "name": "ShouldShowOnCreation", + "description": "Show the title as soon as it is created, for example at the beginning of a scene." + }, + { + "value": "2.5", + "type": "Number", + "label": "Display duration", + "name": "DisplayDuration", + "description": "How long the title stays fully visible. 0 to keep it visible until it is hidden with an action.", + "group": "Animation", + "unit": "Second" + }, + { + "value": "0.8", + "type": "Number", + "label": "Fade duration", + "name": "FadeDuration", + "description": "Duration of the fade in and of the fade out.", + "group": "Animation", + "unit": "Second" + }, + { + "value": "Hidden", + "type": "String", + "label": "", + "name": "Phase", + "hidden": true + } + ], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Title", + "Text", + "=", + "TitleText" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Subtitle", + "Text", + "=", + "SubtitleText" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "SubtitleText", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Subtitle" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "SubtitleText", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "Subtitle" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "In the scene editor, the title stays visible to be placed and styled." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "AreaTitle::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "OpacityCapability::OpacityBehavior::SetValue" + }, + "parameters": [ + "Elements", + "Opacity", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldShowOnCreation", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AreaTitle::AreaTitle::Show" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "AreaTitle::AreaTitle", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Title", + "Text", + "=", + "TitleText" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Subtitle", + "Text", + "=", + "SubtitleText" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "SubtitleText", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Subtitle" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "SubtitleText", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "Subtitle" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "AreaTitle::AreaTitle", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "AreaTitle::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Phase", + "=", + "\"FadingIn\"" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"AreaTitle\"", + ">=", + "FadeDuration" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "Phase", + "=", + "\"Shown\"" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"AreaTitle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Phase", + "=", + "\"Shown\"" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "DisplayDuration", + ">", + "0" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"AreaTitle\"", + ">=", + "DisplayDuration" + ] + } + ], + "actions": [ + { + "type": { + "value": "AreaTitle::AreaTitle::Hide" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Phase", + "=", + "\"FadingOut\"" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"AreaTitle\"", + ">=", + "FadeDuration" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "Phase", + "=", + "\"Hidden\"" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "AreaTitle::AreaTitle", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "Show", + "functionType": "Action", + "name": "Show", + "sentence": "Show _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "AreaTitle::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "Phase", + "=", + "\"FadingIn\"" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"AreaTitle\"" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Elements", + "Tween", + "\"Fade\"" + ] + }, + { + "type": { + "value": "OpacityCapability::OpacityBehavior::SetValue" + }, + "parameters": [ + "Elements", + "Opacity", + "=", + "0" + ] + }, + { + "type": { + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" + }, + "parameters": [ + "Elements", + "Tween", + "\"Fade\"", + "255", + "\"easeOutQuad\"", + "FadeDuration", + "no" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Decoration", + "Tween", + "\"Grow\"" + ] + }, + { + "type": { + "value": "ScalableCapability::ScalableBehavior::SetX" + }, + "parameters": [ + "Decoration", + "Scale", + "=", + "0" + ] + }, + { + "type": { + "value": "Tween::TweenBehavior::AddObjectScaleXTween2" + }, + "parameters": [ + "Decoration", + "Tween", + "\"Grow\"", + "1", + "\"easeOutQuad\"", + "FadeDuration * 1.5", + "no", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "AreaTitle::AreaTitle", + "type": "object" + } + ], + "objectGroups": [], + "description": "Show the title with a fade in. It is hidden after the display duration (unless it is 0)." + }, + { + "fullName": "Hide", + "functionType": "Action", + "name": "Hide", + "sentence": "Hide _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "AreaTitle::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Phase", + "!=", + "\"Hidden\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Phase", + "!=", + "\"FadingOut\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "Phase", + "=", + "\"FadingOut\"" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"AreaTitle\"" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Elements", + "Tween", + "\"Fade\"" + ] + }, + { + "type": { + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" + }, + "parameters": [ + "Elements", + "Tween", + "\"Fade\"", + "0", + "\"easeInQuad\"", + "FadeDuration", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "AreaTitle::AreaTitle", + "type": "object" + } + ], + "objectGroups": [], + "description": "Hide the title with a fade out." + }, + { + "fullName": "Show a title", + "functionType": "Action", + "name": "ShowTitle", + "sentence": "Show the title _PARAM1_ (subtitle: _PARAM2_) with _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TitleText", + "=", + "NewTitle" + ] + }, + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "SubtitleText", + "=", + "NewSubtitle" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Title", + "Text", + "=", + "TitleText" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Subtitle", + "Text", + "=", + "SubtitleText" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "SubtitleText", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Subtitle" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "SubtitleText", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "Subtitle" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AreaTitle::AreaTitle::Show" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "AreaTitle::AreaTitle", + "type": "object" + }, + { + "description": "Title", + "name": "NewTitle", + "type": "string" + }, + { + "description": "Subtitle (can be empty)", + "name": "NewSubtitle", + "type": "string" + } + ], + "objectGroups": [], + "description": "Change the title and the subtitle, and show them with a fade in. Use it when the player enters a new area." + }, + { + "fullName": "Is shown", + "functionType": "Condition", + "name": "IsShown", + "sentence": "_PARAM0_ is shown", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Phase", + "!=", + "\"Hidden\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "AreaTitle::AreaTitle", + "type": "object" + } + ], + "objectGroups": [], + "description": "Check if the title is shown (including while it fades in or out)." + }, + { + "fullName": "Title", + "functionType": "ExpressionAndCondition", + "name": "Title", + "sentence": "the title", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "TitleText" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "AreaTitle::AreaTitle", + "type": "object" + } + ], + "objectGroups": [], + "description": "the title.", + "expressionType": { + "type": "string" + } + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "name": "SetTitle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TitleText", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Title", + "Text", + "=", + "TitleText" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Subtitle", + "Text", + "=", + "SubtitleText" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "SubtitleText", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Subtitle" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "SubtitleText", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "Subtitle" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "AreaTitle::AreaTitle", + "type": "object" + } + ], + "objectGroups": [], + "getterName": "Title" + }, + { + "fullName": "Subtitle", + "functionType": "ExpressionAndCondition", + "name": "Subtitle", + "sentence": "the subtitle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "SubtitleText" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "AreaTitle::AreaTitle", + "type": "object" + } + ], + "objectGroups": [], + "description": "the subtitle.", + "expressionType": { + "type": "string" + } + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "name": "SetSubtitle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "SubtitleText", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Title", + "Text", + "=", + "TitleText" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Subtitle", + "Text", + "=", + "SubtitleText" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "SubtitleText", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Subtitle" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "SubtitleText", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "Subtitle" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "AreaTitle::AreaTitle", + "type": "object" + } + ], + "objectGroups": [], + "getterName": "Subtitle" + } + ] + } + ] +} \ No newline at end of file diff --git a/extensions/community/Dialogs.json b/extensions/community/Dialogs.json new file mode 100644 index 000000000..1d92dca39 --- /dev/null +++ b/extensions/community/Dialogs.json @@ -0,0 +1,5541 @@ +{ + "author": "", + "category": "User interface", + "extensionNamespace": "", + "fullName": "Dialogs (info and choices)", + "gdevelopVersion": ">=5.5.230", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PGcgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHJlY3QgeD0iMyIgeT0iNSIgd2lkdGg9IjI2IiBoZWlnaHQ9IjIyIiByeD0iMiIvPjxsaW5lIHgxPSI4IiB5MT0iMTEiIHgyPSIyNCIgeTI9IjExIi8+PHJlY3QgeD0iOCIgeT0iMTUiIHdpZHRoPSIxNiIgaGVpZ2h0PSI0IiByeD0iMSIvPjxyZWN0IHg9IjgiIHk9IjIxIiB3aWR0aD0iMTYiIGhlaWdodD0iMyIgcng9IjEiLz48L2c+PC9zdmc+", + "name": "Dialogs", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Interface Elements/0842ffc478006e9b6687fca9a5761494c4efd1df873220637af5b4ac7253f850_Interface Elements_interface_ui_window_application_app_button_cta.svg", + "shortDescription": "Info dialog with a button, and dialog with up to 5 choices (like a pause menu). Mouse, touch, keyboard and gamepad support.", + "version": "1.0.0", + "description": [ + "Dialogs to show to the player:", + "- an **info dialog**: a message with a button (like \"OK\"), to close it,", + "- a **choices dialog**: up to 5 choices to pick from, like a pause menu or a question.", + "", + "Both can have a title, an icon and a close button. They work with the mouse, touchscreens, keyboards (arrows, Enter, Escape) and gamepads.", + "", + "Ready-to-use dialogs in many styles are in the asset store [info and choices dialogs pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=info-and-choices-dialogs)." + ], + "origin": { + "identifier": "Dialogs", + "name": "gdevelop-extension-store" + }, + "tags": [ + "dialog", + "popup", + "modal", + "menu", + "pause", + "choice", + "message", + "ui" + ], + "authorIds": [ + "R0F5QGNCzgOY5w2cxGeKJOq2UaD2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [ + { + "areaMaxX": 480, + "areaMaxY": 280, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreTag": "info and choices dialogs", + "defaultName": "InfoDialog", + "description": "A dialog showing a message and a button (like \"OK\") to close it. It can also have a title, an icon and a close button. It works with the mouse, touchscreens, keyboards and gamepads.", + "fullName": "Info dialog", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, + "name": "InfoDialog", + "objects": [ + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 240, + "leftMargin": 0, + "name": "Panel", + "rightMargin": 0, + "texture": "", + "tiled": false, + "type": "PanelSpriteObject::PanelSprite", + "width": 400, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Title", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Information", + "font": "", + "textAlignment": "center", + "characterSize": 32, + "color": { + "r": 0, + "g": 0, + "b": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Information", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 32, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Message", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Message", + "font": "", + "textAlignment": "center", + "characterSize": 24, + "color": { + "r": 0, + "g": 0, + "b": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Message", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 24, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "name": "Button", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LabelText": "OK" + } + }, + { + "assetStoreId": "", + "name": "CloseButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 1, + "leftEdgeAnchor": 2, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LabelText": "" + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Icon", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 1, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "animations": [] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Panel" + }, + { + "objectName": "Title" + }, + { + "objectName": "Message" + }, + { + "objectName": "Button" + }, + { + "objectName": "CloseButton" + }, + { + "objectName": "Icon" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "height": 280, + "layer": "", + "name": "Panel", + "persistentUuid": "1efb9cb3-9ce7-4cdc-9a7e-5ae83e574562", + "width": 480, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 40, + "layer": "", + "name": "Title", + "persistentUuid": "cff82d03-e396-4fa1-8388-3e56fd67199d", + "width": 420, + "x": 30, + "y": 28, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 100, + "layer": "", + "name": "Message", + "persistentUuid": "b7d4722a-ff88-4097-a926-8b0e0c84d14d", + "width": 420, + "x": 30, + "y": 84, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 56, + "layer": "", + "name": "Button", + "persistentUuid": "b26efa65-ddc0-4905-a943-608ef4ecd121", + "width": 160, + "x": 160, + "y": 196, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "propertyDescriptors": [ + { + "value": "Information", + "type": "String", + "label": "Title", + "name": "TitleText", + "description": "Leave it empty to hide the title." + }, + { + "value": "Something happened. Press OK to continue.", + "type": "MultilineString", + "label": "Message", + "name": "MessageText" + }, + { + "value": "OK", + "type": "String", + "label": "Button label", + "name": "ButtonLabel" + }, + { + "value": "true", + "type": "Boolean", + "label": "Close with Escape (or the B button of a gamepad)", + "name": "CanBeClosedWithEscape" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "name": "IsConfirmedThisFrame", + "hidden": true + }, + { + "value": "", + "type": "Boolean", + "label": "", + "name": "IsClosedThisFrame", + "hidden": true + } + ], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Title", + "Text", + "=", + "TitleText" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TitleText", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Title" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TitleText", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "Title" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Message", + "Text", + "=", + "MessageText" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "MessageText", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Message" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "MessageText", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "Message" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelText" + }, + "parameters": [ + "Button", + "ButtonLabel", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::InfoDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Title", + "Text", + "=", + "TitleText" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TitleText", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Title" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TitleText", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "Title" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Message", + "Text", + "=", + "MessageText" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "MessageText", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Message" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "MessageText", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "Message" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelText" + }, + "parameters": [ + "Button", + "ButtonLabel", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::InfoDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The choice made during a frame is kept until the end of the next frame, so that it can be checked in the events of the scene." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsConfirmedThisFrame", + "False", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsClosedThisFrame", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Button", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyFromTextJustPressed" + }, + "parameters": [ + "", + "\"Return\"" + ] + }, + { + "type": { + "value": "KeyFromTextJustPressed" + }, + "parameters": [ + "", + "\"NumpadReturn\"" + ] + }, + { + "type": { + "value": "KeyFromTextJustPressed" + }, + "parameters": [ + "", + "\"Space\"" + ] + }, + { + "type": { + "value": "Gamepads::IsButtonJustPressed" + }, + "parameters": [ + "", + "1", + "\"A\"", + "" + ] + } + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsConfirmedThisFrame", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "CloseButton", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::And" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "CanBeClosedWithEscape", + "True", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyFromTextJustPressed" + }, + "parameters": [ + "", + "\"Escape\"" + ] + }, + { + "type": { + "value": "Gamepads::IsButtonJustPressed" + }, + "parameters": [ + "", + "1", + "\"B\"", + "" + ] + } + ] + } + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsClosedThisFrame", + "True", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::InfoDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "Button is clicked", + "functionType": "Condition", + "name": "IsConfirmed", + "sentence": "The button of _PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsConfirmedThisFrame", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::InfoDialog", + "type": "object" + } + ], + "objectGroups": [], + "description": "Check if the button of the dialog was clicked (or Enter, Space or the A button of a gamepad was pressed)." + }, + { + "fullName": "Dialog is closed", + "functionType": "Condition", + "name": "IsClosed", + "sentence": "_PARAM0_ is closed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsConfirmedThisFrame", + "True", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsClosedThisFrame", + "True", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::InfoDialog", + "type": "object" + } + ], + "objectGroups": [], + "description": "Check if the dialog was closed by the player: its button or its close button was clicked, or Enter or Escape was pressed. Delete or hide the dialog when it happens." + }, + { + "fullName": "Title", + "functionType": "ExpressionAndCondition", + "name": "Title", + "sentence": "the title", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "TitleText" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::InfoDialog", + "type": "object" + } + ], + "objectGroups": [], + "description": "the title of the dialog.", + "expressionType": { + "type": "string" + } + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "name": "SetTitle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TitleText", + "=", + "Value" + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Title", + "Text", + "=", + "TitleText" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TitleText", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Title" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TitleText", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "Title" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Message", + "Text", + "=", + "MessageText" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "MessageText", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Message" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "MessageText", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "Message" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelText" + }, + "parameters": [ + "Button", + "ButtonLabel", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::InfoDialog", + "type": "object" + } + ], + "objectGroups": [], + "getterName": "Title" + }, + { + "fullName": "Message", + "functionType": "ExpressionAndCondition", + "name": "Message", + "sentence": "the message", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "MessageText" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::InfoDialog", + "type": "object" + } + ], + "objectGroups": [], + "description": "the message of the dialog.", + "expressionType": { + "type": "string" + } + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "name": "SetMessage", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "MessageText", + "=", + "Value" + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Title", + "Text", + "=", + "TitleText" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TitleText", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Title" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TitleText", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "Title" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Message", + "Text", + "=", + "MessageText" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "MessageText", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Message" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "MessageText", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "Message" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelText" + }, + "parameters": [ + "Button", + "ButtonLabel", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::InfoDialog", + "type": "object" + } + ], + "objectGroups": [], + "getterName": "Message" + }, + { + "fullName": "Button label", + "functionType": "ExpressionAndCondition", + "name": "ButtonLabel", + "sentence": "the button label", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "ButtonLabel" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::InfoDialog", + "type": "object" + } + ], + "objectGroups": [], + "description": "the label of the button of the dialog.", + "expressionType": { + "type": "string" + } + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "name": "SetButtonLabel", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "ButtonLabel", + "=", + "Value" + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Title", + "Text", + "=", + "TitleText" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TitleText", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Title" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TitleText", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "Title" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Message", + "Text", + "=", + "MessageText" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "MessageText", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Message" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "MessageText", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "Message" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelText" + }, + "parameters": [ + "Button", + "ButtonLabel", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::InfoDialog", + "type": "object" + } + ], + "objectGroups": [], + "getterName": "ButtonLabel" + } + ] + }, + { + "areaMaxX": 360, + "areaMaxY": 470, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreTag": "info and choices dialogs", + "defaultName": "ChoicesDialog", + "description": "A dialog with a title, a message and up to 5 choices, like a pause menu or a question to the player. It works with the mouse, touchscreens, keyboards and gamepads.", + "fullName": "Choices dialog", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, + "name": "ChoicesDialog", + "objects": [ + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 400, + "leftMargin": 0, + "name": "Panel", + "rightMargin": 0, + "texture": "", + "tiled": false, + "type": "PanelSpriteObject::PanelSprite", + "width": 400, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Title", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Paused", + "font": "", + "textAlignment": "center", + "characterSize": 32, + "color": { + "r": 0, + "g": 0, + "b": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Paused", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 32, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Message", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "", + "font": "", + "textAlignment": "center", + "characterSize": 22, + "color": { + "r": 0, + "g": 0, + "b": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 22, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "name": "Choice1", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LabelText": "" + } + }, + { + "assetStoreId": "", + "name": "Choice2", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LabelText": "" + } + }, + { + "assetStoreId": "", + "name": "Choice3", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LabelText": "" + } + }, + { + "assetStoreId": "", + "name": "Choice4", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LabelText": "" + } + }, + { + "assetStoreId": "", + "name": "Choice5", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LabelText": "" + } + }, + { + "assetStoreId": "", + "name": "CloseButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 1, + "leftEdgeAnchor": 2, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LabelText": "" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 64, + "leftMargin": 0, + "name": "Selector", + "rightMargin": 0, + "texture": "", + "tiled": false, + "type": "PanelSpriteObject::PanelSprite", + "width": 64, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Icon", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 1, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "animations": [] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Panel" + }, + { + "objectName": "Title" + }, + { + "objectName": "Message" + }, + { + "objectName": "Choice1" + }, + { + "objectName": "Choice2" + }, + { + "objectName": "Choice3" + }, + { + "objectName": "Choice4" + }, + { + "objectName": "Choice5" + }, + { + "objectName": "CloseButton" + }, + { + "objectName": "Selector" + }, + { + "objectName": "Icon" + } + ] + }, + "objectsGroups": [ + { + "name": "Choices", + "objects": [ + { + "name": "Choice1" + }, + { + "name": "Choice2" + }, + { + "name": "Choice3" + }, + { + "name": "Choice4" + }, + { + "name": "Choice5" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "height": 470, + "layer": "", + "name": "Panel", + "persistentUuid": "a551d3a9-6e20-42d7-b312-c1a99f500065", + "width": 360, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 40, + "layer": "", + "name": "Title", + "persistentUuid": "91b1e59b-3bb4-415f-a97d-e590b3ad434b", + "width": 320, + "x": 20, + "y": 26, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 56, + "layer": "", + "name": "Choice1", + "persistentUuid": "f15f6ebc-924d-4948-9b6b-92b2d06443a7", + "width": 280, + "x": 40, + "y": 90, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 56, + "layer": "", + "name": "Choice2", + "persistentUuid": "657b4aad-b3a7-481a-8005-fb3d0d76440b", + "width": 280, + "x": 40, + "y": 162, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 56, + "layer": "", + "name": "Choice3", + "persistentUuid": "72a94850-5dd8-42e6-a167-08941230693f", + "width": 280, + "x": 40, + "y": 234, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 56, + "layer": "", + "name": "Choice4", + "persistentUuid": "9654a94e-95dc-434f-810c-a320338e84e4", + "width": 280, + "x": 40, + "y": 306, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 56, + "layer": "", + "name": "Choice5", + "persistentUuid": "96c5bb54-0947-4ffe-ba7a-bc30e9ccb22e", + "width": 280, + "x": 40, + "y": 378, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "propertyDescriptors": [ + { + "value": "Paused", + "type": "String", + "label": "Title", + "name": "TitleText", + "description": "Leave it empty to hide the title." + }, + { + "value": "", + "type": "MultilineString", + "label": "Message", + "name": "MessageText", + "description": "Leave it empty to hide the message." + }, + { + "value": "Resume", + "type": "String", + "label": "Choice 1", + "name": "Choice1Label", + "group": "Choices" + }, + { + "value": "Settings", + "type": "String", + "label": "Choice 2", + "name": "Choice2Label", + "description": "Leave it empty to hide this choice.", + "group": "Choices" + }, + { + "value": "Quit", + "type": "String", + "label": "Choice 3", + "name": "Choice3Label", + "description": "Leave it empty to hide this choice.", + "group": "Choices" + }, + { + "value": "", + "type": "String", + "label": "Choice 4", + "name": "Choice4Label", + "description": "Leave it empty to hide this choice.", + "group": "Choices" + }, + { + "value": "", + "type": "String", + "label": "Choice 5", + "name": "Choice5Label", + "description": "Leave it empty to hide this choice.", + "group": "Choices" + }, + { + "value": "true", + "type": "Boolean", + "label": "Close with Escape (or the B button of a gamepad)", + "name": "CanBeClosedWithEscape" + }, + { + "value": "0", + "type": "Number", + "label": "", + "name": "PickedChoiceThisFrame", + "hidden": true, + "unit": "Dimensionless" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "name": "IsClosedThisFrame", + "hidden": true + }, + { + "value": "1", + "type": "Number", + "label": "", + "name": "FocusedChoiceNumber", + "hidden": true, + "unit": "Dimensionless" + }, + { + "value": "0", + "type": "Number", + "label": "", + "name": "PanelBottomMargin", + "hidden": true, + "unit": "Dimensionless" + }, + { + "value": "0", + "type": "Number", + "label": "", + "name": "LastChoiceBottom", + "hidden": true, + "unit": "Dimensionless" + }, + { + "value": "0", + "type": "Number", + "label": "", + "name": "LayoutWidth", + "hidden": true, + "unit": "Dimensionless" + }, + { + "value": "0", + "type": "Number", + "label": "", + "name": "LayoutHeight", + "hidden": true, + "unit": "Dimensionless" + }, + { + "value": "0", + "type": "Number", + "label": "", + "name": "SelectorMarginLeft", + "hidden": true, + "unit": "Dimensionless" + }, + { + "value": "0", + "type": "Number", + "label": "", + "name": "SelectorMarginTop", + "hidden": true, + "unit": "Dimensionless" + }, + { + "value": "0", + "type": "Number", + "label": "", + "name": "SelectorMarginRight", + "hidden": true, + "unit": "Dimensionless" + }, + { + "value": "0", + "type": "Number", + "label": "", + "name": "SelectorMarginBottom", + "hidden": true, + "unit": "Dimensionless" + } + ], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Remember the margins of the layout, to keep them when choices are hidden." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "PanelBottomMargin", + "=", + "Panel.BoundingBoxBottom() - max(max(max(Choice1.BoundingBoxBottom(), Choice2.BoundingBoxBottom()), max(Choice3.BoundingBoxBottom(), Choice4.BoundingBoxBottom())), Choice5.BoundingBoxBottom())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneInstancesCount" + }, + "parameters": [ + "", + "Selector", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "SelectorMarginLeft", + "=", + "Choice1.BoundingBoxLeft() - Selector.BoundingBoxLeft()" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "SelectorMarginTop", + "=", + "Choice1.BoundingBoxTop() - Selector.BoundingBoxTop()" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "SelectorMarginRight", + "=", + "Selector.BoundingBoxRight() - Choice1.BoundingBoxRight()" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "SelectorMarginBottom", + "=", + "Selector.BoundingBoxBottom() - Choice1.BoundingBoxBottom()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Dialogs::ChoicesDialog::UpdateLayout" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::ChoicesDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Dialogs::ChoicesDialog::UpdateLayout" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::ChoicesDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "When the dialog is resized (including at its first frame, once the anchors placed its children), fit the panel and the selector again." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "LayoutWidth", + "!=", + "Object.Width()" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "LayoutHeight", + "!=", + "Object.Height()" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LayoutWidth", + "=", + "Object.Width()" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LayoutHeight", + "=", + "Object.Height()" + ] + }, + { + "type": { + "value": "Dialogs::ChoicesDialog::UpdateLayout" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The choice made during a frame is kept until the end of the next frame, so that it can be checked in the events of the scene." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "PickedChoiceThisFrame", + "=", + "0" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsClosedThisFrame", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Mouse and touch", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" + }, + "parameters": [ + "Choice1", + "" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "FocusedChoiceNumber", + "!=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Dialogs::ChoicesDialog::FocusChoice" + }, + "parameters": [ + "Object", + "1", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" + }, + "parameters": [ + "Choice2", + "" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "FocusedChoiceNumber", + "!=", + "2" + ] + } + ], + "actions": [ + { + "type": { + "value": "Dialogs::ChoicesDialog::FocusChoice" + }, + "parameters": [ + "Object", + "2", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" + }, + "parameters": [ + "Choice3", + "" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "FocusedChoiceNumber", + "!=", + "3" + ] + } + ], + "actions": [ + { + "type": { + "value": "Dialogs::ChoicesDialog::FocusChoice" + }, + "parameters": [ + "Object", + "3", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" + }, + "parameters": [ + "Choice4", + "" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "FocusedChoiceNumber", + "!=", + "4" + ] + } + ], + "actions": [ + { + "type": { + "value": "Dialogs::ChoicesDialog::FocusChoice" + }, + "parameters": [ + "Object", + "4", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" + }, + "parameters": [ + "Choice5", + "" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "FocusedChoiceNumber", + "!=", + "5" + ] + } + ], + "actions": [ + { + "type": { + "value": "Dialogs::ChoicesDialog::FocusChoice" + }, + "parameters": [ + "Object", + "5", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Choice1", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "PickedChoiceThisFrame", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Choice2", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "PickedChoiceThisFrame", + "=", + "2" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Choice3", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "PickedChoiceThisFrame", + "=", + "3" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Choice4", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "PickedChoiceThisFrame", + "=", + "4" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Choice5", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "PickedChoiceThisFrame", + "=", + "5" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "CloseButton", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsClosedThisFrame", + "True", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Keyboard and gamepad", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyFromTextJustPressed" + }, + "parameters": [ + "", + "\"Down\"" + ] + }, + { + "type": { + "value": "KeyFromTextJustPressed" + }, + "parameters": [ + "", + "\"Right\"" + ] + }, + { + "type": { + "value": "KeyFromTextJustPressed" + }, + "parameters": [ + "", + "\"Tab\"" + ] + }, + { + "type": { + "value": "Gamepads::IsButtonJustPressed" + }, + "parameters": [ + "", + "1", + "\"Down\"", + "" + ] + }, + { + "type": { + "value": "Gamepads::IsButtonJustPressed" + }, + "parameters": [ + "", + "1", + "\"Right\"", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "Dialogs::ChoicesDialog::FocusChoice" + }, + "parameters": [ + "Object", + "mod(FocusedChoiceNumber, 5) + 1", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Going up, skip the hidden choices backwards." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyFromTextJustPressed" + }, + "parameters": [ + "", + "\"Up\"" + ] + }, + { + "type": { + "value": "KeyFromTextJustPressed" + }, + "parameters": [ + "", + "\"Left\"" + ] + }, + { + "type": { + "value": "Gamepads::IsButtonJustPressed" + }, + "parameters": [ + "", + "1", + "\"Up\"", + "" + ] + }, + { + "type": { + "value": "Gamepads::IsButtonJustPressed" + }, + "parameters": [ + "", + "1", + "\"Left\"", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FocusedChoiceNumber", + "=", + "mod(FocusedChoiceNumber + 3, 5) + 1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "4", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Dialogs::ChoicesDialog::IsChoiceShown" + }, + "parameters": [ + "Object", + "FocusedChoiceNumber", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FocusedChoiceNumber", + "=", + "mod(FocusedChoiceNumber + 3, 5) + 1" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Dialogs::ChoicesDialog::FocusChoice" + }, + "parameters": [ + "Object", + "FocusedChoiceNumber", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyFromTextJustPressed" + }, + "parameters": [ + "", + "\"Return\"" + ] + }, + { + "type": { + "value": "KeyFromTextJustPressed" + }, + "parameters": [ + "", + "\"NumpadReturn\"" + ] + }, + { + "type": { + "value": "KeyFromTextJustPressed" + }, + "parameters": [ + "", + "\"Space\"" + ] + }, + { + "type": { + "value": "Gamepads::IsButtonJustPressed" + }, + "parameters": [ + "", + "1", + "\"A\"", + "" + ] + } + ] + }, + { + "type": { + "value": "Dialogs::ChoicesDialog::IsChoiceShown" + }, + "parameters": [ + "Object", + "FocusedChoiceNumber", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "PickedChoiceThisFrame", + "=", + "FocusedChoiceNumber" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "CanBeClosedWithEscape", + "True", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyFromTextJustPressed" + }, + "parameters": [ + "", + "\"Escape\"" + ] + }, + { + "type": { + "value": "Gamepads::IsButtonJustPressed" + }, + "parameters": [ + "", + "1", + "\"B\"", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsClosedThisFrame", + "True", + "" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::ChoicesDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "Update layout", + "functionType": "Action", + "name": "UpdateLayout", + "sentence": "Update the layout of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Show the choices that have a label and hide the others (they also stop reacting to clicks)." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelText" + }, + "parameters": [ + "Choice1", + "Choice1Label", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Choice1Label", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Choice1" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::Activate" + }, + "parameters": [ + "Choice1", + "no", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Choice1Label", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "Choice1" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::Activate" + }, + "parameters": [ + "Choice1", + "yes", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelText" + }, + "parameters": [ + "Choice2", + "Choice2Label", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Choice2Label", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Choice2" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::Activate" + }, + "parameters": [ + "Choice2", + "no", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Choice2Label", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "Choice2" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::Activate" + }, + "parameters": [ + "Choice2", + "yes", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelText" + }, + "parameters": [ + "Choice3", + "Choice3Label", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Choice3Label", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Choice3" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::Activate" + }, + "parameters": [ + "Choice3", + "no", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Choice3Label", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "Choice3" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::Activate" + }, + "parameters": [ + "Choice3", + "yes", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelText" + }, + "parameters": [ + "Choice4", + "Choice4Label", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Choice4Label", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Choice4" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::Activate" + }, + "parameters": [ + "Choice4", + "no", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Choice4Label", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "Choice4" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::Activate" + }, + "parameters": [ + "Choice4", + "yes", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelText" + }, + "parameters": [ + "Choice5", + "Choice5Label", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Choice5Label", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Choice5" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::Activate" + }, + "parameters": [ + "Choice5", + "no", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Choice5Label", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "Choice5" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::Activate" + }, + "parameters": [ + "Choice5", + "yes", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Title", + "Text", + "=", + "TitleText" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TitleText", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Title" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TitleText", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "Title" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Message", + "Text", + "=", + "MessageText" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "MessageText", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Message" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "MessageText", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Show" + }, + "parameters": [ + "Message" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Shrink the panel so that it ends under the last shown choice." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LastChoiceBottom", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Choice1" + ] + }, + { + "type": { + "value": "SceneInstancesCount" + }, + "parameters": [ + "", + "Choice1", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LastChoiceBottom", + "=", + "Choice1.BoundingBoxBottom()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Choice2" + ] + }, + { + "type": { + "value": "SceneInstancesCount" + }, + "parameters": [ + "", + "Choice2", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LastChoiceBottom", + "=", + "Choice2.BoundingBoxBottom()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Choice3" + ] + }, + { + "type": { + "value": "SceneInstancesCount" + }, + "parameters": [ + "", + "Choice3", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LastChoiceBottom", + "=", + "Choice3.BoundingBoxBottom()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Choice4" + ] + }, + { + "type": { + "value": "SceneInstancesCount" + }, + "parameters": [ + "", + "Choice4", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LastChoiceBottom", + "=", + "Choice4.BoundingBoxBottom()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Choice5" + ] + }, + { + "type": { + "value": "SceneInstancesCount" + }, + "parameters": [ + "", + "Choice5", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LastChoiceBottom", + "=", + "Choice5.BoundingBoxBottom()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "LastChoiceBottom", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetHeight" + }, + "parameters": [ + "Panel", + "Resizable", + "=", + "LastChoiceBottom + PanelBottomMargin - Panel.Y()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Dialogs::ChoicesDialog::FocusChoice" + }, + "parameters": [ + "Object", + "FocusedChoiceNumber", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::ChoicesDialog", + "type": "object" + } + ], + "objectGroups": [], + "description": "Show the choices with a label, hide the others and resize the panel.", + "private": true + }, + { + "fullName": "Choice is shown", + "functionType": "Condition", + "name": "IsChoiceShown", + "sentence": "Choice _PARAM1_ of _PARAM0_ is shown", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "ChoiceNumber", + "=", + "1" + ] + }, + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Choice1" + ] + }, + { + "type": { + "value": "SceneInstancesCount" + }, + "parameters": [ + "", + "Choice1", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "ChoiceNumber", + "=", + "2" + ] + }, + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Choice2" + ] + }, + { + "type": { + "value": "SceneInstancesCount" + }, + "parameters": [ + "", + "Choice2", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "ChoiceNumber", + "=", + "3" + ] + }, + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Choice3" + ] + }, + { + "type": { + "value": "SceneInstancesCount" + }, + "parameters": [ + "", + "Choice3", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "ChoiceNumber", + "=", + "4" + ] + }, + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Choice4" + ] + }, + { + "type": { + "value": "SceneInstancesCount" + }, + "parameters": [ + "", + "Choice4", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "ChoiceNumber", + "=", + "5" + ] + }, + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Choice5" + ] + }, + { + "type": { + "value": "SceneInstancesCount" + }, + "parameters": [ + "", + "Choice5", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::ChoicesDialog", + "type": "object" + }, + { + "description": "Choice number (from 1 to 5)", + "name": "ChoiceNumber", + "type": "expression" + } + ], + "objectGroups": [], + "description": "Check if a choice is shown.", + "private": true + }, + { + "fullName": "Focus a choice", + "functionType": "Action", + "name": "FocusChoice", + "sentence": "Focus the choice _PARAM1_ of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FocusedChoiceNumber", + "=", + "clamp(round(ChoiceNumber), 1, 5)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Skip the hidden choices." + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "5", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Dialogs::ChoicesDialog::IsChoiceShown" + }, + "parameters": [ + "Object", + "FocusedChoiceNumber", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FocusedChoiceNumber", + "=", + "mod(FocusedChoiceNumber, 5) + 1" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Put the selector around the focused choice." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "FocusedChoiceNumber", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "Selector", + "=", + "Choice1.BoundingBoxLeft() - SelectorMarginLeft", + "=", + "Choice1.BoundingBoxTop() - SelectorMarginTop" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Selector", + "Resizable", + "Choice1.BoundingBoxRight() - Choice1.BoundingBoxLeft() + SelectorMarginLeft + SelectorMarginRight", + "Choice1.BoundingBoxBottom() - Choice1.BoundingBoxTop() + SelectorMarginTop + SelectorMarginBottom" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "FocusedChoiceNumber", + "=", + "2" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "Selector", + "=", + "Choice2.BoundingBoxLeft() - SelectorMarginLeft", + "=", + "Choice2.BoundingBoxTop() - SelectorMarginTop" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Selector", + "Resizable", + "Choice2.BoundingBoxRight() - Choice2.BoundingBoxLeft() + SelectorMarginLeft + SelectorMarginRight", + "Choice2.BoundingBoxBottom() - Choice2.BoundingBoxTop() + SelectorMarginTop + SelectorMarginBottom" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "FocusedChoiceNumber", + "=", + "3" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "Selector", + "=", + "Choice3.BoundingBoxLeft() - SelectorMarginLeft", + "=", + "Choice3.BoundingBoxTop() - SelectorMarginTop" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Selector", + "Resizable", + "Choice3.BoundingBoxRight() - Choice3.BoundingBoxLeft() + SelectorMarginLeft + SelectorMarginRight", + "Choice3.BoundingBoxBottom() - Choice3.BoundingBoxTop() + SelectorMarginTop + SelectorMarginBottom" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "FocusedChoiceNumber", + "=", + "4" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "Selector", + "=", + "Choice4.BoundingBoxLeft() - SelectorMarginLeft", + "=", + "Choice4.BoundingBoxTop() - SelectorMarginTop" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Selector", + "Resizable", + "Choice4.BoundingBoxRight() - Choice4.BoundingBoxLeft() + SelectorMarginLeft + SelectorMarginRight", + "Choice4.BoundingBoxBottom() - Choice4.BoundingBoxTop() + SelectorMarginTop + SelectorMarginBottom" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "FocusedChoiceNumber", + "=", + "5" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "Selector", + "=", + "Choice5.BoundingBoxLeft() - SelectorMarginLeft", + "=", + "Choice5.BoundingBoxTop() - SelectorMarginTop" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Selector", + "Resizable", + "Choice5.BoundingBoxRight() - Choice5.BoundingBoxLeft() + SelectorMarginLeft + SelectorMarginRight", + "Choice5.BoundingBoxBottom() - Choice5.BoundingBoxTop() + SelectorMarginTop + SelectorMarginBottom" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::ChoicesDialog", + "type": "object" + }, + { + "description": "Choice number (from 1 to 5)", + "name": "ChoiceNumber", + "type": "expression" + } + ], + "objectGroups": [], + "description": "Focus a choice, like the keyboard and gamepad do: it is picked when Enter, Space or the A button of a gamepad is pressed." + }, + { + "fullName": "Focused choice", + "functionType": "Expression", + "name": "FocusedChoice", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FocusedChoiceNumber" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::ChoicesDialog", + "type": "object" + } + ], + "objectGroups": [], + "description": "The number of the focused choice (from 1 to 5).", + "expressionType": { + "type": "number" + } + }, + { + "fullName": "Choice is picked", + "functionType": "Condition", + "name": "IsChoicePicked", + "sentence": "Choice _PARAM1_ of _PARAM0_ is picked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "PickedChoiceThisFrame", + "=", + "ChoiceNumber" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "ChoiceNumber", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::ChoicesDialog", + "type": "object" + }, + { + "description": "Choice number (from 1 to 5)", + "name": "ChoiceNumber", + "type": "expression" + } + ], + "objectGroups": [], + "description": "Check if a choice was picked by the player: clicked, touched, or focused and validated with Enter, Space or the A button of a gamepad." + }, + { + "fullName": "Any choice is picked", + "functionType": "Condition", + "name": "IsAnyChoicePicked", + "sentence": "A choice of _PARAM0_ is picked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "PickedChoiceThisFrame", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::ChoicesDialog", + "type": "object" + } + ], + "objectGroups": [], + "description": "Check if any choice was picked by the player. Use the \"Picked choice\" expression to know which one." + }, + { + "fullName": "Picked choice", + "functionType": "Expression", + "name": "PickedChoice", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "PickedChoiceThisFrame" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::ChoicesDialog", + "type": "object" + } + ], + "objectGroups": [], + "description": "The number of the choice picked by the player (from 1 to 5), or 0 if no choice was picked during this frame.", + "expressionType": { + "type": "number" + } + }, + { + "fullName": "Picked choice label", + "functionType": "StringExpression", + "name": "PickedChoiceLabel", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.ChoiceLabel(PickedChoiceThisFrame)" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::ChoicesDialog", + "type": "object" + } + ], + "objectGroups": [], + "description": "The label of the choice picked by the player, or an empty text if no choice was picked during this frame.", + "expressionType": { + "type": "string" + } + }, + { + "fullName": "Dialog is closed", + "functionType": "Condition", + "name": "IsClosed", + "sentence": "_PARAM0_ is closed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsClosedThisFrame", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::ChoicesDialog", + "type": "object" + } + ], + "objectGroups": [], + "description": "Check if the dialog was closed with its close button, or with Escape or the B button of a gamepad (without picking a choice)." + }, + { + "fullName": "Choice label", + "functionType": "Action", + "name": "SetChoiceLabel", + "sentence": "Change the label of the choice _PARAM1_ of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "ChoiceNumber", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "Choice1Label", + "=", + "Label" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "ChoiceNumber", + "=", + "2" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "Choice2Label", + "=", + "Label" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "ChoiceNumber", + "=", + "3" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "Choice3Label", + "=", + "Label" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "ChoiceNumber", + "=", + "4" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "Choice4Label", + "=", + "Label" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "ChoiceNumber", + "=", + "5" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "Choice5Label", + "=", + "Label" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Dialogs::ChoicesDialog::UpdateLayout" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::ChoicesDialog", + "type": "object" + }, + { + "description": "Choice number (from 1 to 5)", + "name": "ChoiceNumber", + "type": "expression" + }, + { + "description": "Label", + "name": "Label", + "type": "string" + } + ], + "objectGroups": [], + "description": "Change the label of a choice. An empty label hides the choice.", + "group": "Choices" + }, + { + "fullName": "Choice label", + "functionType": "StringExpression", + "name": "ChoiceLabel", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "ChoiceNumber", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Choice1Label" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "ChoiceNumber", + "=", + "2" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Choice2Label" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "ChoiceNumber", + "=", + "3" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Choice3Label" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "ChoiceNumber", + "=", + "4" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Choice4Label" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "ChoiceNumber", + "=", + "5" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Choice5Label" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::ChoicesDialog", + "type": "object" + }, + { + "description": "Choice number (from 1 to 5)", + "name": "ChoiceNumber", + "type": "expression" + } + ], + "objectGroups": [], + "description": "The label of a choice.", + "group": "Choices", + "expressionType": { + "type": "string" + } + }, + { + "fullName": "Title", + "functionType": "ExpressionAndCondition", + "name": "Title", + "sentence": "the title", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "TitleText" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::ChoicesDialog", + "type": "object" + } + ], + "objectGroups": [], + "description": "the title of the dialog.", + "expressionType": { + "type": "string" + } + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "name": "SetTitle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TitleText", + "=", + "Value" + ] + }, + { + "type": { + "value": "Dialogs::ChoicesDialog::UpdateLayout" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::ChoicesDialog", + "type": "object" + } + ], + "objectGroups": [], + "getterName": "Title" + }, + { + "fullName": "Message", + "functionType": "ExpressionAndCondition", + "name": "Message", + "sentence": "the message", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "MessageText" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::ChoicesDialog", + "type": "object" + } + ], + "objectGroups": [], + "description": "the message of the dialog.", + "expressionType": { + "type": "string" + } + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "name": "SetMessage", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "MessageText", + "=", + "Value" + ] + }, + { + "type": { + "value": "Dialogs::ChoicesDialog::UpdateLayout" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Dialogs::ChoicesDialog", + "type": "object" + } + ], + "objectGroups": [], + "getterName": "Message" + } + ] + } + ] +} \ No newline at end of file