diff --git a/extensions/reviewed/PanelSpriteButton.json b/extensions/reviewed/PanelSpriteButton.json index 8d5ad5ae8..e2b8be1a4 100644 --- a/extensions/reviewed/PanelSpriteButton.json +++ b/extensions/reviewed/PanelSpriteButton.json @@ -3,13 +3,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", - "gdevelopVersion": ">=5.5.222", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K", "name": "PanelSpriteButton", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Interface Elements/Interface Elements_interface_ui_button_ok_cta_clock_tap.svg", "shortDescription": "A button that can be customized.", - "version": "1.5.0", + "version": "2.0.0", "description": [ "The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", "", @@ -26,6 +26,12 @@ "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Buttons now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing buttons in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], "dependencies": [], "globalVariables": [], "sceneVariables": [], @@ -1169,7 +1175,7 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 64, + "areaMaxX": 256, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, @@ -1178,7 +1184,8 @@ "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", - "isUsingLegacyInstancesRenderer": true, + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", "objects": [ { @@ -1191,10 +1198,21 @@ "underlined": false, "variables": [], "effects": [], - "behaviors": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], "string": "Text", "font": "", - "textAlignment": "", + "textAlignment": "center", "characterSize": 20, "color": { "b": 0, @@ -1217,8 +1235,8 @@ "underlined": false, "text": "Text", "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", + "textAlignment": "center", + "verticalTextAlignment": "center", "characterSize": 20, "color": "0;0;0" } @@ -1245,6 +1263,16 @@ ], "effects": [], "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, { "name": "ButtonFSM", "type": "PanelSpriteButton::ButtonFSM", @@ -1267,6 +1295,16 @@ "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" @@ -1287,7 +1325,18 @@ "width": 32, "variables": [], "effects": [], - "behaviors": [] + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] } ], "objectsFolderStructure": { @@ -1307,7 +1356,22 @@ } ] }, - "objectsGroups": [], + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], "layers": [ { "ambientLightColorB": 200, @@ -1338,7 +1402,40 @@ "effects": [] } ], - "instances": [], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 256, + "x": 0, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], "eventsFunctions": [ { "fullName": "", @@ -1368,7 +1465,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -1380,7 +1477,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -1388,14 +1485,24 @@ }, { "type": { - "value": "Create" + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Hovered", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" }, "parameters": [ - "", "Pressed", - "0", - "0", - "" + "Resizable", + "Idle.Width()", + "Idle.Height()" ] }, { @@ -1423,63 +1530,26 @@ "=", "1" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Place the label over the backgrounds." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Label", - "0", - "0", - "" - ] }, { "type": { "value": "ChangePlan" }, "parameters": [ - "Label", + "Pressed", "=", - "2" + "1" ] }, { "type": { - "value": "TextObject::SetWrapping" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", - "yes" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Text", + "=", + "LabelText" ] } ] @@ -1518,18 +1588,47 @@ "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], "actions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ "Object", + "=", + "PressedLabelOffsetY", "" ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Label", + "Text", + "=", + "LabelText" + ] + } + ] } ], "parameters": [ @@ -1591,12 +1690,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -1643,7 +1743,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -1651,7 +1751,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -1689,10 +1789,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -1709,10 +1810,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -1741,12 +1843,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -1786,10 +1889,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -1818,12 +1922,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -1875,12 +1980,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -1912,143 +2018,6 @@ } ], "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Children instances must be resized when the button size change:\n- backgrounds for each state are resized to take the full dimensions of the button\n- the label is put back at the center of the button\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Idle.BoundingBoxRight(), Label.BoundingBoxRight()) - min(Idle.BoundingBoxLeft(), Label.BoundingBoxLeft())" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Idle.BoundingBoxBottom(), Label.BoundingBoxBottom()) - min(Idle.BoundingBoxTop(), Label.BoundingBoxTop())" - ] - } - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteButton::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Width" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Height" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" - ] - } - ], - "variables": [ - { - "name": "Width", - "type": "number", - "value": 0 - }, - { - "name": "Height", - "type": "number", - "value": 0 - } - ] - } - ] - } - ], - "parameters": [] } ], "parameters": [ @@ -2059,22 +2028,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -2296,6 +2250,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -2304,21 +2259,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", - "LabelText" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -2333,18 +2280,18 @@ }, { "description": "Text", - "name": "LabelText", + "name": "Value", "type": "string" } ], "objectGroups": [] }, { - "description": "the label text.", - "fullName": "Label text", - "functionType": "ExpressionAndCondition", - "name": "LabelText", - "sentence": "the label text", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -2352,18 +2299,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Label", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -2375,12 +2322,11 @@ "objectGroups": [] }, { - "description": "Return the label center Y according to the button configuration. This expression is used in doStepPostEvents when the button is pressed or released.", - "fullName": "", - "functionType": "Expression", - "name": "CenterWithPaddingY", - "private": true, - "sentence": "", + "description": "the label text.", + "fullName": "Label text", + "functionType": "ExpressionAndCondition", + "name": "LabelText", + "sentence": "the label text", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -2388,17 +2334,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Label.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -2410,122 +2356,6 @@ ], "objectGroups": [] }, - { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", - "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" - ] - }, - { - "type": { - "value": "TextObject::WrappingWidth" - }, - "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" - ] - }, - { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": [ - "Object", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "MettreY" - }, - "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] - }, { "description": "De/activate interactions with the button.", "fullName": "De/activate interactions", @@ -2645,62 +2475,131 @@ } ], "objectGroups": [] + }, + { + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "LabelOffset" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Label", + "+", + "Value - LabelOffset" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LabelOffset", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] } ], "propertyDescriptors": [ { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "name": "PressedLabelOffsetY" + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" }, { - "value": "0", + "value": "0.25", "type": "Number", - "label": "Left padding", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "LeftPadding" + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" }, { "value": "0", "type": "Number", - "label": "Right padding", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "RightPadding" + "unit": "Pixel", + "label": "Label offset on Y axis when pressed", + "group": "States", + "name": "PressedLabelOffsetY" }, { "value": "0", "type": "Number", - "label": "Top padding", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "TopPadding" + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" }, { - "value": "0", - "type": "Number", - "label": "Bottom padding", - "group": "Padding", + "value": "", + "type": "Choice", + "label": "", "extraInformation": [ - "Label" + "Label.Text=LabelText" ], - "name": "BottomPadding" - }, - { - "value": "0.25", - "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "name": "HoveredFadeOutDuration" + "hidden": true, + "name": "_PropertyMapping" } ] } ] -} +} \ No newline at end of file diff --git a/extensions/reviewed/TwoChoicesDialogBoxes.json b/extensions/reviewed/TwoChoicesDialogBoxes.json index 888d99a15..309c0ce95 100644 --- a/extensions/reviewed/TwoChoicesDialogBoxes.json +++ b/extensions/reviewed/TwoChoicesDialogBoxes.json @@ -2,14 +2,14 @@ "author": "", "category": "Input", "extensionNamespace": "", - "gdevelopVersion": ">=5.5.222", "fullName": "Two choices dialog boxes", + "gdevelopVersion": ">=5.5.230", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIxMSIgeDI9IjI5IiB5Mj0iMTEiLz4NCjxnPg0KCTxwYXRoIGQ9Ik03LDlDNi43LDksNi41LDguOSw2LjMsOC43QzYuMSw4LjUsNiw4LjMsNiw4YzAtMC4zLDAuMS0wLjUsMC4zLTAuN2MwLDAsMC4xLTAuMSwwLjEtMC4xYzAuMSwwLDAuMS0wLjEsMC4yLTAuMQ0KCQlDNi43LDcsNi43LDcsNi44LDdjMC4xLDAsMC4zLDAsMC40LDBjMC4xLDAsMC4xLDAsMC4yLDAuMWMwLjEsMCwwLjEsMC4xLDAuMiwwLjFjMCwwLDAuMSwwLjEsMC4xLDAuMWMwLjEsMC4xLDAuMiwwLjIsMC4yLDAuMw0KCQlDOCw3LjcsOCw3LjksOCw4YzAsMC4xLDAsMC4zLTAuMSwwLjRDNy45LDguNSw3LjgsOC42LDcuNyw4LjdDNy41LDguOSw3LjMsOSw3LDl6Ii8+DQo8L2c+DQo8Zz4NCgk8cGF0aCBkPSJNMTAsOUM5LjcsOSw5LjUsOC45LDkuMyw4LjdDOS4xLDguNSw5LDguMyw5LDhjMC0wLjEsMC0wLjMsMC4xLTAuNGMwLjEtMC4xLDAuMS0wLjIsMC4yLTAuM2MwLjEtMC4xLDAuMi0wLjIsMC4zLTAuMg0KCQlDMTAsNi45LDEwLjQsNywxMC43LDcuM2MwLjEsMC4xLDAuMiwwLjIsMC4yLDAuM0MxMSw3LjcsMTEsNy45LDExLDhjMCwwLjMtMC4xLDAuNS0wLjMsMC43QzEwLjUsOC45LDEwLjMsOSwxMCw5eiIvPg0KPC9nPg0KPGc+DQoJPHBhdGggZD0iTTEzLDljLTAuMSwwLTAuMywwLTAuNC0wLjFjLTAuMS0wLjEtMC4yLTAuMS0wLjMtMC4yYy0wLjEtMC4xLTAuMi0wLjItMC4yLTAuM0MxMiw4LjMsMTIsOC4xLDEyLDhjMC0wLjEsMC0wLjMsMC4xLTAuNA0KCQljMC4xLTAuMSwwLjEtMC4yLDAuMi0wLjNjMC40LTAuNCwxLTAuNCwxLjQsMGMwLjEsMC4xLDAuMiwwLjIsMC4yLDAuM0MxNCw3LjcsMTQsNy45LDE0LDhjMCwwLjEsMCwwLjMtMC4xLDAuNA0KCQljLTAuMSwwLjEtMC4xLDAuMi0wLjIsMC4zQzEzLjUsOC45LDEzLjMsOSwxMyw5eiIvPg0KPC9nPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI3LDVINUMzLjksNSwzLDUuOSwzLDd2MThjMCwxLjEsMC45LDIsMiwyaDIyYzEuMSwwLDItMC45LDItMlY3QzI5LDUuOSwyOC4xLDUsMjcsNXoiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yMywyM0g5Yy0xLjEsMC0yLTAuOS0yLTJ2LTRjMC0xLjEsMC45LTIsMi0yaDE0YzEuMSwwLDIsMC45LDIsMnY0QzI1LDIyLjEsMjQuMSwyMywyMywyM3oiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE1LDE5IDE2LDIwIDE4LDE4ICIvPg0KPC9zdmc+DQo=", "name": "TwoChoicesDialogBoxes", "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": "A dialog box with buttons to let users make a choice.", - "version": "0.2.0", + "version": "0.3.0", "description": [ "A dialog box showing multiple options (usually \"yes\" and \"no\") and a customizable text message.", "It handles keyboard, gamepad and touch controls." @@ -49,6 +49,295 @@ "isTextContainer": true, "isUsingLegacyInstancesRenderer": false, "name": "TwoChoicesDialogBox", + "objects": [ + { + "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", + "name": "NoButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Semi-transparent black and white", + "variables": [ + { + "name": "ID", + "type": "number", + "value": 0 + } + ], + "effects": [ + { + "effectType": "Outline", + "name": "OutlineEffect", + "doubleParameters": { + "padding": 0, + "thickness": 2 + }, + "stringParameters": { + "color": "255;255;255" + }, + "booleanParameters": {} + } + ], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 8, + "RightPadding": 8, + "PressedLabelOffsetY": 0, + "IdleLabelOffsetY": -8, + "BottomPadding": 8, + "TopPadding": 8, + "MinimalWidth": 300 + } + }, + { + "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", + "name": "YesButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Semi-transparent black and white", + "variables": [ + { + "name": "ID", + "type": "number", + "value": 0 + } + ], + "effects": [ + { + "effectType": "Outline", + "name": "OutlineEffect", + "doubleParameters": { + "padding": 0, + "thickness": 2 + }, + "stringParameters": { + "color": "255;255;255" + }, + "booleanParameters": {} + } + ], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 8, + "RightPadding": 8, + "PressedLabelOffsetY": 0, + "IdleLabelOffsetY": -8, + "BottomPadding": 8, + "TopPadding": 8, + "MinimalWidth": 300 + } + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 48, + "leftMargin": 16, + "name": "TextBorder", + "rightMargin": 16, + "texture": "Border.png", + "tiled": true, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 48, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "Dialogue", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Default message. Continue?", + "opacity": 255, + "scale": 2, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "8BitOperatorPlus8Regular_Edited.fnt", + "textureAtlasResourceName": "8BitOperatorPlus8Regular_Edited.png", + "align": "left", + "wordWrap": true, + "verticalTextAlignment": "top" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Dialogue" + }, + { + "objectName": "TextBorder" + }, + { + "objectName": "YesButton" + }, + { + "objectName": "NoButton" + } + ] + }, + "objectsGroups": [ + { + "name": "Buttons", + "objects": [ + { + "name": "NoButton" + }, + { + "name": "YesButton" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "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, + "depth": 1, + "height": 124, + "layer": "", + "name": "Dialogue", + "persistentUuid": "c7183394-9ca6-4c16-9d13-f0b7cfe803d8", + "width": 554, + "x": 19, + "y": 18, + "zOrder": 45, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 213, + "layer": "", + "name": "TextBorder", + "persistentUuid": "639d5661-817d-4faa-b33b-c0ff129c309a", + "width": 600, + "x": 0, + "y": 0, + "zOrder": 43, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 32, + "height": 36, + "layer": "", + "name": "YesButton", + "persistentUuid": "a0ca78d3-0a23-4bbe-89de-fb2d0a53996c", + "width": 105, + "x": 350, + "y": 160, + "zOrder": 510, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 32, + "height": 36, + "layer": "", + "name": "NoButton", + "persistentUuid": "6781aafa-3ae9-4820-bb97-682a524a0cf6", + "width": 103, + "x": 471, + "y": 160, + "zOrder": 510, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [ + { + "name": "ID", + "persistentUuid": "bb563dbe-93eb-4412-b843-f60016b9a893", + "type": "number", + "value": 1 + } + ] + } + ], "eventsFunctions": [ { "fullName": "", @@ -785,7 +1074,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "ActiveButtonById" + "HighlightedButtonIndex" ] } ] @@ -821,7 +1110,7 @@ "value": "SetNumberVariable" }, "parameters": [ - "ActiveButtonById", + "HighlightedButtonIndex", "=", "mod(Value, SceneInstancesCount(Buttons))" ] @@ -839,7 +1128,7 @@ "Buttons", "ID", "=", - "ActiveButtonById" + "HighlightedButtonIndex" ] } ], @@ -868,7 +1157,7 @@ "Buttons", "ID", "!=", - "ActiveButtonById" + "HighlightedButtonIndex" ] } ], @@ -886,570 +1175,148 @@ } ] } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "TwoChoicesDialogBoxes::TwoChoicesDialogBox", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "the text shown by the dialog.", - "fullName": "Text message", - "functionType": "ExpressionAndCondition", - "group": "Dialog Box configuration", - "name": "TextMessage", - "private": true, - "sentence": "the text", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "TextMessage" - ] - } - ] - } - ], - "expressionType": { - "type": "string" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "TwoChoicesDialogBoxes::TwoChoicesDialogBox", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "TextMessage", - "name": "SetTextMessage", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetStringVariable" - }, - "parameters": [ - "TextMessage", - "=", - "Value" - ] - }, - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "Dialogue", - "Text", - "=", - "TextMessage" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "TwoChoicesDialogBoxes::TwoChoicesDialogBox", - "type": "object" - } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "Default message. Continue?", - "type": "String", - "label": "Message", - "description": "", - "group": "", - "extraInformation": [], - "name": "TextMessage" - }, - { - "value": "0", - "type": "Number", - "unit": "Dimensionless", - "label": "Default highlighted button identifier", - "description": "Default highlighted button identifier.", - "group": "", - "extraInformation": [], - "deprecated": true, - "name": "ActiveButtonById" - }, - { - "value": "true", - "type": "Boolean", - "label": "Cancel with Escape key", - "description": "Enable or disable the escape key to close the dialog.", - "group": "", - "extraInformation": [], - "name": "EnableEscape" - }, - { - "value": "Yes", - "type": "String", - "label": "Label for the \"Yes\" button", - "description": "This is the button with identifier 0.", - "group": "", - "extraInformation": [], - "name": "LabelButtonID0" - }, - { - "value": "No", - "type": "String", - "label": "Label for the \"No\" button", - "description": "This is the button with identifier 1.", - "group": "", - "extraInformation": [], - "name": "LabelButtonID1" - } - ], - "objects": [ - { - "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", - "name": "NoButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [ - { - "name": "ID", - "type": "number", - "value": 0 - } - ], - "effects": [ - { - "effectType": "Outline", - "name": "OutlineEffect", - "doubleParameters": { - "padding": 0, - "thickness": 2 - }, - "stringParameters": { - "color": "255;255;255" - }, - "booleanParameters": {} - } - ], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 0, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false - } - ], - "content": { - "LeftPadding": 8, - "RightPadding": 8, - "PressedLabelOffsetY": 0, - "IdleLabelOffsetY": -8, - "BottomPadding": 8, - "TopPadding": 8, - "MinimalWidth": 300 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 8, - "height": 106, - "leftMargin": 8, - "rightMargin": 8, - "texture": "Border2.png", - "tiled": true, - "topMargin": 8, - "width": 256 - }, - "Idle": { - "bottomMargin": 8, - "height": 106, - "leftMargin": 8, - "rightMargin": 8, - "texture": "Border.png", - "tiled": true, - "topMargin": 8, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "No", - "font": "", - "textAlignment": "center", - "characterSize": 26, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "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": "No", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 26, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 8, - "height": 106, - "leftMargin": 8, - "rightMargin": 8, - "texture": "Border2.png", - "tiled": true, - "topMargin": 8, - "width": 256 - } - } - }, - { - "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", - "name": "YesButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [ - { - "name": "ID", - "type": "number", - "value": 0 - } - ], - "effects": [ - { - "effectType": "Outline", - "name": "OutlineEffect", - "doubleParameters": { - "padding": 0, - "thickness": 2 - }, - "stringParameters": { - "color": "255;255;255" - }, - "booleanParameters": {} - } - ], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 0, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false - } - ], - "content": { - "LeftPadding": 8, - "RightPadding": 8, - "PressedLabelOffsetY": 0, - "IdleLabelOffsetY": -8, - "BottomPadding": 8, - "TopPadding": 8, - "MinimalWidth": 300 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 8, - "height": 106, - "leftMargin": 8, - "rightMargin": 8, - "texture": "Border2.png", - "tiled": true, - "topMargin": 8, - "width": 256 - }, - "Idle": { - "bottomMargin": 8, - "height": 106, - "leftMargin": 8, - "rightMargin": 8, - "texture": "Border.png", - "tiled": true, - "topMargin": 8, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Yes", - "font": "", - "textAlignment": "center", - "characterSize": 26, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "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": "Yes", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 26, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 8, - "height": 106, - "leftMargin": 8, - "rightMargin": 8, - "texture": "Border2.png", - "tiled": true, - "topMargin": 8, - "width": 256 - } - } - }, - { - "assetStoreId": "", - "bottomMargin": 16, - "height": 48, - "leftMargin": 16, - "name": "TextBorder", - "rightMargin": 16, - "texture": "Border.png", - "tiled": true, - "topMargin": 16, - "type": "PanelSpriteObject::PanelSprite", - "width": 48, - "variables": [], - "effects": [], - "behaviors": [ + ], + "parameters": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 1, - "useLegacyBottomAndRightAnchors": false + "description": "Object", + "name": "Object", + "supplementaryInformation": "TwoChoicesDialogBoxes::TwoChoicesDialogBox", + "type": "object" } - ] + ], + "objectGroups": [] }, { - "assetStoreId": "", - "name": "Dialogue", - "type": "BitmapText::BitmapTextObject", - "variables": [], - "effects": [], - "behaviors": [ + "description": "the text shown by the dialog.", + "fullName": "Text message", + "functionType": "ExpressionAndCondition", + "group": "Dialog Box configuration", + "name": "TextMessage", + "private": true, + "sentence": "the text", + "events": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 1, - "useLegacyBottomAndRightAnchors": false + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "TextMessage" + ] + } + ] } ], - "content": { - "text": "Default message. Continue?", - "opacity": 255, - "scale": 2, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "8BitOperatorPlus8Regular_Edited.fnt", - "textureAtlasResourceName": "8BitOperatorPlus8Regular_Edited.png", - "align": "left", - "wordWrap": true - } - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Dialogue" - }, - { - "objectName": "TextBorder" - }, - { - "objectName": "YesButton" + "expressionType": { + "type": "string" }, - { - "objectName": "NoButton" - } - ] - }, - "objectsGroups": [ - { - "name": "Buttons", - "objects": [ - { - "name": "NoButton" - }, + "parameters": [ { - "name": "YesButton" + "description": "Object", + "name": "Object", + "supplementaryInformation": "TwoChoicesDialogBoxes::TwoChoicesDialogBox", + "type": "object" } - ] - } - ], - "layers": [ + ], + "objectGroups": [] + }, { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 3, - "cameraType": "", - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "", - "renderingType": "", - "visibility": true, - "cameras": [ + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TextMessage", + "name": "SetTextMessage", + "private": true, + "sentence": "", + "events": [ { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TextMessage", + "=", + "Value" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Dialogue", + "Text", + "=", + "TextMessage" + ] + } + ] } ], - "effects": [] + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TwoChoicesDialogBoxes::TwoChoicesDialogBox", + "type": "object" + } + ], + "objectGroups": [] } ], - "instances": [ + "propertyDescriptors": [ { - "angle": 0, - "customSize": true, - "depth": 1, - "height": 124, - "layer": "", - "name": "Dialogue", - "persistentUuid": "c7183394-9ca6-4c16-9d13-f0b7cfe803d8", - "width": 554, - "x": 19, - "y": 18, - "zOrder": 45, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "value": "Default message. Continue?", + "type": "MultilineString", + "label": "Message", + "name": "TextMessage" }, { - "angle": 0, - "customSize": true, - "depth": 0, - "height": 213, - "layer": "", - "name": "TextBorder", - "persistentUuid": "639d5661-817d-4faa-b33b-c0ff129c309a", - "width": 600, - "x": 0, - "y": 0, - "zOrder": 43, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "", + "hidden": true, + "name": "HighlightedButtonIndex" }, { - "angle": 0, - "customSize": true, - "depth": 32, - "height": 36, - "layer": "", - "name": "YesButton", - "persistentUuid": "a0ca78d3-0a23-4bbe-89de-fb2d0a53996c", - "width": 105, - "x": 350, - "y": 160, - "zOrder": 510, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "value": "true", + "type": "Boolean", + "label": "Cancel with Escape key", + "description": "Enable or disable the escape key to close the dialog.", + "name": "EnableEscape" }, { - "angle": 0, - "customSize": true, - "depth": 32, - "height": 36, - "layer": "", - "name": "NoButton", - "persistentUuid": "6781aafa-3ae9-4820-bb97-682a524a0cf6", - "width": 103, - "x": 471, - "y": 160, - "zOrder": 510, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [ - { - "name": "ID", - "persistentUuid": "bb563dbe-93eb-4412-b843-f60016b9a893", - "type": "number", - "value": 1 - } - ] + "value": "Yes", + "type": "String", + "label": "Label for the \"Yes\" button", + "description": "This is the button with identifier 0.", + "name": "LabelButtonID0" + }, + { + "value": "No", + "type": "String", + "label": "Label for the \"No\" button", + "description": "This is the button with identifier 1.", + "name": "LabelButtonID1" + }, + { + "value": "", + "type": "Choice", + "label": "", + "extraInformation": [ + "YesButton.LabelText=LabelButtonID0", + "NoButton.LabelText=LabelButtonID1", + "Dialogue.Text=TextMessage" + ], + "hidden": true, + "name": "_PropertyMapping" } ] }