diff --git a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json index 8c9d4512f..1f90ca999 100644 --- a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json +++ b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json @@ -1,7 +1,7 @@ { "firstLayout": "Menu", "gdVersion": { - "build": 235, + "build": 237, "major": 5, "minor": 5, "revision": 0 @@ -435,42 +435,6 @@ "smoothed": true, "userAdded": true }, - { - "file": "assets/Yellow Button_Hovered.png", - "kind": "image", - "metadata": "", - "name": "Yellow Button_Hovered.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/c1e14acb64b9963341656c997853154dc4c86cd1c46fb12bfbe012d99712ef61_Yellow Button_Hovered.png", - "name": "Yellow Button_Hovered.png" - } - }, - { - "file": "assets/Yellow Button_Idle.png", - "kind": "image", - "metadata": "", - "name": "Yellow Button_Idle.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/1cacfd123a1eb708837337c27982f6871f5127c5890dbf0775e0f411958fcbf1_Yellow Button_Idle.png", - "name": "Yellow Button_Idle.png" - } - }, - { - "file": "assets/Yellow Button_Pressed.png", - "kind": "image", - "metadata": "", - "name": "Yellow Button_Pressed.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/928c3ea4db1da835c9f8cc5b7089a47228350209d2ff489e1484c31e5ce41b3d_Yellow Button_Pressed.png", - "name": "Yellow Button_Pressed.png" - } - }, { "file": "assets/Road Straight.glb", "kind": "model3D", @@ -570,6 +534,45 @@ "smoothed": true, "userAdded": true }, + { + "file": "assets/Poppins-Medium.ttf", + "kind": "font", + "metadata": "", + "name": "Poppins-Medium.ttf", + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/b81b0bcafdd4279f3bf8d4d3865f51b9961292dad8b5ccbe88807c8acfb6b11d_Poppins-Medium.ttf", + "name": "Poppins-Medium.ttf" + } + }, + { + "file": "assets/rotate-screen-icon.png", + "kind": "image", + "metadata": "", + "name": "rotate-screen-icon.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/rotate-screen-icon2.png", + "kind": "image", + "metadata": "", + "name": "rotate-screen-icon.png2", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Mobile Layouts/assets/6a8102ce3340bf9f62300ee1a81ef0b2327b2c6e8d62d7dda68d547f5e2b5969_rotate-screen-icon.png", + "name": "rotate-screen-icon.png" + } + }, + { + "file": "assets/FoggySky.png", + "kind": "image", + "metadata": "", + "name": "assets\\FoggySky.png", + "smoothed": true, + "userAdded": false + }, { "file": "assets/Orange Bubble Button_Hovered.png", "kind": "image", @@ -578,7 +581,7 @@ "smoothed": true, "userAdded": true, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/c7108719eeb51696e6b9bcca1280e5403f7867491f3b02101f759d0e55b112fe_Orange Bubble Button_Hovered.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/c7108719eeb51696e6b9bcca1280e5403f7867491f3b02101f759d0e55b112fe_Orange Bubble Button_Hovered.png", "name": "Orange Bubble Button_Hovered.png" } }, @@ -590,7 +593,7 @@ "smoothed": true, "userAdded": true, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/c97e04689076f4c138d10a0dde322d982b332595bce0fe8007ce14bb7a22af21_Orange Bubble Button_Idle.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/c97e04689076f4c138d10a0dde322d982b332595bce0fe8007ce14bb7a22af21_Orange Bubble Button_Idle.png", "name": "Orange Bubble Button_Idle.png" } }, @@ -602,7 +605,7 @@ "smoothed": true, "userAdded": true, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/4c35e1cf340a1121bb63e0d0ef834876be8b9427c5a30bafb2e043640d27aab4_Orange Bubble Button_Pressed.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/4c35e1cf340a1121bb63e0d0ef834876be8b9427c5a30bafb2e043640d27aab4_Orange Bubble Button_Pressed.png", "name": "Orange Bubble Button_Pressed.png" } }, @@ -610,40 +613,48 @@ "file": "assets/Poppins-Medium.ttf", "kind": "font", "metadata": "", - "name": "Poppins-Medium.ttf", + "name": "Poppins-Medium.ttf2", "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/b81b0bcafdd4279f3bf8d4d3865f51b9961292dad8b5ccbe88807c8acfb6b11d_Poppins-Medium.ttf", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/b81b0bcafdd4279f3bf8d4d3865f51b9961292dad8b5ccbe88807c8acfb6b11d_Poppins-Medium.ttf", "name": "Poppins-Medium.ttf" } }, { - "file": "assets/rotate-screen-icon.png", + "file": "assets/Yellow Button_Hovered.png", "kind": "image", "metadata": "", - "name": "rotate-screen-icon.png", + "name": "Yellow Button_Hovered.png", "smoothed": true, - "userAdded": false + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/c1e14acb64b9963341656c997853154dc4c86cd1c46fb12bfbe012d99712ef61_Yellow Button_Hovered.png", + "name": "Yellow Button_Hovered.png" + } }, { - "file": "assets/rotate-screen-icon2.png", + "file": "assets/Yellow Button_Idle.png", "kind": "image", "metadata": "", - "name": "rotate-screen-icon.png2", + "name": "Yellow Button_Idle.png", "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Mobile Layouts/assets/6a8102ce3340bf9f62300ee1a81ef0b2327b2c6e8d62d7dda68d547f5e2b5969_rotate-screen-icon.png", - "name": "rotate-screen-icon.png" + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/1cacfd123a1eb708837337c27982f6871f5127c5890dbf0775e0f411958fcbf1_Yellow Button_Idle.png", + "name": "Yellow Button_Idle.png" } }, { - "file": "assets/FoggySky.png", + "file": "assets/Yellow Button_Pressed.png", "kind": "image", "metadata": "", - "name": "assets\\FoggySky.png", + "name": "Yellow Button_Pressed.png", "smoothed": true, - "userAdded": false + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/928c3ea4db1da835c9f8cc5b7089a47228350209d2ff489e1484c31e5ce41b3d_Yellow Button_Pressed.png", + "name": "Yellow Button_Pressed.png" + } } ], "resourceFolders": [] @@ -863,7 +874,7 @@ "assetStoreId": "72c8adcfb9187ebb5fcfbcd75bc18c74d6af5507e7c482cadcfad28f8011b387", "name": "Start", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Orange Bubble Button", "variables": [], "effects": [], "behaviors": [ @@ -883,7 +894,8 @@ "TopPadding": 0, "LeftPadding": 10, "RightPadding": 10, - "PressedLabelOffsetY": 2 + "PressedLabelOffsetY": 2, + "LabelText": "Start" }, "childrenContent": { "Hovered": { @@ -970,7 +982,7 @@ "assetStoreId": "72c8adcfb9187ebb5fcfbcd75bc18c74d6af5507e7c482cadcfad28f8011b387", "name": "Multiplayer", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Orange Bubble Button", "variables": [], "effects": [], "behaviors": [ @@ -990,7 +1002,8 @@ "TopPadding": 0, "LeftPadding": 10, "RightPadding": 10, - "PressedLabelOffsetY": 2 + "PressedLabelOffsetY": 2, + "LabelText": "Multiplayer" }, "childrenContent": { "Hovered": { @@ -4076,7 +4089,7 @@ "parameters": [ "", "Coin", - "<", + "<=", "20" ] } @@ -34187,13 +34200,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.", "", @@ -34210,6 +34223,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": [], @@ -35353,7 +35372,7 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 64, + "areaMaxX": 256, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, @@ -35362,7 +35381,8 @@ "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", - "isUsingLegacyInstancesRenderer": true, + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", "objects": [ { @@ -35375,10 +35395,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, @@ -35401,8 +35432,8 @@ "underlined": false, "text": "Text", "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", + "textAlignment": "center", + "verticalTextAlignment": "center", "characterSize": 20, "color": "0;0;0" } @@ -35429,6 +35460,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", @@ -35451,6 +35492,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" @@ -35471,7 +35522,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": { @@ -35491,7 +35553,22 @@ } ] }, - "objectsGroups": [], + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], "layers": [ { "ambientLightColorB": 200, @@ -35522,7 +35599,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": "", @@ -35552,7 +35662,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -35564,7 +35674,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -35572,14 +35682,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()" ] }, { @@ -35607,63 +35727,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" ] } ] @@ -35702,18 +35785,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": [ @@ -35775,12 +35887,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -35827,7 +35940,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -35835,7 +35948,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -35873,10 +35986,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -35893,10 +36007,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -35925,12 +36040,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -35970,10 +36086,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -36002,12 +36119,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -36059,12 +36177,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -36096,143 +36215,49 @@ } ], "parameters": [] - }, + } + ], + "parameters": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsIdle" }, - "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": [ + "Idle", + "ButtonFSM", + "" ] } ], - "parameters": [] + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] } ], "parameters": [ @@ -36243,36 +36268,107 @@ "type": "object" } ], - "objectGroups": [ + "objectGroups": [] + }, + { + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", + "events": [ { - "name": "Background", - "objects": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "name": "Idle" - }, + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsClicked" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ { - "name": "Hovered" - }, + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "name": "Pressed" + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsHovered" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] } ] } - ] + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] }, { - "description": "Check if the button is not used.", - "fullName": "Is idle", + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", "functionType": "Condition", - "name": "IsIdle", - "sentence": "_PARAM0_ is idle", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::IsIdle" + "value": "PanelSpriteButton::ButtonFSM::IsFocused" }, "parameters": [ "Idle", @@ -36304,18 +36400,18 @@ "objectGroups": [] }, { - "description": "Check if the button was just clicked.", - "fullName": "Is clicked", + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", "functionType": "Condition", - "name": "IsClicked", - "sentence": "_PARAM0_ is clicked", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::IsClicked" + "value": "PanelSpriteButton::ButtonFSM::IsPressed" }, "parameters": [ "Idle", @@ -36347,33 +36443,26 @@ "objectGroups": [] }, { - "description": "Check if the cursor is hovered over the button.", - "fullName": "Is hovered", - "functionType": "Condition", - "name": "IsHovered", - "sentence": "_PARAM0_ is hovered", + "description": "Change the text of the button label.", + "fullName": "Label text", + "functionType": "Action", + "name": "SetLabelText", + "private": true, + "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsHovered" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "True" + "Label", + "Text", + "=", + "Value" ] } ] @@ -36385,38 +36474,35 @@ "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" + }, + { + "description": "Text", + "name": "Value", + "type": "string" } ], "objectGroups": [] }, { - "description": "Check if the button is either hovered or pressed but not hovered.", - "fullName": "Is focused", - "functionType": "Condition", - "name": "IsFocused", - "sentence": "_PARAM0_ is focused", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsFocused" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "True" + "Label", + "Text", + "=", + "Value" ] } ] @@ -36433,38 +36519,30 @@ "objectGroups": [] }, { - "description": "Check if the button is currently being pressed with mouse or touch.", - "fullName": "Is pressed", - "functionType": "Condition", - "name": "IsPressed", - "sentence": "_PARAM0_ is pressed", + "description": "the label text.", + "fullName": "Label text", + "functionType": "ExpressionAndCondition", + "name": "LabelText", + "sentence": "the label text", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsPressed" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnString" }, "parameters": [ - "True" + "Label.Text::Value()" ] } ] } ], + "expressionType": { + "type": "string" + }, "parameters": [ { "description": "Object", @@ -36476,35 +36554,65 @@ "objectGroups": [] }, { - "description": "Change the text of the button label.", - "fullName": "Label text", + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", "functionType": "Action", - "name": "SetLabelText", - "sentence": "Change the text of _PARAM0_ to _PARAM1_", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldActivate", + "True", + "" + ] + } + ], "actions": [ { "type": { - "value": "TextObject::String" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "=", - "LabelText" + "Idle", + "ButtonFSM", + "yes" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", + "ShouldActivate", + "True", "" ] } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "no" + ] + } ] } ], @@ -36516,38 +36624,45 @@ "type": "object" }, { - "description": "Text", - "name": "LabelText", - "type": "string" + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", - "sentence": "", + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "BehaviorActivated" + }, + "parameters": [ + "Idle", + "ButtonFSM" + ] + } + ], "actions": [ { "type": { - "value": "SetReturnString" + "value": "SetReturnBoolean" }, "parameters": [ - "Label.String()" + "True" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -36559,12 +36674,12 @@ "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", + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", "private": true, - "sentence": "", + "sentence": "the labelOffset", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -36575,7 +36690,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "LabelOffset" ] } ] @@ -36595,12 +36710,12 @@ "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", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", "private": true, - "sentence": "Center the label of _PARAM0_", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -36608,92 +36723,259 @@ "actions": [ { "type": { - "value": "MettreXY" + "value": "SetCenterY" }, "parameters": [ "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" + "+", + "Value - LabelOffset" ] }, { "type": { - "value": "TextObject::WrappingWidth" + "value": "SetNumberVariable" }, "parameters": [ - "Label", + "LabelOffset", "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" + "Value" ] - }, + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" + }, + { + "value": "0.25", + "type": "Number", + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Label offset on Y axis when pressed", + "group": "States", + "name": "PressedLabelOffsetY" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" + }, + { + "value": "", + "type": "Choice", + "label": "", + "extraInformation": [ + "Label.Text=LabelText" + ], + "hidden": true, + "name": "_PropertyMapping" + } + ], + "variants": [ + { + "areaMaxX": 256, + "areaMaxY": 106, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Yellow button 2", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "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": "Button", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "color": "139;87;42" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [ { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" } ], - "events": [ + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } - ] + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": [ - "Object", - "" - ] + "name": "Tween", + "type": "Tween::TweenBehavior" } - ], - "actions": [ + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": false, + "topMargin": 32, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "MettreY" - }, - "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false } ] } ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ { "name": "Background", "objects": [ @@ -36708,184 +36990,602 @@ } ] } + ], + "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": 106, + "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": 81, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 240, + "x": 8, + "y": 48, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } ] }, { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", - "events": [ + "areaMaxX": 256, + "areaMaxY": 128, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "72c8adcfb9187ebb5fcfbcd75bc18c74d6af5507e7c482cadcfad28f8011b387", + "assetStoreOriginalName": "Orange Bubble Button", + "name": "Orange Bubble Button", + "objects": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "Button", + "font": "Poppins-Medium.ttf2", + "textAlignment": "center", + "characterSize": 60, + "color": { + "b": 0, + "g": 42, + "r": 117 + }, + "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": "Button", + "font": "Poppins-Medium.ttf2", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 60, + "color": "117;42;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 35, + "height": 128, + "leftMargin": 56, + "name": "Idle", + "rightMargin": 35, + "texture": "Orange Bubble Button_Idle.png", + "tiled": false, + "topMargin": 35, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [ { - "type": { - "value": "BooleanVariable" - }, - "parameters": [ - "ShouldActivate", - "True", - "" - ] + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" } ], - "actions": [ + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, { - "type": { - "value": "ActivateBehavior" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "yes" - ] + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 35, + "height": 128, + "leftMargin": 56, + "name": "Hovered", + "rightMargin": 35, + "texture": "Orange Bubble Button_Hovered.png", + "tiled": false, + "topMargin": 35, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "assetStoreId": "", + "bottomMargin": 35, + "height": 128, + "leftMargin": 35, + "name": "Pressed", + "rightMargin": 35, + "texture": "Orange Bubble Button_Pressed.png", + "tiled": false, + "topMargin": 35, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "inverted": true, - "value": "BooleanVariable" - }, - "parameters": [ - "ShouldActivate", - "True", - "" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false } - ], - "actions": [ + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ { - "type": { - "value": "ActivateBehavior" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "no" - ] + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" } ] } ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - }, + "layers": [ { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" + "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": [] } ], - "objectGroups": [] + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 110, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "8aabdbe2-ad4d-4746-839b-9f769bc07c5e", + "width": 238, + "x": 9, + "y": 64, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] }, { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", - "events": [ + "areaMaxX": 256, + "areaMaxY": 106, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", + "assetStoreOriginalName": "Yellow button", + "name": "Yellow button", + "objects": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "", + "textAlignment": "center", + "characterSize": 60, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "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": "Button", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 60, + "color": "139;87;42" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [ { - "type": { - "value": "BehaviorActivated" - }, - "parameters": [ - "Idle", - "ButtonFSM" - ] + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" } ], - "actions": [ + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": false, + "topMargin": 32, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false } ] } ], - "parameters": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] } ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "name": "PressedLabelOffsetY" - }, - { - "value": "0", - "type": "Number", - "label": "Left padding", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "LeftPadding" - }, - { - "value": "0", - "type": "Number", - "label": "Right padding", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "RightPadding" - }, - { - "value": "0", - "type": "Number", - "label": "Top padding", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "TopPadding" - }, - { - "value": "0", - "type": "Number", - "label": "Bottom padding", - "group": "Padding", - "extraInformation": [ - "Label" + "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": [] + } ], - "name": "BottomPadding" - }, - { - "value": "0.25", - "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "name": "HoveredFadeOutDuration" + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 106, + "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": 81, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 240, + "x": 8, + "y": 48, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] } - ], - "variants": [] + ] } ] }, @@ -41356,7 +42056,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "SubmitButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Yellow button 2", "variables": [], "effects": [], "behaviors": [ @@ -41377,7 +42077,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Send" }, "childrenContent": { "Hovered": { @@ -41452,7 +42153,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "RestartButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Yellow button 2", "variables": [], "effects": [], "behaviors": [ @@ -41473,7 +42174,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Restart" }, "childrenContent": { "Hovered": { diff --git a/examples/3d-car-coin-hunt/assets/Grey Button_Hovered.png b/examples/3d-car-coin-hunt/assets/Grey Button_Hovered.png deleted file mode 100644 index 8065deaec..000000000 Binary files a/examples/3d-car-coin-hunt/assets/Grey Button_Hovered.png and /dev/null differ diff --git a/examples/3d-car-coin-hunt/assets/Grey Button_Hovered2.png b/examples/3d-car-coin-hunt/assets/Grey Button_Hovered2.png deleted file mode 100644 index 8065deaec..000000000 Binary files a/examples/3d-car-coin-hunt/assets/Grey Button_Hovered2.png and /dev/null differ diff --git a/examples/3d-car-coin-hunt/assets/Grey Button_Idle2.png b/examples/3d-car-coin-hunt/assets/Grey Button_Idle2.png deleted file mode 100644 index efbb5d131..000000000 Binary files a/examples/3d-car-coin-hunt/assets/Grey Button_Idle2.png and /dev/null differ diff --git a/examples/3d-car-coin-hunt/assets/Grey Button_Pressed.png b/examples/3d-car-coin-hunt/assets/Grey Button_Pressed.png deleted file mode 100644 index 6735c8e5e..000000000 Binary files a/examples/3d-car-coin-hunt/assets/Grey Button_Pressed.png and /dev/null differ diff --git a/examples/3d-car-coin-hunt/assets/Grey Button_Pressed2.png b/examples/3d-car-coin-hunt/assets/Grey Button_Pressed2.png deleted file mode 100644 index 6735c8e5e..000000000 Binary files a/examples/3d-car-coin-hunt/assets/Grey Button_Pressed2.png and /dev/null differ diff --git a/examples/3d-lane-runner/3d-lane-runner.json b/examples/3d-lane-runner/3d-lane-runner.json index 488b83059..b0bb94821 100644 --- a/examples/3d-lane-runner/3d-lane-runner.json +++ b/examples/3d-lane-runner/3d-lane-runner.json @@ -1,7 +1,7 @@ { "firstLayout": "Menu", "gdVersion": { - "build": 236, + "build": 237, "major": 5, "minor": 5, "revision": 0 @@ -86,6 +86,7 @@ ], "playableDevices": [ "keyboard", + "mobile", "mobile" ], "extensionProperties": [], @@ -418,42 +419,6 @@ "smoothed": true, "userAdded": true }, - { - "file": "assets/Yellow Button_Hovered.png", - "kind": "image", - "metadata": "", - "name": "Yellow Button_Hovered.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/c1e14acb64b9963341656c997853154dc4c86cd1c46fb12bfbe012d99712ef61_Yellow Button_Hovered.png", - "name": "Yellow Button_Hovered.png" - } - }, - { - "file": "assets/Yellow Button_Idle.png", - "kind": "image", - "metadata": "", - "name": "Yellow Button_Idle.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/1cacfd123a1eb708837337c27982f6871f5127c5890dbf0775e0f411958fcbf1_Yellow Button_Idle.png", - "name": "Yellow Button_Idle.png" - } - }, - { - "file": "assets/Yellow Button_Pressed.png", - "kind": "image", - "metadata": "", - "name": "Yellow Button_Pressed.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/928c3ea4db1da835c9f8cc5b7089a47228350209d2ff489e1484c31e5ce41b3d_Yellow Button_Pressed.png", - "name": "Yellow Button_Pressed.png" - } - }, { "file": "assets/Particle.png", "kind": "image", @@ -490,7 +455,7 @@ "smoothed": true, "userAdded": true, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/5cc04ef76aad172a63070469c328ceb3f74207115ad9c2321ccfe0d5755677a0_Yellow Jelly Button_Hovered.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/5cc04ef76aad172a63070469c328ceb3f74207115ad9c2321ccfe0d5755677a0_Yellow Jelly Button_Hovered.png", "name": "Yellow Jelly Button_Hovered.png" } }, @@ -502,7 +467,7 @@ "smoothed": true, "userAdded": true, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/04f6f22d3160fa528875b199bb7bd4f35cf3f20fb8fde4a5d960f01df9bee3a3_Yellow Jelly Button_Idle.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/04f6f22d3160fa528875b199bb7bd4f35cf3f20fb8fde4a5d960f01df9bee3a3_Yellow Jelly Button_Idle.png", "name": "Yellow Jelly Button_Idle.png" } }, @@ -514,7 +479,7 @@ "smoothed": true, "userAdded": true, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/11abe8b7d577c30b71789404003c50b3fe73d63492fd30669a5153bc67ac0a60_Yellow Jelly Button_Pressed.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/11abe8b7d577c30b71789404003c50b3fe73d63492fd30669a5153bc67ac0a60_Yellow Jelly Button_Pressed.png", "name": "Yellow Jelly Button_Pressed.png" } }, @@ -525,9 +490,45 @@ "name": "Rubik-Regular.ttf", "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/edbc88d46437d6403d3670eb084bcbdf08872c9f54a34ed1536c1013c412bd3b_Rubik-Regular.ttf", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/edbc88d46437d6403d3670eb084bcbdf08872c9f54a34ed1536c1013c412bd3b_Rubik-Regular.ttf", "name": "Rubik-Regular.ttf" } + }, + { + "file": "assets/Yellow Button_Hovered.png", + "kind": "image", + "metadata": "", + "name": "Yellow Button_Hovered.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/c1e14acb64b9963341656c997853154dc4c86cd1c46fb12bfbe012d99712ef61_Yellow Button_Hovered.png", + "name": "Yellow Button_Hovered.png" + } + }, + { + "file": "assets/Yellow Button_Idle.png", + "kind": "image", + "metadata": "", + "name": "Yellow Button_Idle.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/1cacfd123a1eb708837337c27982f6871f5127c5890dbf0775e0f411958fcbf1_Yellow Button_Idle.png", + "name": "Yellow Button_Idle.png" + } + }, + { + "file": "assets/Yellow Button_Pressed.png", + "kind": "image", + "metadata": "", + "name": "Yellow Button_Pressed.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/928c3ea4db1da835c9f8cc5b7089a47228350209d2ff489e1484c31e5ce41b3d_Yellow Button_Pressed.png", + "name": "Yellow Button_Pressed.png" + } } ], "resourceFolders": [] @@ -715,7 +716,7 @@ "assetStoreId": "055eaaaceaa6fa09820aff95e0291764fbd98d84a9c2fb8cb3c4e059010a477b", "name": "Start", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Yellow Jelly Button", "variables": [], "effects": [], "behaviors": [ @@ -735,7 +736,8 @@ "TopPadding": 0, "LeftPadding": 10, "RightPadding": 10, - "PressedLabelOffsetY": 3 + "PressedLabelOffsetY": 3, + "LabelText": "Start" }, "childrenContent": { "Hovered": { @@ -3496,6 +3498,23 @@ "content": { "LeaderboardId": "2392ae63-5ed6-4d1b-9ca5-157d64602a81" } + }, + { + "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", + "name": "YellowButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25 + } } ], "objectsFolderStructure": { @@ -3512,6 +3531,9 @@ }, { "objectName": "Coin" + }, + { + "objectName": "YellowButton" } ] }, @@ -3877,14 +3899,6 @@ { "name": "ScreenWrap", "type": "ScreenWrap::ScreenWrap" - }, - { - "name": "Sticker", - "type": "Sticker::Sticker" - }, - { - "name": "Text", - "type": "TextContainerCapability::TextContainerBehavior" } ] } @@ -16950,13 +16964,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.", "", @@ -16973,6 +16987,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": [], @@ -18116,7 +18136,7 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 64, + "areaMaxX": 256, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, @@ -18125,7 +18145,8 @@ "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", - "isUsingLegacyInstancesRenderer": true, + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", "objects": [ { @@ -18138,10 +18159,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, @@ -18164,8 +18196,8 @@ "underlined": false, "text": "Text", "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", + "textAlignment": "center", + "verticalTextAlignment": "center", "characterSize": 20, "color": "0;0;0" } @@ -18192,6 +18224,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", @@ -18214,6 +18256,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" @@ -18234,7 +18286,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": { @@ -18254,7 +18317,22 @@ } ] }, - "objectsGroups": [], + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], "layers": [ { "ambientLightColorB": 200, @@ -18285,7 +18363,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": "", @@ -18315,7 +18426,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -18327,7 +18438,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -18335,14 +18446,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()" ] }, { @@ -18370,63 +18491,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" ] } ] @@ -18465,20 +18549,49 @@ "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": [ { "description": "Object", @@ -18538,12 +18651,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -18590,7 +18704,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -18598,7 +18712,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -18636,10 +18750,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -18656,10 +18771,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -18688,12 +18804,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -18733,10 +18850,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -18765,12 +18883,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -18822,12 +18941,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -18859,143 +18979,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": [ @@ -19006,22 +18989,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -19243,6 +19211,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -19251,21 +19220,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", - "LabelText" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -19280,17 +19241,17 @@ }, { "description": "Text", - "name": "LabelText", + "name": "Value", "type": "string" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", "sentence": "", "events": [ { @@ -19299,18 +19260,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Label", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -19322,12 +19283,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", @@ -19335,17 +19295,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Label.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -19358,65 +19318,35 @@ "objectGroups": [] }, { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" - ] - }, + "conditions": [ { "type": { - "value": "TextObject::WrappingWidth" + "value": "BooleanVariable" }, "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" + "ShouldActivate", + "True", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "SetCenterY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } + "Idle", + "ButtonFSM", + "yes" ] } ] @@ -19426,10 +19356,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", + "ShouldActivate", + "True", "" ] } @@ -19437,12 +19369,12 @@ "actions": [ { "type": { - "value": "MettreY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" + "Idle", + "ButtonFSM", + "no" ] } ] @@ -19454,130 +19386,123 @@ "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - } - ], - "objectGroups": [ + }, { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" } - ] + ], + "objectGroups": [] }, { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BooleanVariable" + "value": "BehaviorActivated" }, "parameters": [ - "ShouldActivate", - "True", - "" + "Idle", + "ButtonFSM" ] } ], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnBoolean" }, "parameters": [ - "Idle", - "ButtonFSM", - "yes" + "True" ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "BooleanVariable" - }, - "parameters": [ - "ShouldActivate", - "True", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnNumber" }, "parameters": [ - "Idle", - "ButtonFSM", - "no" + "LabelOffset" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - }, - { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "BehaviorActivated" + "value": "SetCenterY" }, "parameters": [ - "Idle", - "ButtonFSM" + "Label", + "+", + "Value - LabelOffset" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "LabelOffset", + "=", + "Value" ] } ] @@ -19596,59 +19521,835 @@ ], "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", + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" + }, + { + "value": "", + "type": "Choice", + "label": "", "extraInformation": [ - "Label" + "Label.Text=LabelText" + ], + "hidden": true, + "name": "_PropertyMapping" + } + ], + "variants": [ + { + "areaMaxX": 256, + "areaMaxY": 106, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Yellow button 2", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", + "textAlignment": "center", + "characterSize": 60, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "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": "Button", + "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 60, + "color": "139;87;42" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": false, + "topMargin": 32, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } ], - "name": "TopPadding" + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": 106, + "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": 81, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 240, + "x": 8, + "y": 48, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] }, { - "value": "0", - "type": "Number", - "label": "Bottom padding", - "group": "Padding", - "extraInformation": [ - "Label" + "areaMaxX": 256, + "areaMaxY": 128, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "055eaaaceaa6fa09820aff95e0291764fbd98d84a9c2fb8cb3c4e059010a477b", + "assetStoreOriginalName": "Yellow Jelly Button", + "name": "Yellow Jelly Button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "Button", + "font": "Rubik-Regular.ttf", + "textAlignment": "center", + "characterSize": 60, + "color": { + "b": 0, + "g": 42, + "r": 117 + }, + "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": "Button", + "font": "Rubik-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 60, + "color": "117;42;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 50, + "height": 128, + "leftMargin": 37, + "name": "Idle", + "rightMargin": 32, + "texture": "Yellow Jelly Button_Idle.png", + "tiled": false, + "topMargin": 50, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 50, + "height": 128, + "leftMargin": 37, + "name": "Hovered", + "rightMargin": 32, + "texture": "Yellow Jelly Button_Hovered.png", + "tiled": false, + "topMargin": 50, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 50, + "height": 128, + "leftMargin": 37, + "name": "Pressed", + "rightMargin": 32, + "texture": "Yellow Jelly Button_Pressed.png", + "tiled": false, + "topMargin": 50, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } ], - "name": "BottomPadding" + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 113, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "33a12e08-30a5-4a5a-8681-5ebb2d713ec9", + "width": 246, + "x": 5, + "y": 57, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] }, { - "value": "0.25", - "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "name": "HoveredFadeOutDuration" + "areaMaxX": 256, + "areaMaxY": 106, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", + "assetStoreOriginalName": "Yellow button", + "name": "Yellow button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "", + "textAlignment": "center", + "characterSize": 60, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "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": "Button", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 60, + "color": "139;87;42" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": false, + "topMargin": 32, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": 106, + "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": 81, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 240, + "x": 8, + "y": 48, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] } - ], - "variants": [] + ] } ] }, @@ -23452,7 +24153,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "SubmitButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Yellow button 2", "variables": [], "effects": [], "behaviors": [ @@ -23473,7 +24174,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Send" }, "childrenContent": { "Hovered": { @@ -23548,7 +24250,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "RestartButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Yellow button 2", "variables": [], "effects": [], "behaviors": [ @@ -23569,7 +24271,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Restart" }, "childrenContent": { "Hovered": { diff --git a/examples/3d-racing-game/3d-racing-game.json b/examples/3d-racing-game/3d-racing-game.json index 134609b99..18f5aa701 100644 --- a/examples/3d-racing-game/3d-racing-game.json +++ b/examples/3d-racing-game/3d-racing-game.json @@ -1,7 +1,7 @@ { "firstLayout": "LevelSelection", "gdVersion": { - "build": 224, + "build": 237, "major": 5, "minor": 5, "revision": 0 @@ -91,6 +91,7 @@ "playableDevices": [ "keyboard", "gamepad", + "mobile", "mobile" ], "extensionProperties": [], @@ -380,6 +381,22 @@ "smoothed": true, "userAdded": true }, + { + "file": "assets/Grass.png", + "kind": "image", + "metadata": "", + "name": "assets\\Grass.png", + "smoothed": true, + "userAdded": true + }, + { + "file": "assets/Tree.png", + "kind": "image", + "metadata": "", + "name": "assets\\Tree.png", + "smoothed": true, + "userAdded": true + }, { "file": "assets/Grey Button_Hovered.png", "kind": "image", @@ -388,7 +405,7 @@ "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/b43e0035dca80ea2fad5c5d65de926dae0185038e5f9cb21d5f20234f30d1c76_Grey Button_Hovered.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/b43e0035dca80ea2fad5c5d65de926dae0185038e5f9cb21d5f20234f30d1c76_Grey Button_Hovered.png", "name": "Grey Button_Hovered.png" } }, @@ -400,7 +417,7 @@ "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/da7fc2efa0882eb5dfa0266315f2483c2f68d86a6751dc309ea9e9d0dd4759ba_Grey Button_Idle.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/da7fc2efa0882eb5dfa0266315f2483c2f68d86a6751dc309ea9e9d0dd4759ba_Grey Button_Idle.png", "name": "Grey Button_Idle.png" } }, @@ -412,33 +429,9 @@ "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/49c35e14af0e1f7aae407455cb944de96328955870e5f1500f63723ad879a42e_Grey Button_Pressed.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/49c35e14af0e1f7aae407455cb944de96328955870e5f1500f63723ad879a42e_Grey Button_Pressed.png", "name": "Grey Button_Pressed.png" } - }, - { - "file": "assets/Grass.png", - "kind": "image", - "metadata": "", - "name": "assets\\Grass.png", - "smoothed": true, - "userAdded": true - }, - { - "file": "assets/Tree.png", - "kind": "image", - "metadata": "", - "name": "assets\\Tree.png", - "smoothed": true, - "userAdded": true - }, - { - "file": "assets/Grey Button_Idle.png", - "kind": "image", - "metadata": "", - "name": "assets\\Grey Button_Idle.png", - "smoothed": true, - "userAdded": true } ], "resourceFolders": [] @@ -768,8 +761,11 @@ ], "content": { "centerLocation": "", + "crossfadeDuration": 0, "depth": 6, "height": 8, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": false, "materialType": "StandardWithoutMetalness", "modelResourceName": "sedanSportsRed.glb", @@ -850,8 +846,11 @@ ], "content": { "centerLocation": "", + "crossfadeDuration": 0, "depth": 6, "height": 8, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": false, "materialType": "StandardWithoutMetalness", "modelResourceName": "sedanSportsOrange.glb", @@ -932,8 +931,11 @@ ], "content": { "centerLocation": "", + "crossfadeDuration": 0, "depth": 6, "height": 8, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": false, "materialType": "StandardWithoutMetalness", "modelResourceName": "sedanSportsWhite.glb", @@ -1014,8 +1016,11 @@ ], "content": { "centerLocation": "", + "crossfadeDuration": 0, "depth": 6, "height": 8, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": false, "materialType": "StandardWithoutMetalness", "modelResourceName": "sedanSportsGreen.glb", @@ -1096,8 +1101,11 @@ ], "content": { "centerLocation": "", + "crossfadeDuration": 0, "depth": 6, "height": 8, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": false, "materialType": "StandardWithoutMetalness", "modelResourceName": "sedanSportsBlue.glb", @@ -1178,8 +1186,11 @@ ], "content": { "centerLocation": "", + "crossfadeDuration": 0, "depth": 6, "height": 8, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": false, "materialType": "StandardWithoutMetalness", "modelResourceName": "sedanSportsYellow.glb", @@ -4626,6 +4637,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "LevelButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button", "variables": [ { "folded": true, @@ -4642,7 +4654,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Level" }, "childrenContent": { "Hovered": { @@ -4717,6 +4730,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "RandomButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button", "variables": [], "effects": [], "behaviors": [], @@ -4726,7 +4740,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "???" }, "childrenContent": { "Hovered": { @@ -5072,6 +5087,30 @@ { "name": "Anchor", "type": "AnchorBehavior::AnchorBehavior" + }, + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" } ] }, @@ -5395,6 +5434,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "SubmitButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button", "variables": [], "effects": [], "behaviors": [], @@ -5404,7 +5444,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "🡲" }, "childrenContent": { "Hovered": { @@ -5479,6 +5520,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "MainMenuButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button", "variables": [], "effects": [], "behaviors": [], @@ -5488,7 +5530,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Menu" }, "childrenContent": { "Hovered": { @@ -5563,6 +5606,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "RestartButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button", "variables": [], "effects": [], "behaviors": [], @@ -5572,7 +5616,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Restart" }, "childrenContent": { "Hovered": { @@ -5754,7 +5799,7 @@ "leftMargin": 16, "name": "NewPanelSprite", "rightMargin": 16, - "texture": "assets\\Grey Button_Idle.png", + "texture": "Grey Button_Idle.png", "tiled": false, "topMargin": 16, "type": "PanelSpriteObject::PanelSprite", @@ -6248,6 +6293,34 @@ { "name": "Anchor", "type": "AnchorBehavior::AnchorBehavior" + }, + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" } ] } @@ -6259,6 +6332,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Time formatting", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNsb2NrLWRpZ2l0YWwiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMiw2QTIsMiAwIDAsMCAwLDhWMTZBMiwyIDAgMCwwIDIsMThIMjJBMiwyIDAgMCwwIDI0LDE2VjhBMiwyIDAgMCwwIDIyLDZNMiw4SDIyVjE2SDJNMyw5VjEwLjVINi4yNUwzLDE1SDQuNzVMOCwxMC41VjlNOS4yNSw5VjEwLjVIMTAuNzVWOU0xMiw5VjEwLjVIMTMuNVYxNUgxNVY5TTE3LDlBMSwxIDAgMCwwIDE2LDEwVjE0QTEsMSAwIDAsMCAxNywxNUgyMEExLDEgMCAwLDAgMjEsMTRWMTBBMSwxIDAgMCwwIDIwLDlNMTcuNSwxMC41SDE5LjVWMTMuNUgxNy41TTkuMjUsMTMuNVYxNUgxMC43NVYxMy41IiAvPjwvc3ZnPg==", "name": "TimeFormatter", @@ -6379,12 +6453,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", + "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.", "", @@ -6401,6 +6476,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": [], @@ -7493,8 +7574,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -7502,8 +7581,6 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", "extraInformation": [ "Idle", "Hovered", @@ -7518,9 +7595,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -7528,9 +7602,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -7538,9 +7609,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -7548,9 +7616,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -7560,7 +7625,7 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 64, + "areaMaxX": 256, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, @@ -7569,149 +7634,372 @@ "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", - "isUsingLegacyInstancesRenderer": true, + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", - "eventsFunctions": [ + "objects": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." - }, + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 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": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Idle", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Hovered", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Pressed", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Hovered" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Pressed" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Hovered", - "=", - "1" - ] - } - ] - }, + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Place the label over the backgrounds." + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": 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": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { "value": "Create" }, "parameters": [ "", - "Label", + "Hovered", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Pressed", "0", "0", "" ] }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Hovered", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Pressed", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] + }, { "type": { "value": "ChangePlan" }, "parameters": [ - "Label", + "Hovered", "=", - "2" + "1" ] }, { "type": { - "value": "TextObject::SetWrapping" + "value": "ChangePlan" }, "parameters": [ - "Label", - "yes" + "Pressed", + "=", + "1" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Object", - "" + "Label", + "Text", + "=", + "LabelText" ] } ] @@ -7750,18 +8038,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": [ @@ -7823,12 +8140,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -7875,7 +8193,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -7883,7 +8201,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -7921,10 +8239,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -7941,10 +8260,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -7973,12 +8293,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -8018,10 +8339,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -8050,12 +8372,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -8107,12 +8430,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -8144,146 +8468,9 @@ } ], "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": [ + } + ], + "parameters": [ { "description": "Object", "name": "Object", @@ -8291,22 +8478,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -8528,6 +8700,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -8536,21 +8709,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", - "LabelText" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -8565,17 +8730,17 @@ }, { "description": "Text", - "name": "LabelText", + "name": "Value", "type": "string" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", "sentence": "", "events": [ { @@ -8584,18 +8749,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Label", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -8607,12 +8772,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", @@ -8620,17 +8784,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Label.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -8642,122 +8806,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", @@ -8877,231 +8925,402 @@ } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "name": "PressedLabelOffsetY" }, { - "value": "0", - "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" + "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" + ] + } + ] + } ], - "name": "LeftPadding" + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] }, { - "value": "0", - "type": "Number", - "label": "Right padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" + "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" + ] + } + ] + } ], - "name": "RightPadding" + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" }, { - "value": "0", + "value": "0.25", "type": "Number", - "label": "Top padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "TopPadding" + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" }, { "value": "0", "type": "Number", - "label": "Bottom padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "BottomPadding" + "unit": "Pixel", + "label": "Label offset on Y axis when pressed", + "group": "States", + "name": "PressedLabelOffsetY" }, { - "value": "0.25", + "value": "0", "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], - "name": "HoveredFadeOutDuration" - } - ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 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": "Text", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "0;0;0" - } + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "value": "", + "type": "Choice", + "label": "", + "extraInformation": [ + "Label.Text=LabelText" + ], + "hidden": true, + "name": "_PropertyMapping" + } + ], + "variants": [ + { + "areaMaxX": 256, + "areaMaxY": 106, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "assetStoreOriginalName": "Grey Button", + "name": "Grey Button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "Button", + "font": "", + "textAlignment": "center", + "characterSize": 60, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "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": "Button", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 60, + "color": "72;72;79" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "assetStoreId": "", + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": false, + "topMargin": 32, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] } ], - "effects": [], - "behaviors": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + ], + "layers": [ { - "name": "Tween", - "type": "Tween::TweenBehavior" + "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": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 80, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "d52675e5-4b81-4535-8e9a-d392ed684d6e", + "width": 240, + "x": 8, + "y": 48, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Idle" - }, - { - "objectName": "Hovered" - }, - { - "objectName": "Pressed" - } - ] - }, - "objectsGroups": [], - "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": [] + ] } ] }, @@ -9110,6 +9329,7 @@ "category": "Input", "extensionNamespace": "", "fullName": "Gamepads (controllers)", + "gdevelopVersion": "", "helpPath": "/all-features/gamepad", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdhbWVwYWQtdmFyaWFudC1vdXRsaW5lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTYsOUg4VjExSDEwVjEzSDhWMTVINlYxM0g0VjExSDZWOU0xOC41LDlBMS41LDEuNSAwIDAsMSAyMCwxMC41QTEuNSwxLjUgMCAwLDEgMTguNSwxMkExLjUsMS41IDAgMCwxIDE3LDEwLjVBMS41LDEuNSAwIDAsMSAxOC41LDlNMTUuNSwxMkExLjUsMS41IDAgMCwxIDE3LDEzLjVBMS41LDEuNSAwIDAsMSAxNS41LDE1QTEuNSwxLjUgMCAwLDEgMTQsMTMuNUExLjUsMS41IDAgMCwxIDE1LjUsMTJNMTcsNUE3LDcgMCAwLDEgMjQsMTJBNyw3IDAgMCwxIDE3LDE5QzE1LjA0LDE5IDEzLjI3LDE4LjIgMTIsMTYuOUMxMC43MywxOC4yIDguOTYsMTkgNywxOUE3LDcgMCAwLDEgMCwxMkE3LDcgMCAwLDEgNyw1SDE3TTcsN0E1LDUgMCAwLDAgMiwxMkE1LDUgMCAwLDAgNywxN0M4LjY0LDE3IDEwLjA5LDE2LjIxIDExLDE1SDEzQzEzLjkxLDE2LjIxIDE1LjM2LDE3IDE3LDE3QTUsNSAwIDAsMCAyMiwxMkE1LDUgMCAwLDAgMTcsN0g3WiIgLz48L3N2Zz4=", "name": "Gamepads", @@ -12355,8 +12575,6 @@ "value": "", "type": "Behavior", "label": "Platformer character behavior", - "description": "", - "group": "", "extraInformation": [ "PlatformBehavior::PlatformerObjectBehavior" ], @@ -12366,43 +12584,33 @@ "value": "1", "type": "Number", "label": "Gamepad identifier (1, 2, 3 or 4)", - "description": "", - "group": "", - "extraInformation": [], "name": "GamepadIdentifier" }, { "value": "true", "type": "Boolean", "label": "Use directional pad", - "description": "", "group": "Controls", - "extraInformation": [], "name": "UseArrows" }, { "value": "true", "type": "Boolean", "label": "Use left stick", - "description": "", "group": "Controls", - "extraInformation": [], "name": "UseLeftStick" }, { "value": "", "type": "Boolean", "label": "Use right stick", - "description": "", "group": "Controls", - "extraInformation": [], "name": "UseRightStick" }, { "value": "A or Cross", "type": "Choice", "label": "Jump button", - "description": "", "group": "Controls", "extraInformation": [ "A or Cross", @@ -12809,8 +13017,6 @@ "value": "", "type": "Behavior", "label": "3D physics character", - "description": "", - "group": "", "extraInformation": [ "Physics3D::PhysicsCharacter3D" ], @@ -12820,16 +13026,12 @@ "value": "1", "type": "Number", "label": "Gamepad identifier (1, 2, 3 or 4)", - "description": "", - "group": "", - "extraInformation": [], "name": "GamepadIdentifier" }, { "value": "Left", "type": "Choice", "label": "Walk joystick", - "description": "", "group": "Controls", "extraInformation": [ "Left", @@ -12841,7 +13043,6 @@ "value": "A or Cross", "type": "Choice", "label": "Jump button", - "description": "", "group": "Controls", "extraInformation": [ "A or Cross", @@ -13237,8 +13438,6 @@ "value": "", "type": "Behavior", "label": "3D physics character", - "description": "", - "group": "", "extraInformation": [ "Physics3D::PhysicsCharacter3D" ], @@ -13248,16 +13447,12 @@ "value": "1", "type": "Number", "label": "Gamepad identifier (1, 2, 3 or 4)", - "description": "", - "group": "", - "extraInformation": [], "name": "GamepadIdentifier" }, { "value": "Left", "type": "Choice", "label": "Walk joystick", - "description": "", "group": "Controls", "extraInformation": [ "Left", @@ -13269,7 +13464,6 @@ "value": "Right", "type": "Choice", "label": "Camera joystick", - "description": "", "group": "Controls", "extraInformation": [ "Left", @@ -13281,7 +13475,6 @@ "value": "A or Cross", "type": "Choice", "label": "Jump button", - "description": "", "group": "Controls", "extraInformation": [ "A or Cross", @@ -14223,8 +14416,6 @@ "value": "", "type": "Behavior", "label": "3D capability", - "description": "", - "group": "", "extraInformation": [ "Scene3D::Base3DBehavior" ], @@ -14234,17 +14425,12 @@ "value": "1", "type": "Number", "label": "Gamepad identifier (1, 2, 3 or 4)", - "description": "", - "group": "", - "extraInformation": [], "name": "GamepadIdentifier" }, { "value": "Right", "type": "Choice", "label": "Camera joystick", - "description": "", - "group": "", "extraInformation": [ "Left", "Right" @@ -14256,27 +14442,21 @@ "type": "Number", "unit": "AngularSpeed", "label": "Maximum rotation speed", - "description": "", "group": "Horizontal rotation", - "extraInformation": [], "name": "HorizontalRotationSpeedMax" }, { "value": "360", "type": "Number", "label": "Rotation acceleration", - "description": "", "group": "Horizontal rotation", - "extraInformation": [], "name": "HorizontalRotationAcceleration" }, { "value": "720", "type": "Number", "label": "Rotation deceleration", - "description": "", "group": "Horizontal rotation", - "extraInformation": [], "name": "HorizontalRotationDeceleration" }, { @@ -14284,27 +14464,21 @@ "type": "Number", "unit": "AngularSpeed", "label": "Maximum rotation speed", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalRotationSpeedMax" }, { "value": "240", "type": "Number", "label": "Rotation acceleration", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalRotationAcceleration" }, { "value": "480", "type": "Number", "label": "Rotation deceleration", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalRotationDeceleration" }, { @@ -14312,9 +14486,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Minimum angle", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalAngleMin" }, { @@ -14322,9 +14494,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Maximum angle", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalAngleMax" }, { @@ -14332,9 +14502,7 @@ "type": "Number", "unit": "Pixel", "label": "Z position offset", - "description": "", "group": "Position", - "extraInformation": [], "name": "OffsetZ" }, { @@ -14342,9 +14510,6 @@ "type": "Number", "unit": "AngularSpeed", "label": "Current rotation speed Z", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentRotationSpeedZ" }, @@ -14353,9 +14518,6 @@ "type": "Number", "unit": "AngularSpeed", "label": "Current rotation speed Y", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentRotationSpeedY" } @@ -14948,8 +15110,6 @@ "value": "", "type": "Behavior", "label": "Top-down movement behavior", - "description": "", - "group": "", "extraInformation": [ "TopDownMovementBehavior::TopDownMovementBehavior" ], @@ -14959,43 +15119,33 @@ "value": "1", "type": "Number", "label": "Gamepad identifier (1, 2, 3 or 4)", - "description": "", - "group": "", - "extraInformation": [], "name": "GamepadIdentifier" }, { "value": "true", "type": "Boolean", "label": "Use directional pad", - "description": "", "group": "Controls", - "extraInformation": [], "name": "UseArrows" }, { "value": "true", "type": "Boolean", "label": "Use left stick", - "description": "", "group": "Controls", - "extraInformation": [], "name": "UseLeftStick" }, { "value": "", "type": "Boolean", "label": "Use right stick", - "description": "", "group": "Controls", - "extraInformation": [], "name": "UseRightStick" }, { "value": "Analog", "type": "Choice", "label": "Stick mode", - "description": "", "group": "Controls", "extraInformation": [ "Analog", @@ -15015,6 +15165,7 @@ "category": "Visual effect", "extensionNamespace": "", "fullName": "3D object shake", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXZlY3Rvci1kaWZmZXJlbmNlLWFiIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTMsMUMxLjg5LDEgMSwxLjg5IDEsM1Y1SDNWM0g1VjFIM003LDFWM0gxMFYxSDdNMTIsMVYzSDE0VjVIMTZWM0MxNiwxLjg5IDE1LjExLDEgMTQsMUgxMk0xLDdWMTBIM1Y3SDFNMTQsN0MxNCw3IDE0LDExLjY3IDE0LDE0QzExLjY3LDE0IDcsMTQgNywxNEM3LDE0IDcsMTggNywyMEM3LDIxLjExIDcuODksMjIgOSwyMkgyMEMyMS4xMSwyMiAyMiwyMS4xMSAyMiwyMFY5QzIyLDcuODkgMjEuMTEsNyAyMCw3QzE4LDcgMTQsNyAxNCw3TTE2LDlIMjBWMjBIOVYxNkgxNEMxNS4xMSwxNiAxNiwxNS4xMSAxNiwxNFY5TTEsMTJWMTRDMSwxNS4xMSAxLjg5LDE2IDMsMTZINVYxNEgzVjEySDFaIiAvPjwvc3ZnPg==", "name": "ShakeObject3D", @@ -17627,9 +17778,6 @@ "type": "Number", "unit": "Pixel", "label": "Translation amplitude on X axis", - "description": "", - "group": "", - "extraInformation": [], "name": "TranslationAmplitudeX" }, { @@ -17637,9 +17785,6 @@ "type": "Number", "unit": "Pixel", "label": "Translation amplitude on Y axis", - "description": "", - "group": "", - "extraInformation": [], "name": "TranslationAmplitudeY" }, { @@ -17647,9 +17792,6 @@ "type": "Number", "unit": "Pixel", "label": "Translation amplitude on Z axis", - "description": "", - "group": "", - "extraInformation": [], "name": "TranslationAmplitudeZ" }, { @@ -17657,9 +17799,6 @@ "type": "Number", "unit": "DegreeAngle", "label": "Rotation amplitude around X axis", - "description": "", - "group": "", - "extraInformation": [], "name": "RotationAmplitudeX" }, { @@ -17667,9 +17806,6 @@ "type": "Number", "unit": "DegreeAngle", "label": "Rotation amplitude around Y axis", - "description": "", - "group": "", - "extraInformation": [], "name": "RotationAmplitudeY" }, { @@ -17677,18 +17813,12 @@ "type": "Number", "unit": "DegreeAngle", "label": "Rotation amplitude around Z axis", - "description": "", - "group": "", - "extraInformation": [], "name": "RotationAmplitudeZ" }, { "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Time" }, @@ -17696,9 +17826,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Duration" }, @@ -17706,9 +17833,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "StartEasingDuration" }, @@ -17716,9 +17840,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "StopEasingDuration" }, @@ -17726,18 +17847,12 @@ "value": "", "type": "Number", "label": "Frequency", - "description": "", - "group": "", - "extraInformation": [], "name": "Frequency" }, { "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DeltaX" }, @@ -17745,9 +17860,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DeltaY" }, @@ -17755,9 +17867,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DeltaZ" }, @@ -17765,9 +17874,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DeltaAngleX" }, @@ -17775,9 +17881,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DeltaAngleY" }, @@ -17785,9 +17888,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DeltaAngleZ" }, @@ -17795,9 +17895,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "NoiseTime" }, @@ -17805,8 +17902,6 @@ "value": "", "type": "Behavior", "label": "3D capability", - "description": "", - "group": "", "extraInformation": [ "Scene3D::Base3DBehavior" ], @@ -17816,9 +17911,6 @@ "value": "", "type": "Boolean", "label": "Start to shake at the object creation", - "description": "", - "group": "", - "extraInformation": [], "name": "IsStartingAtCreation" } ], @@ -17827,9 +17919,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "EasingFactor" } @@ -17843,6 +17932,7 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Curved movement", + "gdevelopVersion": "", "helpPath": "/extensions/curved-movement/details/", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO30NCgkuc3Qye2ZpbGw6bm9uZTtzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6MjtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLWRhc2hhcnJheTo2LDY7fQ0KCS5zdDN7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtZGFzaGFycmF5OjQsNDt9DQoJLnN0NHtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7fQ0KCS5zdDV7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1kYXNoYXJyYXk6My4xMDgxLDMuMTA4MTt9DQoJDQoJCS5zdDZ7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDtzdHJva2UtZGFzaGFycmF5OjQsMzt9DQo8L3N0eWxlPg0KPHJlY3QgeD0iMyIgeT0iMjUiIGNsYXNzPSJzdDAiIHdpZHRoPSI0IiBoZWlnaHQ9IjQiLz4NCjxyZWN0IHg9IjI1IiB5PSIzIiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSI0Ii8+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjUsNUwyNSw1QzE0LDUsNSwxNCw1LDI1djAiLz4NCjwvc3ZnPg0K", "name": "CurvedMovement", @@ -22649,8 +22739,6 @@ "value": "", "type": "Behavior", "label": "Flippable capability", - "description": "", - "group": "", "extraInformation": [ "FlippableCapability::FlippableBehavior" ], @@ -22660,9 +22748,6 @@ "value": "true", "type": "Boolean", "label": "Rotate object", - "description": "", - "group": "", - "extraInformation": [], "name": "Rotation" }, { @@ -22670,36 +22755,24 @@ "type": "Number", "unit": "DegreeAngle", "label": "Rotation offset", - "description": "", - "group": "", - "extraInformation": [], "name": "RotationOffset" }, { "value": "", "type": "Boolean", "label": "Flip on X to go back", - "description": "", - "group": "", - "extraInformation": [], "name": "FlipXToGoBack" }, { "value": "", "type": "Boolean", "label": "Flip on Y to go back", - "description": "", - "group": "", - "extraInformation": [], "name": "FlipYToGoBack" }, { "value": "1", "type": "Number", "label": "Speed scale", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "SpeedScale" }, @@ -22707,9 +22780,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PathOriginX" }, @@ -22717,9 +22787,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PathOriginY" }, @@ -22727,9 +22794,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Target" }, @@ -22737,9 +22801,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Origin" }, @@ -22747,9 +22808,6 @@ "value": "", "type": "String", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PathName" }, @@ -22757,9 +22815,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Duration" }, @@ -22767,9 +22822,6 @@ "value": "", "type": "String", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Easing" }, @@ -22777,9 +22829,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DrawingElementIndex" }, @@ -22787,9 +22836,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "X" }, @@ -22797,9 +22843,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Y" }, @@ -22807,9 +22850,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PathAngle" }, @@ -22817,9 +22857,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PathScale" }, @@ -22827,9 +22864,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RepetitionCount" }, @@ -22837,9 +22871,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldGoBack" }, @@ -22847,9 +22878,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldLoop" }, @@ -22857,9 +22885,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RepetitionDoneCount" }, @@ -22867,9 +22892,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsGoingBack" }, @@ -22877,9 +22899,6 @@ "value": "0", "type": "Number", "label": "Pause duration before going back", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PauseDurationBeforeGoingBack" }, @@ -22887,9 +22906,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DrawingPathOriginX" }, @@ -22897,9 +22913,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DrawingPathOriginY" }, @@ -22907,9 +22920,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DebugLineStrokeWidth" }, @@ -22917,8 +22927,6 @@ "value": "Top-Down", "type": "Choice", "label": "Viewpoint", - "description": "", - "group": "", "extraInformation": [ "Top-Down", "Isometry 2:1 (26.565°)" @@ -25527,9 +25535,7 @@ "value": "true", "type": "Boolean", "label": "Rotate object", - "description": "", "group": "Rotation", - "extraInformation": [], "name": "Rotation" }, { @@ -25537,18 +25543,13 @@ "type": "Number", "unit": "DegreeAngle", "label": "Rotation offset", - "description": "", "group": "Rotation", - "extraInformation": [], "name": "RotationOffset" }, { "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Speed" }, @@ -25556,9 +25557,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PathOriginX" }, @@ -25566,9 +25564,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PathOriginY" }, @@ -25576,9 +25571,6 @@ "value": "", "type": "String", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PathName" }, @@ -25586,9 +25578,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TargetedSpeed" }, @@ -25596,9 +25585,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Acceleration" }, @@ -25606,9 +25592,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DrawingElementIndex" }, @@ -25616,9 +25599,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "X" }, @@ -25626,9 +25606,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Y" }, @@ -25636,9 +25613,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PathAngle" }, @@ -25646,9 +25620,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PathScale" }, @@ -25656,9 +25627,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RepetitionCount" }, @@ -25666,9 +25634,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldLoop" }, @@ -25676,9 +25641,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DrawingPathOriginX" }, @@ -25686,9 +25648,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DrawingPathOriginY" }, @@ -25696,9 +25655,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DebugLineStrokeWidth" }, @@ -25706,9 +25662,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousSpeed" }, @@ -25716,9 +25669,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentLength" }, @@ -25726,9 +25676,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsLookingBack" }, @@ -25736,8 +25683,6 @@ "value": "Top-Down", "type": "Choice", "label": "Viewpoint", - "description": "", - "group": "", "extraInformation": [ "Top-Down", "Isometry 2:1 (26.565°)" @@ -25755,6 +25700,7 @@ "category": "Visual effect", "extensionNamespace": "", "fullName": "3D Billboard", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXBpbmUtdHJlZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMCwyMVYxOEgzTDgsMTNINUwxMCw4SDdMMTIsM0wxNyw4SDE0TDE5LDEzSDE2TDIxLDE4SDE0VjIxSDEwWiIgLz48L3N2Zz4=", "name": "Billboard", @@ -26479,8 +26425,6 @@ "value": "", "type": "Behavior", "label": "3D capability", - "description": "", - "group": "", "extraInformation": [ "Scene3D::Base3DBehavior" ], @@ -26490,9 +26434,6 @@ "value": "true", "type": "Boolean", "label": "Should rotate on X axis", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldRotateX" }, @@ -26500,9 +26441,6 @@ "value": "true", "type": "Boolean", "label": "Should rotate on Y axis", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldRotateY" }, @@ -26510,9 +26448,6 @@ "value": "true", "type": "Boolean", "label": "Should rotate on Z axis", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldRotateZ" }, @@ -26520,8 +26455,6 @@ "value": "No change", "type": "Choice", "label": "Offset position", - "description": "", - "group": "", "extraInformation": [ "No change", "Standing on Z axis" @@ -26539,6 +26472,7 @@ "category": "", "extensionNamespace": "", "fullName": "", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNhci1zcG9ydHMiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIsOC41SDdMNCwxMUgzQzEuODksMTEgMSwxMS44OSAxLDEzVjE2SDMuMTdDMy42LDE3LjIgNC43MywxOCA2LDE4QzcuMjcsMTggOC40LDE3LjIgOC44MiwxNkgxNS4xN0MxNS42LDE3LjIgMTYuNzMsMTggMTgsMThDMTkuMjcsMTggMjAuNCwxNy4yIDIwLjgyLDE2SDIzVjE1QzIzLDEzLjg5IDIxLjk3LDEzLjUzIDIxLDEzTDEyLDguNU01LjI1LDEyTDcuNSwxMEgxMS41TDE1LjUsMTJINS4yNU02LDEzLjVBMS41LDEuNSAwIDAsMSA3LjUsMTVBMS41LDEuNSAwIDAsMSA2LDE2LjVBMS41LDEuNSAwIDAsMSA0LjUsMTVBMS41LDEuNSAwIDAsMSA2LDEzLjVNMTgsMTMuNUExLjUsMS41IDAgMCwxIDE5LjUsMTVBMS41LDEuNSAwIDAsMSAxOCwxNi41QTEuNSwxLjUgMCAwLDEgMTYuNSwxNUExLjUsMS41IDAgMCwxIDE4LDEzLjVaIiAvPjwvc3ZnPg==", "name": "Car", @@ -27713,8 +27647,6 @@ "value": "", "type": "Behavior", "label": "Movement on a curve (speed-based)", - "description": "", - "group": "", "extraInformation": [ "CurvedMovement::SpeedPathMovement" ], @@ -27724,9 +27656,6 @@ "value": "", "type": "Boolean", "label": "Is accelerating", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsAccelerating" }, @@ -27734,9 +27663,6 @@ "value": "", "type": "Boolean", "label": "Is on the road", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsOnRoad" }, @@ -27745,9 +27671,6 @@ "type": "Number", "unit": "PixelAcceleration", "label": "Acceleration", - "description": "", - "group": "", - "extraInformation": [], "name": "Acceleration" }, { @@ -27755,9 +27678,6 @@ "type": "Number", "unit": "PixelSpeed", "label": "Max speed", - "description": "", - "group": "", - "extraInformation": [], "name": "MaxSpeed" }, { @@ -27765,18 +27685,12 @@ "type": "Number", "unit": "PixelSpeed", "label": "Max turn speed", - "description": "", - "group": "", - "extraInformation": [], "name": "MaxTurnSpeed" }, { "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousAngle" }, @@ -27784,9 +27698,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RoadCenterDelta" }, @@ -27794,9 +27705,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TurnSpeed" }, @@ -27804,9 +27712,6 @@ "value": "0.5", "type": "Number", "label": "Centrifugal shift (in pixels per degree)", - "description": "", - "group": "", - "extraInformation": [], "name": "CentrifugalShift" } ], @@ -27820,6 +27725,7 @@ "category": "", "extensionNamespace": "", "fullName": "", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "", "name": "LeftOrRightTouch", @@ -27867,6 +27773,7 @@ "category": "", "extensionNamespace": "", "fullName": "", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "", "name": "Level", @@ -28896,9 +28803,6 @@ "value": "", "type": "String", "label": "Path", - "description": "", - "group": "", - "extraInformation": [], "name": "Path" }, { @@ -28906,9 +28810,6 @@ "type": "Number", "unit": "Pixel", "label": "Path start X position from object center", - "description": "", - "group": "", - "extraInformation": [], "name": "StartX" }, { @@ -28916,9 +28817,6 @@ "type": "Number", "unit": "Pixel", "label": "Path start Y position from object center", - "description": "", - "group": "", - "extraInformation": [], "name": "StartY" }, { @@ -28926,9 +28824,6 @@ "type": "Number", "unit": "Pixel", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RotatedStartX" }, @@ -28937,9 +28832,6 @@ "type": "Number", "unit": "Pixel", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RotatedStartY" } diff --git a/examples/3d-road-crosser/3d-road-crosser.json b/examples/3d-road-crosser/3d-road-crosser.json index ca80c3f54..134c42c7e 100644 --- a/examples/3d-road-crosser/3d-road-crosser.json +++ b/examples/3d-road-crosser/3d-road-crosser.json @@ -85,7 +85,9 @@ "Jurfix" ], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -349,42 +351,6 @@ "smoothed": true, "userAdded": true }, - { - "file": "assets/Yellow Jelly Button_Hovered.png", - "kind": "image", - "metadata": "", - "name": "Yellow Jelly Button_Hovered.png", - "smoothed": true, - "userAdded": true, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/5cc04ef76aad172a63070469c328ceb3f74207115ad9c2321ccfe0d5755677a0_Yellow Jelly Button_Hovered.png", - "name": "Yellow Jelly Button_Hovered.png" - } - }, - { - "file": "assets/Yellow Jelly Button_Idle.png", - "kind": "image", - "metadata": "", - "name": "Yellow Jelly Button_Idle.png", - "smoothed": true, - "userAdded": true, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/04f6f22d3160fa528875b199bb7bd4f35cf3f20fb8fde4a5d960f01df9bee3a3_Yellow Jelly Button_Idle.png", - "name": "Yellow Jelly Button_Idle.png" - } - }, - { - "file": "assets/Yellow Jelly Button_Pressed.png", - "kind": "image", - "metadata": "", - "name": "Yellow Jelly Button_Pressed.png", - "smoothed": true, - "userAdded": true, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/11abe8b7d577c30b71789404003c50b3fe73d63492fd30669a5153bc67ac0a60_Yellow Jelly Button_Pressed.png", - "name": "Yellow Jelly Button_Pressed.png" - } - }, { "file": "assets/thumbnail-game.png", "kind": "image", @@ -436,6 +402,42 @@ "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Slider/pixel art/7f9d3fcd723e6cd77452d818e3cba9775f63acdbf98378e7276cc95bf1213e86_Square Green Slider Thumb.png", "name": "Square Green Slider Thumb.png" } + }, + { + "file": "assets/Yellow Jelly Button_Hovered.png", + "kind": "image", + "metadata": "", + "name": "Yellow Jelly Button_Hovered.png", + "smoothed": true, + "userAdded": true, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/5cc04ef76aad172a63070469c328ceb3f74207115ad9c2321ccfe0d5755677a0_Yellow Jelly Button_Hovered.png", + "name": "Yellow Jelly Button_Hovered.png" + } + }, + { + "file": "assets/Yellow Jelly Button_Idle.png", + "kind": "image", + "metadata": "", + "name": "Yellow Jelly Button_Idle.png", + "smoothed": true, + "userAdded": true, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/04f6f22d3160fa528875b199bb7bd4f35cf3f20fb8fde4a5d960f01df9bee3a3_Yellow Jelly Button_Idle.png", + "name": "Yellow Jelly Button_Idle.png" + } + }, + { + "file": "assets/Yellow Jelly Button_Pressed.png", + "kind": "image", + "metadata": "", + "name": "Yellow Jelly Button_Pressed.png", + "smoothed": true, + "userAdded": true, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/11abe8b7d577c30b71789404003c50b3fe73d63492fd30669a5153bc67ac0a60_Yellow Jelly Button_Pressed.png", + "name": "Yellow Jelly Button_Pressed.png" + } } ], "resourceFolders": [] @@ -467,7 +469,7 @@ "gridColor": 0, "gridAlpha": 1, "snap": false, - "zoomFactor": 1.2530387740590068, + "zoomFactor": 0.6897782140104626, "windowMask": false }, "objectsGroups": [ @@ -2218,7 +2220,7 @@ "assetStoreId": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", "name": "RetryButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Yellow Jelly Button 2", "variables": [], "effects": [], "behaviors": [ @@ -2239,7 +2241,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 16, "TopPadding": 0, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "RETRY" }, "childrenContent": { "Hovered": { @@ -2314,7 +2317,7 @@ "assetStoreId": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", "name": "SubmitScoreButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Yellow Jelly Button 2", "variables": [], "effects": [], "behaviors": [ @@ -2335,7 +2338,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 16, "TopPadding": 0, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "SUMBIT SCORE" }, "childrenContent": { "Hovered": { @@ -2410,7 +2414,7 @@ "assetStoreId": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", "name": "PlayButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Yellow Jelly Button 2", "variables": [ { "folded": true, @@ -2438,7 +2442,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 16, "TopPadding": 0, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "PLAY" }, "childrenContent": { "Hovered": { @@ -2513,7 +2518,7 @@ "assetStoreId": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", "name": "ShopButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Yellow Jelly Button 2", "variables": [ { "folded": true, @@ -2541,7 +2546,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 16, "TopPadding": 0, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "SHOP" }, "childrenContent": { "Hovered": { @@ -2616,7 +2622,7 @@ "assetStoreId": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", "name": "LeaderboardButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Yellow Jelly Button 2", "variables": [ { "folded": true, @@ -2644,7 +2650,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 16, "TopPadding": 0, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "LEADERBOARD" }, "childrenContent": { "Hovered": { @@ -3530,7 +3537,7 @@ "assetStoreId": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", "name": "BuyButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Yellow Jelly Button 2", "variables": [ { "folded": true, @@ -3554,7 +3561,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 16, "TopPadding": 0, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "BUY" }, "childrenContent": { "Hovered": { @@ -3690,7 +3698,7 @@ "assetStoreId": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", "name": "BackButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Yellow Jelly Button 2", "variables": [], "effects": [], "behaviors": [ @@ -3711,7 +3719,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 16, "TopPadding": 0, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "BACK" }, "childrenContent": { "Hovered": { @@ -3786,7 +3795,7 @@ "assetStoreId": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", "name": "SettingsButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Yellow Jelly Button 2", "variables": [ { "folded": true, @@ -3814,7 +3823,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 16, "TopPadding": 0, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "SETTINGS" }, "childrenContent": { "Hovered": { @@ -20326,13 +20336,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.", "", @@ -20349,6 +20359,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": [], @@ -21492,7 +21508,7 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 64, + "areaMaxX": 256, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, @@ -21501,7 +21517,8 @@ "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", - "isUsingLegacyInstancesRenderer": true, + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", "objects": [ { @@ -21514,10 +21531,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, @@ -21540,8 +21568,8 @@ "underlined": false, "text": "Text", "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", + "textAlignment": "center", + "verticalTextAlignment": "center", "characterSize": 20, "color": "0;0;0" } @@ -21568,6 +21596,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", @@ -21590,6 +21628,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" @@ -21610,7 +21658,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": { @@ -21630,7 +21689,22 @@ } ] }, - "objectsGroups": [], + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], "layers": [ { "ambientLightColorB": 200, @@ -21661,7 +21735,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": "", @@ -21691,7 +21798,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -21703,7 +21810,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -21711,14 +21818,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()" ] }, { @@ -21746,63 +21863,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" ] } ] @@ -21841,23 +21921,52 @@ "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" }, "parameters": [ "Object", "" ] } - ] - } - ], - "parameters": [ - { - "description": "Object", + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + }, + "parameters": [ + "Object", + "=", + "PressedLabelOffsetY", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Label", + "Text", + "=", + "LabelText" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" @@ -21914,12 +22023,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -21966,7 +22076,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -21974,7 +22084,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -22012,10 +22122,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -22032,10 +22143,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -22064,12 +22176,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -22109,10 +22222,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -22141,12 +22255,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -22198,12 +22313,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -22235,143 +22351,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": [ @@ -22382,22 +22361,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -22619,6 +22583,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -22627,21 +22592,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", - "LabelText" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -22656,18 +22613,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", @@ -22675,18 +22632,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Label", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -22698,12 +22655,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", @@ -22711,17 +22667,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Label.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -22734,78 +22690,50 @@ "objectGroups": [] }, { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "MettreXY" + "value": "BooleanVariable" }, "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" + "ShouldActivate", + "True", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "TextObject::WrappingWidth" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" + "Idle", + "ButtonFSM", + "yes" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "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" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", + "ShouldActivate", + "True", "" ] } @@ -22813,12 +22741,12 @@ "actions": [ { "type": { - "value": "MettreY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" + "Idle", + "ButtonFSM", + "no" ] } ] @@ -22830,130 +22758,123 @@ "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - } - ], - "objectGroups": [ + }, { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" } - ] + ], + "objectGroups": [] }, { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BooleanVariable" + "value": "BehaviorActivated" }, "parameters": [ - "ShouldActivate", - "True", - "" + "Idle", + "ButtonFSM" ] } ], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnBoolean" }, "parameters": [ - "Idle", - "ButtonFSM", - "yes" + "True" ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "BooleanVariable" - }, - "parameters": [ - "ShouldActivate", - "True", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnNumber" }, "parameters": [ - "Idle", - "ButtonFSM", - "no" + "LabelOffset" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - }, - { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "BehaviorActivated" + "value": "SetCenterY" }, "parameters": [ - "Idle", - "ButtonFSM" + "Label", + "+", + "Value - LabelOffset" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "LabelOffset", + "=", + "Value" ] } ] @@ -22972,59 +22893,584 @@ ], "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" } ], - "variants": [] + "variants": [ + { + "areaMaxX": 256, + "areaMaxY": 128, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Yellow Jelly Button 2", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "Button", + "font": "45bf060c897266594bc78a4b12350be50bbc315510afc75ff4336b62228e68dc_MPLUS1p-Black.ttf", + "textAlignment": "center", + "characterSize": 50, + "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": "Button", + "font": "45bf060c897266594bc78a4b12350be50bbc315510afc75ff4336b62228e68dc_MPLUS1p-Black.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 50, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 50, + "height": 128, + "leftMargin": 37, + "name": "Idle", + "rightMargin": 32, + "texture": "Yellow Jelly Button_Idle.png", + "tiled": false, + "topMargin": 50, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 50, + "height": 128, + "leftMargin": 37, + "name": "Hovered", + "rightMargin": 32, + "texture": "Yellow Jelly Button_Hovered.png", + "tiled": false, + "topMargin": 50, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 50, + "height": 128, + "leftMargin": 37, + "name": "Pressed", + "rightMargin": 32, + "texture": "Yellow Jelly Button_Pressed.png", + "tiled": false, + "topMargin": 50, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 113, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "33a12e08-30a5-4a5a-8681-5ebb2d713ec9", + "width": 246, + "x": 5, + "y": 57, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] + }, + { + "areaMaxX": 256, + "areaMaxY": 128, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "055eaaaceaa6fa09820aff95e0291764fbd98d84a9c2fb8cb3c4e059010a477b", + "assetStoreOriginalName": "Yellow Jelly Button", + "name": "Yellow Jelly Button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "Button", + "font": "Rubik-Regular.ttf", + "textAlignment": "center", + "characterSize": 60, + "color": { + "b": 0, + "g": 42, + "r": 117 + }, + "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": "Button", + "font": "Rubik-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 60, + "color": "117;42;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 50, + "height": 128, + "leftMargin": 37, + "name": "Idle", + "rightMargin": 32, + "texture": "Yellow Jelly Button_Idle.png", + "tiled": false, + "topMargin": 50, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 50, + "height": 128, + "leftMargin": 37, + "name": "Hovered", + "rightMargin": 32, + "texture": "Yellow Jelly Button_Hovered.png", + "tiled": false, + "topMargin": 50, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 50, + "height": 128, + "leftMargin": 37, + "name": "Pressed", + "rightMargin": 32, + "texture": "Yellow Jelly Button_Pressed.png", + "tiled": false, + "topMargin": 50, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 113, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "33a12e08-30a5-4a5a-8681-5ebb2d713ec9", + "width": 246, + "x": 5, + "y": 57, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] + } + ] } ] }, diff --git a/examples/3d-shark-frenzy/3d-shark-frenzy.json b/examples/3d-shark-frenzy/3d-shark-frenzy.json index dc275f28d..f952fa864 100644 --- a/examples/3d-shark-frenzy/3d-shark-frenzy.json +++ b/examples/3d-shark-frenzy/3d-shark-frenzy.json @@ -87,6 +87,7 @@ "categories": [], "playableDevices": [ "keyboard", + "mobile", "mobile" ], "extensionProperties": [], @@ -322,53 +323,6 @@ "smoothed": true, "userAdded": true }, - { - "file": "assets/Blue Button With Shadow_Hovered.png", - "kind": "image", - "metadata": "", - "name": "Blue Button With Shadow_Hovered.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/37288d30c2e013a34e415fb35fffd2f7267ebd031c4380927485d7461708f810_Blue Button With Shadow_Hovered.png", - "name": "Blue Button With Shadow_Hovered.png" - } - }, - { - "file": "assets/Blue Button With Shadow_Idle.png", - "kind": "image", - "metadata": "", - "name": "Blue Button With Shadow_Idle.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/22930cdc6b25260eef3817f1687842974261b68c84ec2a13d7f32b1a2985240f_Blue Button With Shadow_Idle.png", - "name": "Blue Button With Shadow_Idle.png" - } - }, - { - "file": "assets/Blue Button With Shadow_Pressed.png", - "kind": "image", - "metadata": "", - "name": "Blue Button With Shadow_Pressed.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/26efbc7581c47b884f5335aa7581999a75b3062aa24062a1a91955e334826d21_Blue Button With Shadow_Pressed.png", - "name": "Blue Button With Shadow_Pressed.png" - } - }, - { - "file": "assets/CantoraOne-Regular.ttf", - "kind": "font", - "metadata": "", - "name": "CantoraOne-Regular.ttf", - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/05b0c1364a92b436b86ca819e66b63480d1bc2fb399f6c0cf8bffbf8199ccc2a_CantoraOne-Regular.ttf", - "name": "CantoraOne-Regular.ttf" - } - }, { "file": "assets/Jump_Start_01.wav", "kind": "audio", @@ -575,6 +529,53 @@ "name": "rotate-screen-icon.png", "smoothed": true, "userAdded": false + }, + { + "file": "assets/Blue Button With Shadow_Hovered.png", + "kind": "image", + "metadata": "", + "name": "Blue Button With Shadow_Hovered.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/37288d30c2e013a34e415fb35fffd2f7267ebd031c4380927485d7461708f810_Blue Button With Shadow_Hovered.png", + "name": "Blue Button With Shadow_Hovered.png" + } + }, + { + "file": "assets/Blue Button With Shadow_Idle.png", + "kind": "image", + "metadata": "", + "name": "Blue Button With Shadow_Idle.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/22930cdc6b25260eef3817f1687842974261b68c84ec2a13d7f32b1a2985240f_Blue Button With Shadow_Idle.png", + "name": "Blue Button With Shadow_Idle.png" + } + }, + { + "file": "assets/Blue Button With Shadow_Pressed.png", + "kind": "image", + "metadata": "", + "name": "Blue Button With Shadow_Pressed.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/26efbc7581c47b884f5335aa7581999a75b3062aa24062a1a91955e334826d21_Blue Button With Shadow_Pressed.png", + "name": "Blue Button With Shadow_Pressed.png" + } + }, + { + "file": "assets/CantoraOne-Regular.ttf", + "kind": "font", + "metadata": "", + "name": "CantoraOne-Regular.ttf", + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/05b0c1364a92b436b86ca819e66b63480d1bc2fb399f6c0cf8bffbf8199ccc2a_CantoraOne-Regular.ttf", + "name": "CantoraOne-Regular.ttf" + } } ], "resourceFolders": [] @@ -809,7 +810,7 @@ "assetStoreId": "33302f0b615672a2e96316c096e13ad8d7242adba8bd5709538691894f0eae6e", "name": "PlayButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Blue Button With Shadow", "variables": [], "effects": [], "behaviors": [ @@ -830,7 +831,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "PLAY" }, "childrenContent": { "Hovered": { @@ -957,7 +959,7 @@ "assetStoreId": "33302f0b615672a2e96316c096e13ad8d7242adba8bd5709538691894f0eae6e", "name": "LeaderboardButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Blue Button With Shadow", "variables": [], "effects": [], "behaviors": [ @@ -978,7 +980,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "LEADERBOARD" }, "childrenContent": { "Hovered": { @@ -1053,7 +1056,7 @@ "assetStoreId": "33302f0b615672a2e96316c096e13ad8d7242adba8bd5709538691894f0eae6e", "name": "SettingsButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Blue Button With Shadow", "variables": [], "effects": [], "behaviors": [ @@ -1074,7 +1077,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "SETTINGS" }, "childrenContent": { "Hovered": { @@ -1317,7 +1321,7 @@ "assetStoreId": "33302f0b615672a2e96316c096e13ad8d7242adba8bd5709538691894f0eae6e", "name": "BackButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Blue Button With Shadow", "variables": [], "effects": [], "behaviors": [ @@ -1338,7 +1342,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "BACK" }, "childrenContent": { "Hovered": { @@ -3943,7 +3948,7 @@ "assetStoreId": "33302f0b615672a2e96316c096e13ad8d7242adba8bd5709538691894f0eae6e", "name": "MenuButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Blue Button With Shadow", "variables": [], "effects": [], "behaviors": [ @@ -3964,7 +3969,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "SUBMIT SCORE" }, "childrenContent": { "Hovered": { @@ -4039,7 +4045,7 @@ "assetStoreId": "33302f0b615672a2e96316c096e13ad8d7242adba8bd5709538691894f0eae6e", "name": "SumbitScoreButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Blue Button With Shadow", "variables": [], "effects": [], "behaviors": [ @@ -4060,7 +4066,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "SUBMIT SCORE" }, "childrenContent": { "Hovered": { @@ -25163,13 +25170,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.", "", @@ -25186,6 +25193,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": [], @@ -26329,7 +26342,7 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 64, + "areaMaxX": 256, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, @@ -26338,7 +26351,8 @@ "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", - "isUsingLegacyInstancesRenderer": true, + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", "objects": [ { @@ -26351,10 +26365,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, @@ -26377,8 +26402,8 @@ "underlined": false, "text": "Text", "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", + "textAlignment": "center", + "verticalTextAlignment": "center", "characterSize": 20, "color": "0;0;0" } @@ -26405,6 +26430,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", @@ -26427,6 +26462,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" @@ -26447,7 +26492,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": { @@ -26467,7 +26523,22 @@ } ] }, - "objectsGroups": [], + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], "layers": [ { "ambientLightColorB": 200, @@ -26498,7 +26569,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": "", @@ -26528,7 +26632,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -26540,7 +26644,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -26548,14 +26652,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()" ] }, { @@ -26583,63 +26697,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" ] } ] @@ -26678,18 +26755,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": [ @@ -26751,12 +26857,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -26803,7 +26910,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -26811,7 +26918,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -26849,10 +26956,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -26869,10 +26977,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -26901,12 +27010,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -26946,10 +27056,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -26978,12 +27089,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -27035,12 +27147,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -27072,143 +27185,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": [ @@ -27219,22 +27195,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -27456,6 +27417,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -27464,21 +27426,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", - "LabelText" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -27493,17 +27447,17 @@ }, { "description": "Text", - "name": "LabelText", + "name": "Value", "type": "string" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", "sentence": "", "events": [ { @@ -27512,18 +27466,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Label", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -27535,12 +27489,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", @@ -27548,17 +27501,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Label.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -27571,65 +27524,35 @@ "objectGroups": [] }, { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "MettreXY" + "value": "BooleanVariable" }, "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" + "ShouldActivate", + "True", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "TextObject::WrappingWidth" + "value": "ActivateBehavior" }, "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" - ] - } + "Idle", + "ButtonFSM", + "yes" ] } ] @@ -27639,10 +27562,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", + "ShouldActivate", + "True", "" ] } @@ -27650,12 +27575,12 @@ "actions": [ { "type": { - "value": "MettreY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" + "Idle", + "ButtonFSM", + "no" ] } ] @@ -27667,130 +27592,123 @@ "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - } - ], - "objectGroups": [ + }, { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" } - ] + ], + "objectGroups": [] }, { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BooleanVariable" + "value": "BehaviorActivated" }, "parameters": [ - "ShouldActivate", - "True", - "" + "Idle", + "ButtonFSM" ] } ], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnBoolean" }, "parameters": [ - "Idle", - "ButtonFSM", - "yes" + "True" ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "BooleanVariable" - }, - "parameters": [ - "ShouldActivate", - "True", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnNumber" }, "parameters": [ - "Idle", - "ButtonFSM", - "no" + "LabelOffset" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - }, - { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "BehaviorActivated" + "value": "SetCenterY" }, "parameters": [ - "Idle", - "ButtonFSM" + "Label", + "+", + "Value - LabelOffset" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "LabelOffset", + "=", + "Value" ] } ] @@ -27809,59 +27727,317 @@ ], "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" } ], - "variants": [] + "variants": [ + { + "areaMaxX": 192, + "areaMaxY": 69, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "33302f0b615672a2e96316c096e13ad8d7242adba8bd5709538691894f0eae6e", + "assetStoreOriginalName": "Blue Button With Shadow", + "name": "Blue Button With Shadow", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "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": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Blue Button With Shadow_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Blue Button With Shadow_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Blue Button With Shadow_Pressed.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 61, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "ac76ffd4-0cc6-4581-b73c-f840b4eda2c1", + "width": 188, + "x": 2, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] + } + ] } ] }, diff --git a/examples/downhill-bike-physics-demo/downhill-bike-physics-demo.json b/examples/downhill-bike-physics-demo/downhill-bike-physics-demo.json index f02482ce2..997045580 100755 --- a/examples/downhill-bike-physics-demo/downhill-bike-physics-demo.json +++ b/examples/downhill-bike-physics-demo/downhill-bike-physics-demo.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 237, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "adaptWidth", "templateSlug": "", - "useExternalSourceFiles": false, "version": "0.0.1", "name": "Downhill Bike Demo", "description": "", @@ -55,7 +54,9 @@ ], "authorUsernames": [], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -67,7 +68,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "GFX/Head.png", "kind": "image", "metadata": "", @@ -76,7 +76,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "GFX/Torso.png", "kind": "image", "metadata": "", @@ -85,7 +84,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "GFX/Thigh.png", "kind": "image", "metadata": "", @@ -94,7 +92,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "GFX/Leg.png", "kind": "image", "metadata": "", @@ -103,7 +100,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "GFX/Upper Arm.png", "kind": "image", "metadata": "", @@ -112,7 +108,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "GFX/Arm.png", "kind": "image", "metadata": "", @@ -121,7 +116,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "GFX/FrontWheel.png", "kind": "image", "metadata": "", @@ -130,7 +124,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "GFX/BackWheel.png", "kind": "image", "metadata": "", @@ -139,7 +132,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "GFX/Ground.png", "kind": "image", "metadata": "", @@ -148,7 +140,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "GFX/Pedal.png", "kind": "image", "metadata": "", @@ -157,7 +148,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "GFX/Crank.png", "kind": "image", "metadata": "", @@ -166,7 +156,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "GFX/Saddle.png", "kind": "image", "metadata": "", @@ -175,7 +164,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "GFX/FrontSuspensionBottom.png", "kind": "image", "metadata": "", @@ -184,7 +172,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "GFX/RearSuspension.png", "kind": "image", "metadata": "", @@ -193,7 +180,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "GFX/Frame.png", "kind": "image", "metadata": "", @@ -202,7 +188,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "GFX/Win.png", "kind": "image", "metadata": "", @@ -211,7 +196,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "GFX/Start.png", "kind": "image", "metadata": "", @@ -220,7 +204,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "GFX/snow.png", "kind": "image", "metadata": "", @@ -229,7 +212,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "GFX/cliff.png", "kind": "image", "metadata": "", @@ -238,7 +220,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "GFX/tree10.png", "kind": "image", "metadata": "", @@ -247,7 +228,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "GFX/bush.png", "kind": "image", "metadata": "", @@ -256,7 +236,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "GFX/grass.png", "kind": "image", "metadata": "", @@ -265,7 +244,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "GFX/signRight.png", "kind": "image", "metadata": "", @@ -274,7 +252,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "GFX/Shelf.png", "kind": "image", "metadata": "", @@ -283,7 +260,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "GFX/Stone.jpg", "kind": "image", "metadata": "", @@ -292,7 +268,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "GFX/cliff.png", "kind": "image", "metadata": "", @@ -301,7 +276,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/On Screen Controls Button_Hovered.png", "kind": "image", "metadata": "", @@ -314,7 +288,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/On Screen Controls Button_Idle.png", "kind": "image", "metadata": "", @@ -327,7 +300,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/On Screen Controls Button_Pressed.png", "kind": "image", "metadata": "", @@ -1198,12 +1170,13 @@ }, { "angle": 0, - "customSize": false, - "height": 0, + "customSize": true, + "depth": 0, + "height": 64, "layer": "", "name": "Follow", "persistentUuid": "c8c7673a-bd89-4c5d-9e1b-6c0771526d85", - "width": 0, + "width": 64, "x": -384, "y": 556, "zOrder": 421, @@ -3563,6 +3536,7 @@ "text": "Timing: 0", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 30, "color": "0;0;0" } @@ -4824,6 +4798,7 @@ "text": "Force: 0", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 30, "color": "0;0;0" } @@ -4865,6 +4840,7 @@ "text": "CONTROLS:\n\n- Up to pedal forward\n- Down to pedal back\n- Space to brake\n- Left/Right to rotate\n\nEsc to reset scene.", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, "color": "0;0;0" } @@ -4906,6 +4882,7 @@ "text": "Ride the bike to the finish and see if you can beat 30 seconds!\n\nForce must not exceed 1,000 and you must not land on your head or you will crash!", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, "color": "0;0;0" } @@ -5247,24 +5224,25 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" + "b": 0 + } }, { "assetStoreId": "26f7912e497fefccd32817a0c24533c9304633b47c6e556065dc498219877e81", "name": "Forward", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Shaded border black button", "variables": [], "effects": [], "behaviors": [ @@ -5285,7 +5263,8 @@ "PressedLabelOffsetY": 1, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 + "HoveredFadeOutDuration": 0.2, + "LabelText": "Forward" }, "childrenContent": { "Hovered": { @@ -5339,6 +5318,7 @@ "text": "Forward", "font": "", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 20, "color": "255;255;255" } @@ -5359,6 +5339,7 @@ "assetStoreId": "26f7912e497fefccd32817a0c24533c9304633b47c6e556065dc498219877e81", "name": "Backward", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Shaded border black button", "variables": [], "effects": [], "behaviors": [], @@ -5368,7 +5349,8 @@ "PressedLabelOffsetY": 1, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 + "HoveredFadeOutDuration": 0.2, + "LabelText": "Backward" }, "childrenContent": { "Hovered": { @@ -5422,6 +5404,7 @@ "text": "Backward", "font": "", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 20, "color": "255;255;255" } @@ -5442,6 +5425,7 @@ "assetStoreId": "26f7912e497fefccd32817a0c24533c9304633b47c6e556065dc498219877e81", "name": "Brake", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Shaded border black button", "variables": [], "effects": [], "behaviors": [ @@ -5462,7 +5446,8 @@ "PressedLabelOffsetY": 1, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 + "HoveredFadeOutDuration": 0.2, + "LabelText": "Brake" }, "childrenContent": { "Hovered": { @@ -5516,6 +5501,7 @@ "text": "Brake", "font": "", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 20, "color": "255;255;255" } @@ -5536,6 +5522,7 @@ "assetStoreId": "26f7912e497fefccd32817a0c24533c9304633b47c6e556065dc498219877e81", "name": "Retry", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Shaded border black button", "variables": [], "effects": [], "behaviors": [], @@ -5545,7 +5532,8 @@ "PressedLabelOffsetY": 1, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 + "HoveredFadeOutDuration": 0.2, + "LabelText": "Retry" }, "childrenContent": { "Hovered": { @@ -5599,6 +5587,7 @@ "text": "Retry", "font": "", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 20, "color": "255;255;255" } @@ -5619,6 +5608,7 @@ "assetStoreId": "26f7912e497fefccd32817a0c24533c9304633b47c6e556065dc498219877e81", "name": "Left", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Shaded border black button", "variables": [], "effects": [], "behaviors": [], @@ -5628,7 +5618,8 @@ "PressedLabelOffsetY": 1, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 + "HoveredFadeOutDuration": 0.2, + "LabelText": "Left" }, "childrenContent": { "Hovered": { @@ -5682,6 +5673,7 @@ "text": "Left", "font": "", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 20, "color": "255;255;255" } @@ -5702,6 +5694,7 @@ "assetStoreId": "26f7912e497fefccd32817a0c24533c9304633b47c6e556065dc498219877e81", "name": "Right", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Shaded border black button", "variables": [], "effects": [], "behaviors": [ @@ -5722,7 +5715,8 @@ "PressedLabelOffsetY": 1, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 + "HoveredFadeOutDuration": 0.2, + "LabelText": "Right" }, "childrenContent": { "Hovered": { @@ -5776,6 +5770,7 @@ "text": "Right", "font": "", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 20, "color": "255;255;255" } @@ -8314,12 +8309,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", + "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.4.4", + "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.", "", @@ -8336,6 +8332,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": [], @@ -8380,11 +8382,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -8393,11 +8394,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -8431,12 +8431,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -8446,11 +8446,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -8467,12 +8468,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -8495,12 +8496,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -8510,11 +8511,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -8525,20 +8525,20 @@ }, "parameters": [ "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -8570,11 +8570,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -8596,31 +8595,30 @@ }, "parameters": [ "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -8662,11 +8660,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -8681,11 +8678,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -8714,20 +8710,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -8736,11 +8732,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -8752,20 +8747,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -8774,11 +8769,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -8791,20 +8785,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -8813,11 +8807,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -8829,20 +8822,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -8851,11 +8844,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -8883,18 +8875,17 @@ }, "parameters": [ "", - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -8906,11 +8897,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -8919,11 +8909,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -8936,11 +8925,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -8948,11 +8936,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -8961,11 +8948,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -9048,22 +9034,20 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -9098,11 +9082,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -9147,11 +9130,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -9196,11 +9178,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -9245,11 +9226,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -9271,11 +9251,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -9320,11 +9299,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -9369,11 +9347,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -9422,7 +9399,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -9453,8 +9430,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -9462,8 +9437,6 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", "extraInformation": [ "Idle", "Hovered", @@ -9478,9 +9451,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -9488,9 +9458,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -9498,9 +9465,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -9508,9 +9472,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -9520,10 +9481,267 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 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": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": 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": "", @@ -9553,7 +9771,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -9565,7 +9783,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -9573,14 +9791,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()" ] }, { @@ -9608,63 +9836,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" ] } ] @@ -9703,18 +9894,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": [ @@ -9776,12 +9996,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -9816,10 +10037,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -9828,7 +10049,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -9836,7 +10057,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -9847,10 +10068,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -9874,10 +10095,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -9894,10 +10116,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -9926,12 +10149,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -9971,10 +10195,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -10003,12 +10228,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -10060,12 +10286,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -10097,126 +10324,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": [ - { - "type": { - "value": "SetNumberObjectVariable" - }, - "parameters": [ - "Idle", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "SetNumberObjectVariable" - }, - "parameters": [ - "Idle", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteButton::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" - ] - } - ] - } - ], - "parameters": [] } ], "parameters": [ @@ -10227,22 +10334,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -10464,6 +10556,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -10478,16 +10571,7 @@ "Label", "Text", "=", - "GetArgumentAsString(\"LabelText\")" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -10502,17 +10586,17 @@ }, { "description": "Text", - "name": "LabelText", + "name": "Value", "type": "string" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", "sentence": "", "events": [ { @@ -10521,18 +10605,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Label", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -10544,12 +10628,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", @@ -10557,17 +10640,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Label.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -10580,91 +10663,63 @@ "objectGroups": [] }, { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "MettreXY" + "value": "BooleanVariable" }, "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" + "ShouldActivate", + "True", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "TextObject::WrappingWidth" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" + "Idle", + "ButtonFSM", + "yes" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "SetCenterY" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" + "ShouldActivate", + "True", + "" ] } ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "actions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": [ - "Object", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "MettreY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" + "Idle", + "ButtonFSM", + "no" ] } ] @@ -10676,126 +10731,123 @@ "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - } - ], - "objectGroups": [ + }, { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" } - ] + ], + "objectGroups": [] }, { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BehaviorActivated" }, "parameters": [ - "\"ShouldActivate\"" + "Idle", + "ButtonFSM" ] } ], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnBoolean" }, "parameters": [ - "Idle", - "ButtonFSM", - "yes" + "True" ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"ShouldActivate\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnNumber" }, "parameters": [ - "Idle", - "ButtonFSM", - "no" + "LabelOffset" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - }, - { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "BehaviorActivated" + "value": "SetCenterY" }, "parameters": [ - "Idle", - "ButtonFSM" + "Label", + "+", + "Value - LabelOffset" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "LabelOffset", + "=", + "Value" ] } ] @@ -10814,198 +10866,308 @@ ], "propertyDescriptors": [ { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "name": "PressedLabelOffsetY" + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" }, { - "value": "0", + "value": "0.25", "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "LeftPadding" + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" }, { "value": "0", "type": "Number", - "label": "Right padding", - "description": "", - "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", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "TopPadding" + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" }, { - "value": "0", - "type": "Number", - "label": "Bottom padding", - "description": "", - "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)", - "description": "", - "group": "", - "extraInformation": [], - "name": "HoveredFadeOutDuration" + "hidden": true, + "name": "_PropertyMapping" } ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 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": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": "0;0;0" - } - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "variants": [ + { + "areaMaxX": 192, + "areaMaxY": 64, + "areaMaxZ": 1, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Shaded border black button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "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": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "color": "255;255;255" + } + }, { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "assetStoreId": "", + "bottomMargin": 6, + "height": 64, + "leftMargin": 6, + "name": "Idle", + "rightMargin": 6, + "texture": "On Screen Controls Button_Idle.png", + "tiled": false, + "topMargin": 6, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 6, + "height": 64, + "leftMargin": 6, + "name": "Hovered", + "rightMargin": 6, + "texture": "On Screen Controls Button_Hovered.png", + "tiled": false, + "topMargin": 6, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 6, + "height": 64, + "leftMargin": 6, + "name": "Pressed", + "rightMargin": 6, + "texture": "On Screen Controls Button_Pressed.png", + "tiled": false, + "topMargin": 6, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] } ], - "effects": [], - "behaviors": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + ], + "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": false, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, { - "name": "Tween", - "type": "Tween::TweenBehavior" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 192, + "x": 0, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Idle" - }, - { - "objectName": "Hovered" - }, - { - "objectName": "Pressed" - } - ] - } + ] } ] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/geometry-monster/geometry-monster.json b/examples/geometry-monster/geometry-monster.json index af6323884..2028de439 100755 --- a/examples/geometry-monster/geometry-monster.json +++ b/examples/geometry-monster/geometry-monster.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 236, + "build": 237, "major": 5, "minor": 5, "revision": 0 @@ -54,7 +54,9 @@ ], "authorUsernames": [], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -349,7 +351,7 @@ "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/c1e14acb64b9963341656c997853154dc4c86cd1c46fb12bfbe012d99712ef61_Yellow Button_Hovered.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/c1e14acb64b9963341656c997853154dc4c86cd1c46fb12bfbe012d99712ef61_Yellow Button_Hovered.png", "name": "Yellow Button_Hovered.png" } }, @@ -361,7 +363,7 @@ "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/1cacfd123a1eb708837337c27982f6871f5127c5890dbf0775e0f411958fcbf1_Yellow Button_Idle.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/1cacfd123a1eb708837337c27982f6871f5127c5890dbf0775e0f411958fcbf1_Yellow Button_Idle.png", "name": "Yellow Button_Idle.png" } }, @@ -373,7 +375,7 @@ "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/928c3ea4db1da835c9f8cc5b7089a47228350209d2ff489e1484c31e5ce41b3d_Yellow Button_Pressed.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/928c3ea4db1da835c9f8cc5b7089a47228350209d2ff489e1484c31e5ce41b3d_Yellow Button_Pressed.png", "name": "Yellow Button_Pressed.png" } } @@ -520,7 +522,7 @@ "assetStoreId": "", "name": "StartButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Start button", "variables": [], "effects": [], "behaviors": [], @@ -2831,7 +2833,7 @@ "assetStoreId": "", "name": "RestartButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Restart button", "variables": [], "effects": [], "behaviors": [], @@ -2912,7 +2914,7 @@ "assetStoreId": "", "name": "MainMenuButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Main menu button", "variables": [], "effects": [], "behaviors": [], @@ -2989,84 +2991,6 @@ } } }, - { - "assetStoreId": "", - "name": "ScoresButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", - "variables": [], - "effects": [], - "behaviors": [], - "content": [], - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "width": 32 - }, - "Idle": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "width": 32 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 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": "Text", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "0;0;0" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "width": 32 - } - } - }, { "adaptCollisionMaskAutomatically": false, "assetStoreId": "", @@ -3112,7 +3036,7 @@ "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", "name": "SubmitButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Yellow button", "variables": [], "effects": [], "behaviors": [], @@ -3122,7 +3046,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "🡲" }, "childrenContent": { "Hovered": { @@ -3275,9 +3200,6 @@ { "objectName": "MainMenuButton" }, - { - "objectName": "ScoresButton" - }, { "objectName": "GameOver" }, @@ -7111,13 +7033,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.", "", @@ -7134,6 +7056,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": [], @@ -8277,7 +8205,7 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 64, + "areaMaxX": 256, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, @@ -8286,7 +8214,8 @@ "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", - "isUsingLegacyInstancesRenderer": true, + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", "objects": [ { @@ -8299,10 +8228,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, @@ -8325,8 +8265,8 @@ "underlined": false, "text": "Text", "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", + "textAlignment": "center", + "verticalTextAlignment": "center", "characterSize": 20, "color": "0;0;0" } @@ -8353,6 +8293,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", @@ -8375,6 +8325,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" @@ -8395,7 +8355,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": { @@ -8415,7 +8386,22 @@ } ] }, - "objectsGroups": [], + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], "layers": [ { "ambientLightColorB": 200, @@ -8446,7 +8432,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": "", @@ -8476,7 +8495,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -8488,7 +8507,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -8496,14 +8515,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()" ] }, { @@ -8531,63 +8560,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" ] } ] @@ -8626,26 +8618,55 @@ "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", "" ] } ] - } - ], - "parameters": [ + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Label", + "Text", + "=", + "LabelText" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" } ], "objectGroups": [] @@ -8699,12 +8720,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -8751,7 +8773,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -8759,7 +8781,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -8797,10 +8819,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -8817,10 +8840,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -8849,12 +8873,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -8894,10 +8919,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -8926,12 +8952,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -8983,12 +9010,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -9020,143 +9048,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": [ @@ -9167,22 +9058,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -9404,6 +9280,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -9412,21 +9289,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", - "LabelText" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -9441,18 +9310,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", @@ -9460,18 +9329,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Label", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -9483,12 +9352,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", @@ -9496,17 +9364,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Label.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -9519,65 +9387,35 @@ "objectGroups": [] }, { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" - ] - }, + "conditions": [ { "type": { - "value": "TextObject::WrappingWidth" + "value": "BooleanVariable" }, "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" + "ShouldActivate", + "True", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "SetCenterY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } + "Idle", + "ButtonFSM", + "yes" ] } ] @@ -9587,23 +9425,25 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", - "" + "ShouldActivate", + "True", + "" ] } ], "actions": [ { "type": { - "value": "MettreY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" + "Idle", + "ButtonFSM", + "no" ] } ] @@ -9615,130 +9455,123 @@ "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - } - ], - "objectGroups": [ + }, { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" } - ] + ], + "objectGroups": [] }, { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BooleanVariable" + "value": "BehaviorActivated" }, "parameters": [ - "ShouldActivate", - "True", - "" + "Idle", + "ButtonFSM" ] } ], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnBoolean" }, "parameters": [ - "Idle", - "ButtonFSM", - "yes" + "True" ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "BooleanVariable" - }, - "parameters": [ - "ShouldActivate", - "True", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnNumber" }, "parameters": [ - "Idle", - "ButtonFSM", - "no" + "LabelOffset" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - }, - { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "BehaviorActivated" + "value": "SetCenterY" }, "parameters": [ - "Idle", - "ButtonFSM" + "Label", + "+", + "Value - LabelOffset" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "LabelOffset", + "=", + "Value" ] } ] @@ -9757,59 +9590,1031 @@ ], "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" } ], - "variants": [] + "variants": [ + { + "areaMaxX": 180, + "areaMaxY": 180, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Start button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 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": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 180, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "btn-start-normal.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 180, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 180, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "btn-start-hover.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 180, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 180, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "btn-start-pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 180, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": false, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] + }, + { + "areaMaxX": 180, + "areaMaxY": 180, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Main menu button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 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": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 180, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "btn-main-menu-normal.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 180, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 180, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "btn-main-menu-hover.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 180, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 180, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "btn-main-menu-pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 180, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": false, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] + }, + { + "areaMaxX": 180, + "areaMaxY": 180, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Restart button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 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": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 180, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "btn-try-again-normal.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 180, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 180, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "btn-try-again-hover.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 180, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 180, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "btn-try-again-pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 180, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": false, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] + }, + { + "areaMaxX": 256, + "areaMaxY": 106, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", + "assetStoreOriginalName": "Yellow button", + "name": "Yellow button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "", + "textAlignment": "center", + "characterSize": 60, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "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": "Button", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 60, + "color": "139;87;42" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": false, + "topMargin": 32, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": 106, + "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": 81, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 240, + "x": 8, + "y": 48, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] + } + ] } ] }, diff --git a/examples/multiplayer-bounce-puzzle/multiplayer-bounce-puzzle.json b/examples/multiplayer-bounce-puzzle/multiplayer-bounce-puzzle.json index 97eb08b49..774e119fc 100644 --- a/examples/multiplayer-bounce-puzzle/multiplayer-bounce-puzzle.json +++ b/examples/multiplayer-bounce-puzzle/multiplayer-bounce-puzzle.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 237, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Bounce Puzzle", "description": "A multiplayer puzzle game where you have to place obstacles to make the ball bounce and reach the goal.", @@ -53,7 +52,10 @@ "authorIds": [], "authorUsernames": [], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile", + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -65,7 +67,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Large Hole.png", "kind": "image", "metadata": "", @@ -78,7 +79,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Directional Arrow Full Circle.png", "kind": "image", "metadata": "", @@ -91,107 +91,6 @@ } }, { - "alwaysLoaded": false, - "file": "assets/Red Button With Shadow_Hovered.png", - "kind": "image", - "metadata": "", - "name": "Red Button With Shadow_Hovered.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/71ee2c8d8b72808c7f084252cd36c80c44bc07655a3729e5fe7459c634007e8a_Red Button With Shadow_Hovered.png", - "name": "Red Button With Shadow_Hovered.png" - } - }, - { - "alwaysLoaded": false, - "file": "assets/Red Button With Shadow_Idle.png", - "kind": "image", - "metadata": "", - "name": "Red Button With Shadow_Idle.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/6c6bf020fb86d99a9ecc993f8b90064d73d757bc2408050cf353c84bc36f6be2_Red Button With Shadow_Idle.png", - "name": "Red Button With Shadow_Idle.png" - } - }, - { - "alwaysLoaded": false, - "file": "assets/Red Button With Shadow_Pressed.png", - "kind": "image", - "metadata": "", - "name": "Red Button With Shadow_Pressed.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/b9ce526450d48adedb6875043465ae168fff1f6b01dd1ff7f43b7e7c1568cc21_Red Button With Shadow_Pressed.png", - "name": "Red Button With Shadow_Pressed.png" - } - }, - { - "file": "assets/CantoraOne-Regular.ttf", - "kind": "font", - "metadata": "", - "name": "CantoraOne-Regular.ttf", - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/05b0c1364a92b436b86ca819e66b63480d1bc2fb399f6c0cf8bffbf8199ccc2a_CantoraOne-Regular.ttf", - "name": "CantoraOne-Regular.ttf" - } - }, - { - "alwaysLoaded": false, - "file": "assets/Floating Out Button Dark Blue_Hovered.png", - "kind": "image", - "metadata": "", - "name": "Floating Out Button Dark Blue_Hovered.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/2f8919c3cad70134ff1732dbaef5dd9babd0aed0240dd817c1db9e27aa6b205b_Floating Out Button Dark Blue_Hovered.png", - "name": "Floating Out Button Dark Blue_Hovered.png" - } - }, - { - "alwaysLoaded": false, - "file": "assets/Floating Out Button Dark Blue_Idle.png", - "kind": "image", - "metadata": "", - "name": "Floating Out Button Dark Blue_Idle.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/d2cedf36d5812262daf2389108558a2ee0b40ca23da05f6200e1f0eee905ca11_Floating Out Button Dark Blue_Idle.png", - "name": "Floating Out Button Dark Blue_Idle.png" - } - }, - { - "alwaysLoaded": false, - "file": "assets/Floating Out Button Dark Blue_Pressed.png", - "kind": "image", - "metadata": "", - "name": "Floating Out Button Dark Blue_Pressed.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/d246e92fe474d2825e38af207a9926794d490bc052aef447688612f61ec48861_Floating Out Button Dark Blue_Pressed.png", - "name": "Floating Out Button Dark Blue_Pressed.png" - } - }, - { - "file": "assets/CarterOne-Regular.ttf", - "kind": "font", - "metadata": "", - "name": "CarterOne-Regular.ttf", - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/44aceaa249d2ecb8bfe3eb7bedcb17aac44c0f5f13f9f58d85427a5afa7e92f0_CarterOne-Regular.ttf", - "name": "CarterOne-Regular.ttf" - } - }, - { - "alwaysLoaded": false, "file": "assets/Mouse Cursor 2.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -200,7 +99,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Mouse Cursor 1.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -209,7 +107,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/alienGreen_round.png", "kind": "image", "metadata": "", @@ -218,7 +115,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Explosive_Red.png", "kind": "image", "metadata": "", @@ -227,7 +123,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Explosive_Green.png", "kind": "image", "metadata": "", @@ -236,7 +131,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Block_Green.png", "kind": "image", "metadata": "", @@ -245,7 +139,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Block_Red.png", "kind": "image", "metadata": "", @@ -254,7 +147,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Triangle_Green.png", "kind": "image", "metadata": "", @@ -263,7 +155,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Triangle_Red.png", "kind": "image", "metadata": "", @@ -272,7 +163,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/RightTriangle_Red.png", "kind": "image", "metadata": "", @@ -281,7 +171,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/RightTriangle_Green.png", "kind": "image", "metadata": "", @@ -290,7 +179,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Block_Black.png", "kind": "image", "metadata": "", @@ -299,7 +187,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/tiled_Brown Background.png", "kind": "image", "metadata": "", @@ -312,7 +199,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/tiled_Blue Background.png", "kind": "image", "metadata": "", @@ -325,7 +211,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/tiled_Green Background.png", "kind": "image", "metadata": "", @@ -358,7 +243,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Mobile Cursor 3.png", "kind": "image", "metadata": "", @@ -367,7 +251,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Mobile Cursor 4.png", "kind": "image", "metadata": "", @@ -376,7 +259,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Mobile Cursor 1.png", "kind": "image", "metadata": "", @@ -385,7 +267,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Mobile Cursor 2.png", "kind": "image", "metadata": "", @@ -394,7 +275,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Mouse Cursor 3.png", "kind": "image", "metadata": "", @@ -403,13 +283,106 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Mouse Cursor 4.png", "kind": "image", "metadata": "", "name": "assets\\Mouse Cursor 4.png", "smoothed": false, "userAdded": true + }, + { + "file": "assets/Red Button With Shadow_Hovered.png", + "kind": "image", + "metadata": "", + "name": "Red Button With Shadow_Hovered.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/71ee2c8d8b72808c7f084252cd36c80c44bc07655a3729e5fe7459c634007e8a_Red Button With Shadow_Hovered.png", + "name": "Red Button With Shadow_Hovered.png" + } + }, + { + "file": "assets/Red Button With Shadow_Idle.png", + "kind": "image", + "metadata": "", + "name": "Red Button With Shadow_Idle.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/6c6bf020fb86d99a9ecc993f8b90064d73d757bc2408050cf353c84bc36f6be2_Red Button With Shadow_Idle.png", + "name": "Red Button With Shadow_Idle.png" + } + }, + { + "file": "assets/Red Button With Shadow_Pressed.png", + "kind": "image", + "metadata": "", + "name": "Red Button With Shadow_Pressed.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/b9ce526450d48adedb6875043465ae168fff1f6b01dd1ff7f43b7e7c1568cc21_Red Button With Shadow_Pressed.png", + "name": "Red Button With Shadow_Pressed.png" + } + }, + { + "file": "assets/CantoraOne-Regular.ttf", + "kind": "font", + "metadata": "", + "name": "CantoraOne-Regular.ttf", + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/05b0c1364a92b436b86ca819e66b63480d1bc2fb399f6c0cf8bffbf8199ccc2a_CantoraOne-Regular.ttf", + "name": "CantoraOne-Regular.ttf" + } + }, + { + "file": "assets/Floating Out Button Dark Blue_Hovered.png", + "kind": "image", + "metadata": "", + "name": "Floating Out Button Dark Blue_Hovered.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/2f8919c3cad70134ff1732dbaef5dd9babd0aed0240dd817c1db9e27aa6b205b_Floating Out Button Dark Blue_Hovered.png", + "name": "Floating Out Button Dark Blue_Hovered.png" + } + }, + { + "file": "assets/Floating Out Button Dark Blue_Idle.png", + "kind": "image", + "metadata": "", + "name": "Floating Out Button Dark Blue_Idle.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/d2cedf36d5812262daf2389108558a2ee0b40ca23da05f6200e1f0eee905ca11_Floating Out Button Dark Blue_Idle.png", + "name": "Floating Out Button Dark Blue_Idle.png" + } + }, + { + "file": "assets/Floating Out Button Dark Blue_Pressed.png", + "kind": "image", + "metadata": "", + "name": "Floating Out Button Dark Blue_Pressed.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/d246e92fe474d2825e38af207a9926794d490bc052aef447688612f61ec48861_Floating Out Button Dark Blue_Pressed.png", + "name": "Floating Out Button Dark Blue_Pressed.png" + } + }, + { + "file": "assets/CarterOne-Regular.ttf", + "kind": "font", + "metadata": "", + "name": "CarterOne-Regular.ttf", + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/44aceaa249d2ecb8bfe3eb7bedcb17aac44c0f5f13f9f58d85427a5afa7e92f0_CarterOne-Regular.ttf", + "name": "CarterOne-Regular.ttf" + } } ], "resourceFolders": [] @@ -493,6 +466,7 @@ "assetStoreId": "5faf2b0415c271fa6e747283ed36297a95f04d2b6c477a7b011775fa6fb444ee", "name": "LobbyButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Big Red Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -502,7 +476,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Lobby" }, "childrenContent": { "Hovered": { @@ -556,6 +531,7 @@ "text": "Lobby", "font": "CantoraOne-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 60, "color": "255;255;255" } @@ -609,6 +585,7 @@ "text": "Requires 2 players\n\nOpen two previews if you're \ntesting this game by yourself", "font": "CantoraOne-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 30, "color": "255;255;255" } @@ -1241,6 +1218,7 @@ "assetStoreId": "d00645a899e762e085fa6fdf2625701baea9cc10ee903a64ca7d371e5bbb8dca", "name": "Start", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Floating Out Button Dark Blue 2", "variables": [], "effects": [], "behaviors": [ @@ -1261,7 +1239,8 @@ "PressedLabelOffsetY": 2, "BottomPadding": 4, "TopPadding": 0, - "HoveredFadeOutDuration": 0 + "HoveredFadeOutDuration": 0, + "LabelText": "Start" }, "childrenContent": { "Hovered": { @@ -1315,6 +1294,7 @@ "text": "Start", "font": "CarterOne-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 30, "color": "255;255;255" } @@ -2766,6 +2746,7 @@ "text": "Level: 1", "font": "CantoraOne-Regular.ttf", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 50, "color": "255;255;255" } @@ -2840,6 +2821,7 @@ "text": "You are GREEN", "font": "CantoraOne-Regular.ttf", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 30, "color": "255;255;255" } @@ -4334,6 +4316,7 @@ "text": "Game End", "font": "CantoraOne-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 120, "color": "255;255;255" } @@ -4654,6 +4637,7 @@ "category": "Visual effect", "extensionNamespace": "", "fullName": "Shake object", + "gdevelopVersion": "", "helpPath": "https://victrisgames.itch.io/gdevelop-camera-shake-example", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFycm93LWFsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMywxMUgxOEwxNi41LDkuNUwxNy45Miw4LjA4TDIxLjg0LDEyTDE3LjkyLDE1LjkyTDE2LjUsMTQuNUwxOCwxM0gxM1YxOEwxNC41LDE2LjVMMTUuOTIsMTcuOTJMMTIsMjEuODRMOC4wOCwxNy45Mkw5LjUsMTYuNUwxMSwxOFYxM0g2TDcuNSwxNC41TDYuMDgsMTUuOTJMMi4xNiwxMkw2LjA4LDguMDhMNy41LDkuNUw2LDExSDExVjZMOS41LDcuNUw4LjA4LDYuMDhMMTIsMi4xNkwxNS45Miw2LjA4TDE0LjUsNy41TDEzLDZWMTFaIiAvPjwvc3ZnPg==", "name": "ShakeObject", @@ -9058,6 +9042,7 @@ "category": "Visual effect", "extensionNamespace": "", "fullName": "Flash object", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZsYXNoLW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNywySDE3TDEzLjUsOUgxN0wxMCwyMlYxNEg3VjJNOSw0VjEySDEyVjE0LjY2TDE0LDExSDEwLjI0TDEzLjc2LDRIOVoiIC8+PC9zdmc+", "name": "Flash", @@ -10060,17 +10045,12 @@ "unit": "Second", "label": "Half period ", "description": "Time that the object is invisible", - "group": "", - "extraInformation": [], "name": "HalfPeriodTime" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsFlashing" }, @@ -10080,8 +10060,6 @@ "unit": "Second", "label": "Flash duration", "description": "Use \"0\" to keep flashing until stopped", - "group": "", - "extraInformation": [], "hidden": true, "name": "FlashDuration" } @@ -10634,17 +10612,12 @@ "unit": "Second", "label": "Half period", "description": "Time between flashes", - "group": "", - "extraInformation": [], "name": "HalfPeriodTime" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsFlashing" }, @@ -10654,8 +10627,6 @@ "unit": "Second", "label": "Flash duration", "description": "Use \"0\" to keep flashing until stopped", - "group": "", - "extraInformation": [], "hidden": true, "name": "FlashDuration" }, @@ -10663,9 +10634,6 @@ "value": "\"255;255;255\"", "type": "String", "label": "Tint color", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TintColor" } @@ -11274,8 +11242,6 @@ "value": "", "type": "Behavior", "label": "Tween Behavior (required)", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], @@ -11287,17 +11253,12 @@ "unit": "Second", "label": "Half period", "description": "Time between flashes", - "group": "", - "extraInformation": [], "name": "HalfPeriodTime" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsFlashing" }, @@ -11307,8 +11268,6 @@ "unit": "Second", "label": "Flash duration", "description": "Use \"0\" to keep flashing until stopped", - "group": "", - "extraInformation": [], "hidden": true, "name": "FlashDuration" }, @@ -11318,8 +11277,6 @@ "unit": "Dimensionless", "label": "Target opacity (Range: 0 - 255)", "description": "Opacity will fade between the starting value and a target value", - "group": "", - "extraInformation": [], "hidden": true, "name": "TargetOpacity" }, @@ -11329,8 +11286,6 @@ "unit": "Dimensionless", "label": "Starting opacity", "description": "Opacity will fade between the starting value and a target value", - "group": "", - "extraInformation": [], "hidden": true, "name": "StartingOpacity" } @@ -12031,17 +11986,12 @@ "unit": "Second", "label": "Half period", "description": "Time between flashes", - "group": "", - "extraInformation": [], "name": "HalfPeriodTime" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsFlashing" }, @@ -12051,8 +12001,6 @@ "unit": "Second", "label": "Flash duration", "description": "Use \"0\" to keep flashing until stopped", - "group": "", - "extraInformation": [], "hidden": true, "name": "FlashDuration" }, @@ -12060,9 +12008,6 @@ "value": "", "type": "String", "label": "Name of effect", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "EffectName" } @@ -12077,6 +12022,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Button states and effects", + "gdevelopVersion": "", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtdGFwLWJ1dHRvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMyA1QzE1LjIxIDUgMTcgNi43OSAxNyA5QzE3IDEwLjUgMTYuMiAxMS43NyAxNSAxMi40NlYxMS4yNEMxNS42MSAxMC42OSAxNiA5Ljg5IDE2IDlDMTYgNy4zNCAxNC42NiA2IDEzIDZTMTAgNy4zNCAxMCA5QzEwIDkuODkgMTAuMzkgMTAuNjkgMTEgMTEuMjRWMTIuNDZDOS44IDExLjc3IDkgMTAuNSA5IDlDOSA2Ljc5IDEwLjc5IDUgMTMgNU0yMCAyMC41QzE5Ljk3IDIxLjMyIDE5LjMyIDIxLjk3IDE4LjUgMjJIMTNDMTIuNjIgMjIgMTIuMjYgMjEuODUgMTIgMjEuNTdMOCAxNy4zN0w4Ljc0IDE2LjZDOC45MyAxNi4zOSA5LjIgMTYuMjggOS41IDE2LjI4SDkuN0wxMiAxOFY5QzEyIDguNDUgMTIuNDUgOCAxMyA4UzE0IDguNDUgMTQgOVYxMy40N0wxNS4yMSAxMy42TDE5LjE1IDE1Ljc5QzE5LjY4IDE2LjAzIDIwIDE2LjU2IDIwIDE3LjE0VjIwLjVNMjAgMkg0QzIuOSAyIDIgMi45IDIgNFYxMkMyIDEzLjExIDIuOSAxNCA0IDE0SDhWMTJMNCAxMkw0IDRIMjBMMjAgMTJIMThWMTRIMjBWMTMuOTZMMjAuMDQgMTRDMjEuMTMgMTQgMjIgMTMuMDkgMjIgMTJWNEMyMiAyLjkgMjEuMTEgMiAyMCAyWiIgLz48L3N2Zz4=", "name": "ButtonStates", @@ -13226,8 +13172,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -13235,8 +13179,6 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", "extraInformation": [ "Idle", "Hovered", @@ -13251,9 +13193,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -13261,9 +13200,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -13271,9 +13207,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -13281,9 +13214,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -13796,8 +13726,6 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -13807,8 +13735,6 @@ "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], @@ -13818,9 +13744,7 @@ "value": "", "type": "String", "label": "Idle state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "IdleEffect" }, { @@ -13829,16 +13753,13 @@ "label": "Focused state effect", "description": "The state is Focused when the button is hovered or held outside.", "group": "Effects", - "extraInformation": [], "name": "FocusedEffect" }, { "value": "", "type": "String", "label": "Pressed state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "PressedEffect" } ], @@ -14264,8 +14185,6 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -14275,9 +14194,7 @@ "value": "Idle", "type": "String", "label": "Idle state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "IdleAnimationName" }, { @@ -14286,16 +14203,13 @@ "label": "Focused state animation name", "description": "The state is Focused when the button is hovered or held outside.", "group": "Animation", - "extraInformation": [], "name": "FocusedAnimationName" }, { "value": "Pressed", "type": "String", "label": "Pressed state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "PressedAnimationName" } ], @@ -15698,8 +15612,6 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -15709,8 +15621,6 @@ "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], @@ -15720,9 +15630,7 @@ "value": "Effect", "type": "String", "label": "Effect name", - "description": "", "group": "Effect", - "extraInformation": [], "name": "EffectName" }, { @@ -15731,16 +15639,13 @@ "label": "Effect parameter", "description": "The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", "group": "Effect", - "extraInformation": [], "name": "EffectProperty" }, { "value": "0", "type": "Number", "label": "Idle effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], "name": "IdleValue" }, { @@ -15749,23 +15654,19 @@ "label": "Focused effect parameter value", "description": "The state is Focused when the button is hovered or held outside.", "group": "Value", - "extraInformation": [], "name": "FocusedValue" }, { "value": "0", "type": "Number", "label": "Pressed effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], "name": "PressedValue" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -15808,7 +15709,6 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -15852,9 +15752,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -15862,17 +15760,13 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "Idle", "Focused", @@ -15885,9 +15779,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenInitialValue" }, @@ -15895,9 +15786,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTargetedValue" }, @@ -15905,9 +15793,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTime" }, @@ -15915,8 +15800,6 @@ "value": "NoTween", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "NoTween", "FadeIn", @@ -15929,9 +15812,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "EffectValue" } @@ -16908,8 +16788,6 @@ "value": "", "type": "Behavior", "label": "Button states behavior (required)", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -16919,8 +16797,6 @@ "value": "", "type": "Behavior", "label": "Tween behavior (required)", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], @@ -16931,9 +16807,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Idle state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "IdleScale" }, { @@ -16943,7 +16817,6 @@ "label": "Focused state size scale", "description": "The state is Focused when the button is hovered or held outside.", "group": "Size", - "extraInformation": [], "name": "FocusedScale" }, { @@ -16951,9 +16824,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -16961,9 +16832,7 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { @@ -16971,16 +16840,13 @@ "type": "Number", "unit": "Dimensionless", "label": "Pressed state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "PressedScale" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -17023,7 +16889,6 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -17066,8 +16931,6 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "Idle", "Focused", @@ -18045,8 +17908,6 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -18056,8 +17917,6 @@ "value": "", "type": "Behavior", "label": "Tween", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], @@ -18067,9 +17926,7 @@ "value": "255;255;255", "type": "Color", "label": "Idle state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "IdleColorTint" }, { @@ -18078,16 +17935,13 @@ "label": "Focused state color tint", "description": "The state is Focused when the button is hovered or held outside.", "group": "Color", - "extraInformation": [], "name": "FocusedColorTint" }, { "value": "64;64;64", "type": "Color", "label": "Pressed state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "PressedColorTint" }, { @@ -18095,9 +17949,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -18105,16 +17957,13 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -18157,7 +18006,6 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -18200,8 +18048,6 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "Idle", "Focused", @@ -18221,12 +18067,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", + "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.4.4", + "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.", "", @@ -18243,6 +18090,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": [], @@ -18287,11 +18140,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -18300,11 +18152,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -18338,12 +18189,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -18353,11 +18204,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -18374,12 +18226,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -18402,12 +18254,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -18417,11 +18269,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -18432,20 +18283,20 @@ }, "parameters": [ "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -18477,11 +18328,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -18503,31 +18353,30 @@ }, "parameters": [ "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -18569,11 +18418,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -18588,11 +18436,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -18621,20 +18468,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -18643,11 +18490,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -18659,20 +18505,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -18681,11 +18527,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -18698,20 +18543,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -18720,11 +18565,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -18736,20 +18580,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -18758,11 +18602,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -18790,18 +18633,17 @@ }, "parameters": [ "", - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -18813,11 +18655,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -18826,11 +18667,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -18843,11 +18683,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -18855,11 +18694,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -18868,11 +18706,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -18955,22 +18792,20 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -19005,11 +18840,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -19054,11 +18888,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -19103,11 +18936,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -19152,11 +18984,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -19178,11 +19009,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -19227,11 +19057,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -19276,11 +19105,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -19329,7 +19157,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -19360,8 +19188,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -19369,8 +19195,6 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", "extraInformation": [ "Idle", "Hovered", @@ -19385,9 +19209,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -19395,9 +19216,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -19405,9 +19223,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -19415,9 +19230,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -19427,10 +19239,267 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 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": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": 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": "", @@ -19460,7 +19529,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -19472,7 +19541,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -19480,14 +19549,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()" ] }, { @@ -19515,63 +19594,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" ] } ] @@ -19610,23 +19652,52 @@ "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", "" ] } ] - } - ], - "parameters": [ + }, { - "description": "Object", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Label", + "Text", + "=", + "LabelText" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" @@ -19683,12 +19754,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -19723,10 +19795,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -19735,7 +19807,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -19743,7 +19815,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -19754,10 +19826,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -19781,10 +19853,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -19801,10 +19874,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -19833,12 +19907,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -19878,10 +19953,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -19910,12 +19986,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -19967,12 +20044,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -20004,126 +20082,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": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteButton::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" - ] - } - ] - } - ], - "parameters": [] } ], "parameters": [ @@ -20134,22 +20092,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -20371,6 +20314,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -20379,21 +20323,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", - "GetArgumentAsString(\"LabelText\")" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -20408,17 +20344,17 @@ }, { "description": "Text", - "name": "LabelText", + "name": "Value", "type": "string" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", "sentence": "", "events": [ { @@ -20427,18 +20363,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Label", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -20450,12 +20386,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", @@ -20463,17 +20398,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Label.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -20486,91 +20421,191 @@ "objectGroups": [] }, { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "MettreXY" + "value": "BooleanVariable" }, "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" + "ShouldActivate", + "True", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "TextObject::WrappingWidth" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" + "Idle", + "ButtonFSM", + "yes" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "SetCenterY" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" + "ShouldActivate", + "True", + "" ] } ], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "no" ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" }, + { + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "value": "BehaviorActivated" }, "parameters": [ - "Object", - "" + "Idle", + "ButtonFSM" ] } ], "actions": [ { "type": { - "value": "MettreY" + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "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", "+", - "Object.PropertyPressedLabelOffsetY()" + "Value - LabelOffset" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LabelOffset", + "=", + "Value" ] } ] @@ -20584,7 +20619,238 @@ "type": "object" } ], - "objectGroups": [ + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" + }, + { + "value": "0.25", + "type": "Number", + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Label offset on Y axis when pressed", + "group": "States", + "name": "PressedLabelOffsetY" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" + }, + { + "value": "", + "type": "Choice", + "label": "", + "extraInformation": [ + "Label.Text=LabelText" + ], + "hidden": true, + "name": "_PropertyMapping" + } + ], + "variants": [ + { + "areaMaxX": 192, + "areaMaxY": 69, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Big Red Button With Shadow", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 60, + "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": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 60, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Red Button With Shadow_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Red Button With Shadow_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Red Button With Shadow_Pressed.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ { "name": "Background", "objects": [ @@ -20599,315 +20865,879 @@ } ] } + ], + "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": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 60, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "1a9eba11-e70c-4a1a-88b8-ed6f52e3d4dc", + "width": 188, + "x": 2, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } ] }, { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", - "events": [ + "areaMaxX": 192, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Floating Out Button Dark Blue 2", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "Button", + "font": "CarterOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 30, + "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": "Button", + "font": "CarterOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 30, + "color": "255;255;255" + } + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"ShouldActivate\"" - ] + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Idle", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Idle.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" } ], - "actions": [ + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, { - "type": { - "value": "ActivateBehavior" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "yes" - ] + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Hovered", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Hovered.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"ShouldActivate\"" - ] + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Pressed", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Pressed.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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 } ], - "actions": [ + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 57, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "dfb1b714-aad7-4c68-9234-531c340769cd", + "width": 186, + "x": 3, + "y": 31, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] + }, + { + "areaMaxX": 192, + "areaMaxY": 69, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "5faf2b0415c271fa6e747283ed36297a95f04d2b6c477a7b011775fa6fb444ee", + "assetStoreOriginalName": "Red Button With Shadow", + "name": "Red Button With Shadow", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "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": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Red Button With Shadow_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Red Button With Shadow_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Red Button With Shadow_Pressed.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ { - "type": { - "value": "ActivateBehavior" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "no" - ] + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" } ] } ], - "parameters": [ + "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": [ { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] }, { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 60, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "1a9eba11-e70c-4a1a-88b8-ed6f52e3d4dc", + "width": 188, + "x": 2, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } - ], - "objectGroups": [] + ] }, { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", - "events": [ + "areaMaxX": 192, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "d00645a899e762e085fa6fdf2625701baea9cc10ee903a64ca7d371e5bbb8dca", + "assetStoreOriginalName": "Floating Out Button Dark Blue", + "name": "Floating Out Button Dark Blue", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "Button", + "font": "CarterOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "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": "Button", + "font": "CarterOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "color": "255;255;255" + } + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": [ - "Idle", - "ButtonFSM" - ] + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Idle", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Idle.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" } ], - "actions": [ + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } } ] - } - ], - "parameters": [ + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Hovered", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Hovered.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Pressed", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Pressed.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] } ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "name": "PressedLabelOffsetY" - }, - { - "value": "0", - "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "LeftPadding" - }, - { - "value": "0", - "type": "Number", - "label": "Right padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "RightPadding" - }, - { - "value": "0", - "type": "Number", - "label": "Top padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "TopPadding" - }, - { - "value": "0", - "type": "Number", - "label": "Bottom padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "BottomPadding" - }, - { - "value": "0.25", - "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], - "name": "HoveredFadeOutDuration" - } - ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] }, - "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": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": "0;0;0" - } - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "objectsGroups": [ { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] } ], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "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": [] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + ], + "instances": [ { - "name": "Tween", - "type": "Tween::TweenBehavior" + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 57, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "dfb1b714-aad7-4c68-9234-531c340769cd", + "width": 186, + "x": 3, + "y": 31, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Idle" - }, - { - "objectName": "Hovered" - }, - { - "objectName": "Pressed" - } - ] - } + ] } ] }, @@ -20916,6 +21746,7 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Draggable (for physics objects)", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMjcsMTFjMC0yLTIuMi0zLjYtNS42LTQuNEMyMC42LDMuMiwxOSwxLDE3LDFzLTMuNiwyLjItNC40LDUuNkM5LjIsNy40LDcsOSw3LDExYzAsMiwyLjIsMy42LDUuNiw0LjQNCgljMC4zLDEuMiwwLjYsMi4yLDEuMSwzLjFjMC4zLDAuNSwwLjksMC43LDEuNCwwLjRjMC41LTAuMywwLjctMC45LDAuNC0xLjRjLTAuMy0wLjUtMC41LTEuMS0wLjctMS44YzAuNywwLjEsMS41LDAuMSwyLjIsMC4xDQoJYzAuOCwwLDEuNSwwLDIuMi0wLjFjLTAuMywxLTAuNywxLjktMS4xLDIuNWMtMC4zLDAuNC0wLjIsMS4xLDAuMiwxLjRjMC4yLDAuMSwwLjQsMC4yLDAuNiwwLjJjMC4zLDAsMC42LTAuMSwwLjgtMC40DQoJYzAuNy0xLDEuMy0yLjQsMS43LTRDMjQuOCwxNC42LDI3LDEzLDI3LDExeiBNMTcsM2MwLjcsMCwxLjYsMS4yLDIuMiwzLjNjLTAuNy0wLjEtMS41LTAuMS0yLjItMC4xcy0xLjUsMC0yLjIsMC4xDQoJQzE1LjQsNC4yLDE2LjMsMywxNywzeiBNOSwxMWMwLTAuNywxLjItMS42LDMuMy0yLjJjLTAuMSwwLjctMC4xLDEuNS0wLjEsMi4yYzAsMC44LDAsMS41LDAuMSwyLjJDMTAuMiwxMi42LDksMTEuNyw5LDExeiBNMTcsMTMuOQ0KCWMtMSwwLTEuOS0wLjEtMi43LTAuMmMtMC4xLTAuOC0wLjItMS43LTAuMi0yLjdjMC0xLDAuMS0xLjksMC4yLTIuN0MxNS4xLDguMiwxNiw4LjEsMTcsOC4xczEuOSwwLjEsMi43LDAuMg0KCWMwLjEsMC44LDAuMiwxLjcsMC4yLDIuN2MwLDAuOS0wLjEsMS44LTAuMiwyLjdDMTguOSwxMy44LDE4LDEzLjksMTcsMTMuOXogTTIxLjcsMTMuMmMwLjEtMC43LDAuMS0xLjUsMC4xLTIuMg0KCWMwLTAuOCwwLTEuNS0wLjEtMi4yQzIzLjgsOS40LDI1LDEwLjMsMjUsMTFDMjUsMTEuNywyMy44LDEyLjYsMjEuNywxMy4yeiIvPg0KPHBhdGggZD0iTTI5LjksMTcuNUMyOS43LDE3LjIsMjkuNCwxNywyOSwxN2MtMi4yLDAtNC4zLDEtNS42LDIuOEwyMi41LDIxYy0xLjEsMS4zLTIuOCwyLTQuNSwyaC0zYy0wLjYsMC0xLTAuNC0xLTFzMC40LTEsMS0xaDEuOQ0KCWMxLjYsMCwzLjEtMS4zLDMuMS0yLjljMCwwLDAtMC4xLDAtMC4xYzAtMC41LTAuNS0xLTEtMWwtNi4xLDBjLTMuNiwwLTYuNSwxLjYtOC4xLDQuMmwtMi43LDQuMmMtMC4yLDAuMy0wLjIsMC43LDAsMWwzLDUNCgljMC4xLDAuMiwwLjQsMC40LDAuNiwwLjVjMC4xLDAsMC4xLDAsMC4yLDBjMC4yLDAsMC40LTAuMSwwLjYtMC4yYzMuOC0yLjUsOC4yLTMuOCwxMi43LTMuOGMzLjMsMCw2LjMtMS44LDcuOS00LjdsMi43LTQuOA0KCUMzMCwxOC4yLDMwLDE3LjgsMjkuOSwxNy41eiIvPg0KPC9zdmc+DQo=", "name": "DraggablePhysics", @@ -21904,8 +22735,6 @@ "value": "", "type": "Behavior", "label": "Physics behavior", - "description": "", - "group": "", "extraInformation": [ "Physics2::Physics2Behavior" ], @@ -21915,8 +22744,6 @@ "value": "Left", "type": "Choice", "label": "Mouse button", - "description": "", - "group": "", "extraInformation": [ "Left", "Right", @@ -21929,36 +22756,24 @@ "type": "Number", "unit": "Newton", "label": "Maximum force", - "description": "", - "group": "", - "extraInformation": [], "name": "MaxForce" }, { "value": "10", "type": "Number", "label": "Frequency (Hz) ", - "description": "", - "group": "", - "extraInformation": [], "name": "Frequency" }, { "value": "1", "type": "Number", "label": "Damping ratio (Range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], "name": "Damping" }, { "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseJointID" }, @@ -21967,8 +22782,6 @@ "type": "Boolean", "label": "Enable automatic dragging", "description": "If automatic dragging is disabled, use the \"Start drag\" and \"Release drag\" actions.", - "group": "", - "extraInformation": [], "name": "EnableAutomaticDragging" } ], @@ -22698,6 +23511,5 @@ "windowMask": false } } - ], - "externalSourceFiles": [] + ] } \ No newline at end of file diff --git a/examples/multiplayer-jump-game/multiplayer-jump-game.json b/examples/multiplayer-jump-game/multiplayer-jump-game.json index 7d9d12c51..2909d731f 100644 --- a/examples/multiplayer-jump-game/multiplayer-jump-game.json +++ b/examples/multiplayer-jump-game/multiplayer-jump-game.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 209, + "build": 237, "major": 5, - "minor": 4, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Rage Jump Multiplayer", "description": "An online multiplayer physics game where try to collect all of the apples in the game without throwing your keyboard through your monitor.\n\nThis game example includes:\n-Multiplayer lobby\n-Multiplayer chat\n-Physics behavior\n-Tween behavior\n-Sound effects\n-Text objects", @@ -81,8 +80,16 @@ }, "authorIds": [], "authorUsernames": [], - "categories": ["multiplayer", "platformer", "action"], - "playableDevices": ["keyboard", "mobile"], + "categories": [ + "multiplayer", + "platformer", + "action" + ], + "playableDevices": [ + "keyboard", + "mobile", + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -94,7 +101,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Hit1.png", "kind": "image", "metadata": "", @@ -103,7 +109,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Hit2.png", "kind": "image", "metadata": "", @@ -112,7 +117,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Hit3.png", "kind": "image", "metadata": "", @@ -121,7 +125,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Hit4.png", "kind": "image", "metadata": "", @@ -130,7 +133,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Hit5.png", "kind": "image", "metadata": "", @@ -139,7 +141,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Hit6.png", "kind": "image", "metadata": "", @@ -148,7 +149,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Hit7.png", "kind": "image", "metadata": "", @@ -157,7 +157,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Idle1.png", "kind": "image", "metadata": "", @@ -166,7 +165,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Idle2.png", "kind": "image", "metadata": "", @@ -175,7 +173,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Idle3.png", "kind": "image", "metadata": "", @@ -184,7 +181,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Idle4.png", "kind": "image", "metadata": "", @@ -193,7 +189,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Idle5.png", "kind": "image", "metadata": "", @@ -202,7 +197,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Idle6.png", "kind": "image", "metadata": "", @@ -211,7 +205,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Idle7.png", "kind": "image", "metadata": "", @@ -220,7 +213,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Idle8.png", "kind": "image", "metadata": "", @@ -229,7 +221,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Idle9.png", "kind": "image", "metadata": "", @@ -238,7 +229,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Idle10.png", "kind": "image", "metadata": "", @@ -247,7 +237,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Idle11.png", "kind": "image", "metadata": "", @@ -256,7 +245,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Jump.png", "kind": "image", "metadata": "", @@ -265,7 +253,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Fall.png", "kind": "image", "metadata": "", @@ -274,7 +261,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Saw1.png", "kind": "image", "metadata": "", @@ -283,7 +269,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Saw2.png", "kind": "image", "metadata": "", @@ -292,7 +277,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Saw3.png", "kind": "image", "metadata": "", @@ -301,7 +285,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Saw4.png", "kind": "image", "metadata": "", @@ -310,7 +293,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Saw5.png", "kind": "image", "metadata": "", @@ -319,7 +301,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Saw6.png", "kind": "image", "metadata": "", @@ -328,7 +309,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Saw7.png", "kind": "image", "metadata": "", @@ -337,7 +317,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Saw8.png", "kind": "image", "metadata": "", @@ -346,7 +325,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Apple1.png", "kind": "image", "metadata": "", @@ -355,7 +333,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Apple2.png", "kind": "image", "metadata": "", @@ -364,7 +341,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Apple3.png", "kind": "image", "metadata": "", @@ -373,7 +349,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Apple4.png", "kind": "image", "metadata": "", @@ -382,7 +357,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Apple5.png", "kind": "image", "metadata": "", @@ -391,7 +365,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Apple6.png", "kind": "image", "metadata": "", @@ -400,7 +373,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Apple7.png", "kind": "image", "metadata": "", @@ -409,7 +381,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Apple8.png", "kind": "image", "metadata": "", @@ -418,7 +389,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Apple9.png", "kind": "image", "metadata": "", @@ -427,7 +397,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Apple10.png", "kind": "image", "metadata": "", @@ -436,7 +405,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Apple11.png", "kind": "image", "metadata": "", @@ -445,7 +413,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Apple12.png", "kind": "image", "metadata": "", @@ -454,7 +421,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Apple13.png", "kind": "image", "metadata": "", @@ -463,7 +429,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Apple14.png", "kind": "image", "metadata": "", @@ -472,7 +437,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Apple15.png", "kind": "image", "metadata": "", @@ -481,7 +445,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Apple16.png", "kind": "image", "metadata": "", @@ -490,7 +453,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Apple17.png", "kind": "image", "metadata": "", @@ -499,7 +461,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/9patch castle.png", "kind": "image", "metadata": "", @@ -508,7 +469,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/9patch Slippery.png", "kind": "image", "metadata": "", @@ -528,7 +488,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/UI Dark Corner.png", "kind": "image", "metadata": "", @@ -537,7 +496,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Green.png", "kind": "image", "metadata": "", @@ -546,7 +504,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/UI Chat background.png", "kind": "image", "metadata": "", @@ -566,57 +523,6 @@ } }, { - "alwaysLoaded": false, - "file": "assets/Floating Out Button Dark Blue_Hovered.png", - "kind": "image", - "metadata": "", - "name": "Floating Out Button Dark Blue_Hovered.png", - "smoothed": false, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/2f8919c3cad70134ff1732dbaef5dd9babd0aed0240dd817c1db9e27aa6b205b_Floating Out Button Dark Blue_Hovered.png", - "name": "Floating Out Button Dark Blue_Hovered.png" - } - }, - { - "alwaysLoaded": false, - "file": "assets/Floating Out Button Dark Blue_Idle.png", - "kind": "image", - "metadata": "", - "name": "Floating Out Button Dark Blue_Idle.png", - "smoothed": false, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/d2cedf36d5812262daf2389108558a2ee0b40ca23da05f6200e1f0eee905ca11_Floating Out Button Dark Blue_Idle.png", - "name": "Floating Out Button Dark Blue_Idle.png" - } - }, - { - "alwaysLoaded": false, - "file": "assets/Floating Out Button Dark Blue_Pressed.png", - "kind": "image", - "metadata": "", - "name": "Floating Out Button Dark Blue_Pressed.png", - "smoothed": false, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/d246e92fe474d2825e38af207a9926794d490bc052aef447688612f61ec48861_Floating Out Button Dark Blue_Pressed.png", - "name": "Floating Out Button Dark Blue_Pressed.png" - } - }, - { - "file": "assets/CarterOne-Regular.ttf", - "kind": "font", - "metadata": "", - "name": "CarterOne-Regular.ttf", - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/44aceaa249d2ecb8bfe3eb7bedcb17aac44c0f5f13f9f58d85427a5afa7e92f0_CarterOne-Regular.ttf", - "name": "CarterOne-Regular.ttf" - } - }, - { - "alwaysLoaded": false, "file": "assets/RestartPoint.png", "kind": "image", "metadata": "", @@ -632,7 +538,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/8BitOperatorPlus8Regular_Edited3.png", "kind": "image", "metadata": "", @@ -641,7 +546,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/CameraWall.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -690,7 +594,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Target round button.png", "kind": "image", "metadata": "", @@ -703,7 +606,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/JumpArrow_White.png", "kind": "image", "metadata": "", @@ -732,7 +634,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "thumbnail.png", "kind": "image", "metadata": "", @@ -741,7 +642,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/9patch castle Big.png", "kind": "image", "metadata": "", @@ -750,13 +650,59 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Title.png", "kind": "image", "metadata": "", "name": "assets\\Title.png", "smoothed": true, "userAdded": true + }, + { + "file": "assets/Floating Out Button Dark Blue_Hovered.png", + "kind": "image", + "metadata": "", + "name": "Floating Out Button Dark Blue_Hovered.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/2f8919c3cad70134ff1732dbaef5dd9babd0aed0240dd817c1db9e27aa6b205b_Floating Out Button Dark Blue_Hovered.png", + "name": "Floating Out Button Dark Blue_Hovered.png" + } + }, + { + "file": "assets/Floating Out Button Dark Blue_Idle.png", + "kind": "image", + "metadata": "", + "name": "Floating Out Button Dark Blue_Idle.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/d2cedf36d5812262daf2389108558a2ee0b40ca23da05f6200e1f0eee905ca11_Floating Out Button Dark Blue_Idle.png", + "name": "Floating Out Button Dark Blue_Idle.png" + } + }, + { + "file": "assets/Floating Out Button Dark Blue_Pressed.png", + "kind": "image", + "metadata": "", + "name": "Floating Out Button Dark Blue_Pressed.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/d246e92fe474d2825e38af207a9926794d490bc052aef447688612f61ec48861_Floating Out Button Dark Blue_Pressed.png", + "name": "Floating Out Button Dark Blue_Pressed.png" + } + }, + { + "file": "assets/CarterOne-Regular.ttf", + "kind": "font", + "metadata": "", + "name": "CarterOne-Regular.ttf", + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/44aceaa249d2ecb8bfe3eb7bedcb17aac44c0f5f13f9f58d85427a5afa7e92f0_CarterOne-Regular.ttf", + "name": "CarterOne-Regular.ttf" + } } ], "resourceFolders": [] @@ -786,9 +732,9 @@ "gridOffsetX": 0, "gridOffsetY": 0, "gridColor": 10401023, - "gridAlpha": 0.8, + "gridAlpha": 0.2, "snap": true, - "zoomFactor": 1.580468750000001, + "zoomFactor": 0.5843784410740942, "windowMask": false }, "objectsGroups": [], @@ -801,7 +747,7 @@ "height": 128, "keepRatio": true, "layer": "", - "name": "BrownButtonWithShadow", + "name": "JoinButton", "persistentUuid": "ac7b7919-da66-4f43-a39f-344b41eb3363", "width": 384, "x": 448, @@ -1048,15 +994,10 @@ ], "objects": [ { - "areaMaxX": 64, - "areaMaxY": 64, - "areaMaxZ": 64, - "areaMinX": 0, - "areaMinY": 0, - "areaMinZ": 0, "assetStoreId": "d7de738069817891a6c233618dc4fe00463738543c80009e9ef75684d5f6e8fd", - "name": "BrownButtonWithShadow", + "name": "JoinButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Big Floating Out Button Dark Blue", "variables": [], "effects": [], "behaviors": [], @@ -1066,7 +1007,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Join Lobby" }, "childrenContent": { "Hovered": { @@ -1120,6 +1062,7 @@ "text": "Join Lobby", "font": "CantoraOne-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 60, "color": "255;255;255" } @@ -1134,38 +1077,7 @@ "topMargin": 16, "width": 192 } - }, - "instances": [], - "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": [] - } - ] + } }, { "assetStoreId": "", @@ -1204,6 +1116,7 @@ "text": "A simple game about collecting apples", "font": "CantoraOne-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 30, "color": "255;255;255" } @@ -2077,7 +1990,7 @@ "objectName": "PlayerNumberText" }, { - "objectName": "BrownButtonWithShadow" + "objectName": "JoinButton" }, { "objectName": "Walls" @@ -2101,7 +2014,9 @@ "type": { "value": "DepartScene" }, - "parameters": [""] + "parameters": [ + "" + ] } ], "actions": [ @@ -2109,13 +2024,24 @@ "type": { "value": "ZoomCamera" }, - "parameters": ["", "2", "\"Background\"", ""] + "parameters": [ + "", + "2", + "\"Background\"", + "" + ] }, { "type": { "value": "CentreCamera" }, - "parameters": ["", "Background", "", "\"Background\"", ""] + "parameters": [ + "", + "Background", + "", + "\"Background\"", + "" + ] } ] }, @@ -2138,7 +2064,10 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, - "parameters": ["BrownButtonWithShadow", ""] + "parameters": [ + "JoinButton", + "" + ] } ], "actions": [ @@ -2146,7 +2075,9 @@ "type": { "value": "Multiplayer::OpenGameLobbies" }, - "parameters": [""] + "parameters": [ + "" + ] } ] }, @@ -2165,7 +2096,11 @@ "type": { "value": "Scene" }, - "parameters": ["", "\"GameScene\"", ""] + "parameters": [ + "", + "\"GameScene\"", + "" + ] } ] }, @@ -2188,7 +2123,9 @@ "type": { "value": "DepartScene" }, - "parameters": [""] + "parameters": [ + "" + ] } ], "actions": [ @@ -2214,7 +2151,12 @@ "type": { "value": "AnimatableCapability::AnimatableBehavior::Name" }, - "parameters": ["PlayerObject", "Animation", "!=", "\"Hit\""] + "parameters": [ + "PlayerObject", + "Animation", + "!=", + "\"Hit\"" + ] } ], "actions": [], @@ -2226,7 +2168,12 @@ "type": { "value": "Physics2::LinearVelocityX" }, - "parameters": ["PlayerObject", "Physics2", ">", "5"] + "parameters": [ + "PlayerObject", + "Physics2", + ">", + "5" + ] } ], "actions": [ @@ -2234,7 +2181,11 @@ "type": { "value": "FlippableCapability::FlippableBehavior::FlipX" }, - "parameters": ["PlayerObject", "Flippable", ""] + "parameters": [ + "PlayerObject", + "Flippable", + "" + ] } ] }, @@ -2245,7 +2196,12 @@ "type": { "value": "Physics2::LinearVelocityX" }, - "parameters": ["PlayerObject", "Physics2", "<", "-5"] + "parameters": [ + "PlayerObject", + "Physics2", + "<", + "-5" + ] } ], "actions": [ @@ -2253,7 +2209,11 @@ "type": { "value": "FlippableCapability::FlippableBehavior::FlipX" }, - "parameters": ["PlayerObject", "Flippable", "yes"] + "parameters": [ + "PlayerObject", + "Flippable", + "yes" + ] } ] }, @@ -2264,7 +2224,12 @@ "type": { "value": "Physics2::LinearVelocityY" }, - "parameters": ["PlayerObject", "Physics2", "<", "-5"] + "parameters": [ + "PlayerObject", + "Physics2", + "<", + "-5" + ] } ], "actions": [ @@ -2272,7 +2237,12 @@ "type": { "value": "AnimatableCapability::AnimatableBehavior::SetName" }, - "parameters": ["PlayerObject", "Animation", "=", "\"Jump\""] + "parameters": [ + "PlayerObject", + "Animation", + "=", + "\"Jump\"" + ] } ] }, @@ -2283,7 +2253,12 @@ "type": { "value": "Physics2::LinearVelocityY" }, - "parameters": ["PlayerObject", "Physics2", ">", "5"] + "parameters": [ + "PlayerObject", + "Physics2", + ">", + "5" + ] } ], "actions": [ @@ -2291,7 +2266,12 @@ "type": { "value": "AnimatableCapability::AnimatableBehavior::SetName" }, - "parameters": ["PlayerObject", "Animation", "=", "\"Fall\""] + "parameters": [ + "PlayerObject", + "Animation", + "=", + "\"Fall\"" + ] } ] } @@ -2439,7 +2419,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, - "zoomFactor": 0.15002679255026913, + "zoomFactor": 0.5290357402157324, "windowMask": false }, "objectsGroups": [ @@ -2696,7 +2676,7 @@ "depth": 48, "height": 48, "layer": "UI", - "name": "FloatingOutButtonDarkBlue", + "name": "SendButton", "persistentUuid": "4184465d-fcb2-4e88-a45d-c03eae90d4c9", "width": 80, "x": 1200, @@ -7437,6 +7417,7 @@ "text": "10/10", "font": "68aa9a6fa860ee71edbbdd8bb40fb357f4882570307bfb088af195f7fc8524f0_RampartOne-Regular.ttf", "textAlignment": "right", + "verticalTextAlignment": "top", "characterSize": 50, "color": "255;255;255" } @@ -7592,7 +7573,8 @@ "color": "255;255;255", "fontFamily": "CantoraOne-Regular.ttf", "align": "left", - "wordWrap": true + "wordWrap": true, + "verticalTextAlignment": "top" } }, { @@ -7679,15 +7661,10 @@ ] }, { - "areaMaxX": 64, - "areaMaxY": 64, - "areaMaxZ": 64, - "areaMinX": 0, - "areaMinY": 0, - "areaMinZ": 0, "assetStoreId": "d00645a899e762e085fa6fdf2625701baea9cc10ee903a64ca7d371e5bbb8dca", - "name": "FloatingOutButtonDarkBlue", + "name": "SendButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Small Floating Out Button Dark Blue", "variables": [], "effects": [], "behaviors": [], @@ -7697,7 +7674,8 @@ "PressedLabelOffsetY": 2, "BottomPadding": 4, "TopPadding": 0, - "HoveredFadeOutDuration": 0 + "HoveredFadeOutDuration": 0, + "LabelText": "Send" }, "childrenContent": { "Hovered": { @@ -7751,6 +7729,7 @@ "text": "Send", "font": "CarterOne-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 30, "color": "255;255;255" } @@ -7765,38 +7744,7 @@ "topMargin": 10, "width": 192 } - }, - "instances": [], - "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": [] - } - ] + } }, { "adaptCollisionMaskAutomatically": true, @@ -7888,7 +7836,8 @@ "bitmapFontResourceName": "8BitOperatorPlus8Regular_Edited.fnt", "textureAtlasResourceName": "8BitOperatorPlus8Regular_Edited3.png", "align": "center", - "wordWrap": false + "wordWrap": false, + "verticalTextAlignment": "top" } }, { @@ -8236,7 +8185,8 @@ "bitmapFontResourceName": "8BitOperatorPlus8Regular_Edited.fnt", "textureAtlasResourceName": "8BitOperatorPlus8Regular_Edited3.png", "align": "center", - "wordWrap": false + "wordWrap": false, + "verticalTextAlignment": "top" } } ], @@ -8248,7 +8198,7 @@ "quickCustomizationVisibility": "hidden", "children": [ { - "objectName": "FloatingOutButtonDarkBlue" + "objectName": "SendButton" }, { "objectName": "ChatInput" @@ -8331,7 +8281,9 @@ "type": { "value": "DepartScene" }, - "parameters": [""] + "parameters": [ + "" + ] } ], "actions": [ @@ -8339,13 +8291,20 @@ "type": { "value": "Cache" }, - "parameters": ["SpawnPoint"] + "parameters": [ + "SpawnPoint" + ] }, { "type": { "value": "ZoomCamera" }, - "parameters": ["", "2", "", ""] + "parameters": [ + "", + "2", + "", + "" + ] } ], "events": [ @@ -8377,13 +8336,21 @@ "type": { "value": "Delete" }, - "parameters": ["MobileButton", ""] + "parameters": [ + "MobileButton", + "" + ] }, { "type": { "value": "OpacityCapability::OpacityBehavior::SetValue" }, - "parameters": ["TutorialText", "Opacity", "=", "200"] + "parameters": [ + "TutorialText", + "Opacity", + "=", + "200" + ] } ] }, @@ -8402,7 +8369,10 @@ "type": { "value": "Delete" }, - "parameters": ["TutorialText", ""] + "parameters": [ + "TutorialText", + "" + ] } ] }, @@ -8438,7 +8408,10 @@ "type": { "value": "Multiplayer::MultiplayerObjectBehavior::TakeObjectOwnership" }, - "parameters": ["PlayerObject", "MultiplayerObject"] + "parameters": [ + "PlayerObject", + "MultiplayerObject" + ] }, { "type": { @@ -8512,13 +8485,18 @@ "type": { "value": "Multiplayer::MultiplayerObjectBehavior::TakeObjectOwnership" }, - "parameters": ["IndicatorArrow", "MultiplayerObject"] + "parameters": [ + "IndicatorArrow", + "MultiplayerObject" + ] }, { "type": { "value": "Cache" }, - "parameters": ["IndicatorArrow"] + "parameters": [ + "IndicatorArrow" + ] } ] }, @@ -8553,16 +8531,24 @@ "type": { "value": "Multiplayer::MultiplayerObjectBehavior::TakeObjectOwnership" }, - "parameters": ["PlayerName", "MultiplayerObject"] + "parameters": [ + "PlayerName", + "MultiplayerObject" + ] }, { "type": { "value": "OpacityCapability::OpacityBehavior::SetValue" }, - "parameters": ["PlayerName", "Opacity", "=", "150"] - } - ] - } + "parameters": [ + "PlayerName", + "Opacity", + "=", + "150" + ] + } + ] + } ] }, { @@ -8618,7 +8604,10 @@ "inverted": true, "value": "Multiplayer::MultiplayerObjectBehavior::IsObjectOwnedByCurrentPlayer" }, - "parameters": ["PlayerObject", "MultiplayerObject"] + "parameters": [ + "PlayerObject", + "MultiplayerObject" + ] } ], "actions": [], @@ -8630,7 +8619,10 @@ "type": { "value": "BehaviorActivated" }, - "parameters": ["PlayerObject", "SmoothCamera"] + "parameters": [ + "PlayerObject", + "SmoothCamera" + ] } ], "actions": [ @@ -8638,7 +8630,11 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["PlayerObject", "SmoothCamera", ""] + "parameters": [ + "PlayerObject", + "SmoothCamera", + "" + ] } ] } @@ -8660,7 +8656,9 @@ "type": { "value": "DepartScene" }, - "parameters": [""] + "parameters": [ + "" + ] } ], "actions": [ @@ -8668,7 +8666,11 @@ "type": { "value": "BBText::SetBBText" }, - "parameters": ["ChatText", "=", "\"\""] + "parameters": [ + "ChatText", + "=", + "\"\"" + ] } ] }, @@ -8691,13 +8693,21 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, - "parameters": ["FloatingOutButtonDarkBlue", ""] + "parameters": [ + "SendButton", + "" + ] }, { "type": { "value": "TextContainerCapability::TextContainerBehavior::Value" }, - "parameters": ["ChatInput", "Text", "!=", "\"\""] + "parameters": [ + "ChatInput", + "Text", + "!=", + "\"\"" + ] } ], "actions": [ @@ -8705,13 +8715,21 @@ "type": { "value": "Multiplayer::SendMessage" }, - "parameters": ["\"PlayerChat\"", "ChatInput.Text()"] + "parameters": [ + "\"PlayerChat\"", + "ChatInput.Text()" + ] }, { "type": { "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, - "parameters": ["ChatInput", "Text", "=", "\"\""] + "parameters": [ + "ChatInput", + "Text", + "=", + "\"\"" + ] } ] }, @@ -8722,7 +8740,9 @@ "type": { "value": "Multiplayer::HasMessageBeenReceived" }, - "parameters": ["\"PlayerChat\""] + "parameters": [ + "\"PlayerChat\"" + ] } ], "actions": [ @@ -8836,19 +8856,28 @@ "type": { "value": "Multiplayer::MultiplayerObjectBehavior::IsObjectOwnedByCurrentPlayer" }, - "parameters": ["IndicatorArrow", "MultiplayerObject"] + "parameters": [ + "IndicatorArrow", + "MultiplayerObject" + ] }, { "type": { "value": "Multiplayer::MultiplayerObjectBehavior::IsObjectOwnedByCurrentPlayer" }, - "parameters": ["PlayerObject", "MultiplayerObject"] + "parameters": [ + "PlayerObject", + "MultiplayerObject" + ] }, { "type": { "value": "Multiplayer::MultiplayerObjectBehavior::IsObjectOwnedByCurrentPlayer" }, - "parameters": ["PlayerName", "MultiplayerObject"] + "parameters": [ + "PlayerName", + "MultiplayerObject" + ] } ], "actions": [], @@ -8870,7 +8899,11 @@ "inverted": true, "value": "Tween::Exists" }, - "parameters": ["IndicatorArrow", "Tween", "\"Prepare\""] + "parameters": [ + "IndicatorArrow", + "Tween", + "\"Prepare\"" + ] } ], "actions": [], @@ -8894,28 +8927,43 @@ "type": { "value": "Physics2::LinearVelocityLength" }, - "parameters": ["PlayerObject", "Physics2", "=", "0"] + "parameters": [ + "PlayerObject", + "Physics2", + "=", + "0" + ] }, { "type": { "inverted": true, "value": "Visible" }, - "parameters": ["IndicatorArrow"] + "parameters": [ + "IndicatorArrow" + ] }, { "type": { "inverted": true, "value": "Tween::Exists" }, - "parameters": ["IndicatorArrow", "Tween", "\"Left\""] + "parameters": [ + "IndicatorArrow", + "Tween", + "\"Left\"" + ] }, { "type": { "inverted": true, "value": "Tween::Exists" }, - "parameters": ["IndicatorArrow", "Tween", "\"Right\""] + "parameters": [ + "IndicatorArrow", + "Tween", + "\"Right\"" + ] }, { "type": { @@ -8929,7 +8977,10 @@ "type": { "value": "Montre" }, - "parameters": ["IndicatorArrow", ""] + "parameters": [ + "IndicatorArrow", + "" + ] }, { "type": { @@ -8964,7 +9015,11 @@ "type": { "value": "SetAngle" }, - "parameters": ["IndicatorArrow", "=", "15"] + "parameters": [ + "IndicatorArrow", + "=", + "15" + ] }, { "type": { @@ -9002,7 +9057,11 @@ "type": { "value": "SetAngle" }, - "parameters": ["IndicatorArrow", "=", "165"] + "parameters": [ + "IndicatorArrow", + "=", + "165" + ] }, { "type": { @@ -9041,7 +9100,11 @@ "type": { "value": "Tween::HasFinished" }, - "parameters": ["IndicatorArrow", "Tween", "\"Left\""] + "parameters": [ + "IndicatorArrow", + "Tween", + "\"Left\"" + ] } ], "actions": [ @@ -9049,7 +9112,11 @@ "type": { "value": "Tween::RemoveTween" }, - "parameters": ["IndicatorArrow", "Tween", "\"Left\""] + "parameters": [ + "IndicatorArrow", + "Tween", + "\"Left\"" + ] }, { "type": { @@ -9074,7 +9141,11 @@ "type": { "value": "Tween::HasFinished" }, - "parameters": ["IndicatorArrow", "Tween", "\"Right\""] + "parameters": [ + "IndicatorArrow", + "Tween", + "\"Right\"" + ] } ], "actions": [ @@ -9082,7 +9153,11 @@ "type": { "value": "Tween::RemoveTween" }, - "parameters": ["IndicatorArrow", "Tween", "\"Right\""] + "parameters": [ + "IndicatorArrow", + "Tween", + "\"Right\"" + ] }, { "type": { @@ -9125,13 +9200,20 @@ "type": { "value": "ButtonStates::ButtonFSM::IsPressed" }, - "parameters": ["MobileButton", "ButtonFSM", ""] + "parameters": [ + "MobileButton", + "ButtonFSM", + "" + ] }, { "type": { "value": "KeyPressed" }, - "parameters": ["", "Space"] + "parameters": [ + "", + "Space" + ] } ] }, @@ -9139,7 +9221,9 @@ "type": { "value": "Visible" }, - "parameters": ["IndicatorArrow"] + "parameters": [ + "IndicatorArrow" + ] } ], "actions": [ @@ -9147,13 +9231,21 @@ "type": { "value": "Tween::RemoveTween" }, - "parameters": ["IndicatorArrow", "Tween", "\"Right\""] + "parameters": [ + "IndicatorArrow", + "Tween", + "\"Right\"" + ] }, { "type": { "value": "Tween::RemoveTween" }, - "parameters": ["IndicatorArrow", "Tween", "\"Left\""] + "parameters": [ + "IndicatorArrow", + "Tween", + "\"Left\"" + ] }, { "type": { @@ -9205,13 +9297,19 @@ "type": { "value": "Tween::Exists" }, - "parameters": ["IndicatorArrow", "Tween", "\"Prepare\""] + "parameters": [ + "IndicatorArrow", + "Tween", + "\"Prepare\"" + ] }, { "type": { "value": "Visible" }, - "parameters": ["IndicatorArrow"] + "parameters": [ + "IndicatorArrow" + ] } ], "actions": [], @@ -9245,7 +9343,10 @@ "type": { "value": "KeyReleased" }, - "parameters": ["", "Space"] + "parameters": [ + "", + "Space" + ] }, { "type": { @@ -9287,7 +9388,10 @@ "type": { "value": "AjoutObjConcern" }, - "parameters": ["", "IndicatorArrow"] + "parameters": [ + "", + "IndicatorArrow" + ] } ], "actions": [], @@ -9323,7 +9427,9 @@ "type": { "value": "Cache" }, - "parameters": ["IndicatorArrow"] + "parameters": [ + "IndicatorArrow" + ] }, { "type": { @@ -9376,19 +9482,28 @@ "type": { "value": "Multiplayer::MultiplayerObjectBehavior::IsObjectOwnedByCurrentPlayer" }, - "parameters": ["PlayerObject", "MultiplayerObject"] + "parameters": [ + "PlayerObject", + "MultiplayerObject" + ] }, { "type": { "value": "Multiplayer::MultiplayerObjectBehavior::IsObjectOwnedByCurrentPlayer" }, - "parameters": ["IndicatorArrow", "MultiplayerObject"] + "parameters": [ + "IndicatorArrow", + "MultiplayerObject" + ] }, { "type": { "value": "Multiplayer::MultiplayerObjectBehavior::IsObjectOwnedByCurrentPlayer" }, - "parameters": ["PlayerName", "MultiplayerObject"] + "parameters": [ + "PlayerName", + "MultiplayerObject" + ] } ], "actions": [], @@ -9409,7 +9524,12 @@ "type": { "value": "Physics2::CollisionStarted" }, - "parameters": ["PlayerObject", "Physics2", "Saw", ""] + "parameters": [ + "PlayerObject", + "Physics2", + "Saw", + "" + ] } ], "actions": [ @@ -9434,13 +9554,23 @@ "type": { "value": "Physics2::LinearVelocityX" }, - "parameters": ["PlayerObject", "Physics2", "=", "0"] + "parameters": [ + "PlayerObject", + "Physics2", + "=", + "0" + ] }, { "type": { "value": "Physics2::LinearVelocityY" }, - "parameters": ["PlayerObject", "Physics2", "=", "0"] + "parameters": [ + "PlayerObject", + "Physics2", + "=", + "0" + ] }, { "type": { @@ -9487,13 +9617,23 @@ "type": { "value": "Physics2::CollisionStarted" }, - "parameters": ["PlayerObject", "Physics2", "Ground", ""] + "parameters": [ + "PlayerObject", + "Physics2", + "Ground", + "" + ] }, { "type": { "value": "Physics2::LinearVelocityLength" }, - "parameters": ["PlayerObject", "Physics2", ">", "10"] + "parameters": [ + "PlayerObject", + "Physics2", + ">", + "10" + ] } ], "actions": [ @@ -9547,7 +9687,13 @@ "type": { "value": "CollisionNP" }, - "parameters": ["PlayerObject", "PickUp", "", "", ""] + "parameters": [ + "PlayerObject", + "PickUp", + "", + "", + "" + ] } ], "actions": [ @@ -9555,7 +9701,10 @@ "type": { "value": "Delete" }, - "parameters": ["PickUp", ""] + "parameters": [ + "PickUp", + "" + ] } ], "events": [ @@ -9566,7 +9715,12 @@ "type": { "value": "SceneInstancesCount" }, - "parameters": ["", "PickUp", ">", "0"] + "parameters": [ + "", + "PickUp", + ">", + "0" + ] } ], "actions": [ @@ -9574,7 +9728,13 @@ "type": { "value": "PlaySound" }, - "parameters": ["", "PickUp", "", "75", ""] + "parameters": [ + "", + "PickUp", + "", + "75", + "" + ] }, { "type": { @@ -9601,7 +9761,12 @@ "type": { "value": "SceneInstancesCount" }, - "parameters": ["", "PickUp", "<=", "0"] + "parameters": [ + "", + "PickUp", + "<=", + "0" + ] } ], "actions": [ @@ -9609,7 +9774,13 @@ "type": { "value": "PlaySound" }, - "parameters": ["", "New sound effect", "", "100", ""] + "parameters": [ + "", + "New sound effect", + "", + "100", + "" + ] }, { "type": { @@ -9661,7 +9832,10 @@ "type": { "value": "AnimatableCapability::AnimatableBehavior::HasAnimationEnded" }, - "parameters": ["PlayerObject", "Animation"] + "parameters": [ + "PlayerObject", + "Animation" + ] } ], "actions": [ @@ -9702,7 +9876,12 @@ "type": { "value": "Physics2::LinearVelocityX" }, - "parameters": ["PlayerObject", "Physics2", ">", "5"] + "parameters": [ + "PlayerObject", + "Physics2", + ">", + "5" + ] }, { "type": { @@ -9716,7 +9895,11 @@ "type": { "value": "FlippableCapability::FlippableBehavior::FlipX" }, - "parameters": ["PlayerObject", "Flippable", ""] + "parameters": [ + "PlayerObject", + "Flippable", + "" + ] } ] }, @@ -9727,7 +9910,12 @@ "type": { "value": "Physics2::LinearVelocityX" }, - "parameters": ["PlayerObject", "Physics2", "<", "-5"] + "parameters": [ + "PlayerObject", + "Physics2", + "<", + "-5" + ] }, { "type": { @@ -9741,7 +9929,11 @@ "type": { "value": "FlippableCapability::FlippableBehavior::FlipX" }, - "parameters": ["PlayerObject", "Flippable", "yes"] + "parameters": [ + "PlayerObject", + "Flippable", + "yes" + ] } ] }, @@ -9752,7 +9944,12 @@ "type": { "value": "Physics2::LinearVelocityY" }, - "parameters": ["PlayerObject", "Physics2", "<", "-5"] + "parameters": [ + "PlayerObject", + "Physics2", + "<", + "-5" + ] } ], "actions": [ @@ -9776,7 +9973,12 @@ "type": { "value": "Physics2::LinearVelocityY" }, - "parameters": ["PlayerObject", "Physics2", ">", "5"] + "parameters": [ + "PlayerObject", + "Physics2", + ">", + "5" + ] } ], "actions": [ @@ -9862,7 +10064,9 @@ "type": { "value": "DepartScene" }, - "parameters": [""] + "parameters": [ + "" + ] } ], "actions": [ @@ -9870,13 +10074,24 @@ "type": { "value": "ZoomCamera" }, - "parameters": ["", "3", "\"Background\"", ""] + "parameters": [ + "", + "3", + "\"Background\"", + "" + ] }, { "type": { "value": "CentreCamera" }, - "parameters": ["", "Background", "", "\"Background\"", ""] + "parameters": [ + "", + "Background", + "", + "\"Background\"", + "" + ] } ] }, @@ -9900,13 +10115,21 @@ "type": { "value": "TiledSpriteObject::YOffset" }, - "parameters": ["Background", "=", "CameraCenterY()/3"] + "parameters": [ + "Background", + "=", + "CameraCenterY()/3" + ] }, { "type": { "value": "TiledSpriteObject::XOffset" }, - "parameters": ["Background", "=", "CameraCenterX()/3"] + "parameters": [ + "Background", + "=", + "CameraCenterX()/3" + ] } ] } @@ -9940,7 +10163,11 @@ "type": { "value": "Scene" }, - "parameters": ["", "\"Lobby\"", ""] + "parameters": [ + "", + "\"Lobby\"", + "" + ] } ] } @@ -10128,6 +10355,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Button states and effects", + "gdevelopVersion": "", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtdGFwLWJ1dHRvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMyA1QzE1LjIxIDUgMTcgNi43OSAxNyA5QzE3IDEwLjUgMTYuMiAxMS43NyAxNSAxMi40NlYxMS4yNEMxNS42MSAxMC42OSAxNiA5Ljg5IDE2IDlDMTYgNy4zNCAxNC42NiA2IDEzIDZTMTAgNy4zNCAxMCA5QzEwIDkuODkgMTAuMzkgMTAuNjkgMTEgMTEuMjRWMTIuNDZDOS44IDExLjc3IDkgMTAuNSA5IDlDOSA2Ljc5IDEwLjc5IDUgMTMgNU0yMCAyMC41QzE5Ljk3IDIxLjMyIDE5LjMyIDIxLjk3IDE4LjUgMjJIMTNDMTIuNjIgMjIgMTIuMjYgMjEuODUgMTIgMjEuNTdMOCAxNy4zN0w4Ljc0IDE2LjZDOC45MyAxNi4zOSA5LjIgMTYuMjggOS41IDE2LjI4SDkuN0wxMiAxOFY5QzEyIDguNDUgMTIuNDUgOCAxMyA4UzE0IDguNDUgMTQgOVYxMy40N0wxNS4yMSAxMy42TDE5LjE1IDE1Ljc5QzE5LjY4IDE2LjAzIDIwIDE2LjU2IDIwIDE3LjE0VjIwLjVNMjAgMkg0QzIuOSAyIDIgMi45IDIgNFYxMkMyIDEzLjExIDIuOSAxNCA0IDE0SDhWMTJMNCAxMkw0IDRIMjBMMjAgMTJIMThWMTRIMjBWMTMuOTZMMjAuMDQgMTRDMjEuMTMgMTQgMjIgMTMuMDkgMjIgMTJWNEMyMiAyLjkgMjEuMTEgMiAyMCAyWiIgLz48L3N2Zz4=", "name": "ButtonStates", @@ -10153,7 +10381,10 @@ "identifier": "ButtonStates", "name": "gdevelop-extension-store" }, - "tags": ["ui", "button"], + "tags": [ + "ui", + "button" + ], "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" @@ -10216,7 +10447,12 @@ "type": { "value": "ButtonStates::ButtonFSM::SetPropertyState" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] } ] }, @@ -10249,7 +10485,11 @@ "type": { "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] } ] }, @@ -10260,7 +10500,10 @@ "type": { "value": "ButtonStates::ButtonFSM::PropertyShouldCheckHovering" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] }, { "type": { @@ -10278,7 +10521,11 @@ "type": { "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -10302,8 +10549,12 @@ "type": { "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" }, - "parameters": ["Object", "Behavior", "no"] - } + "parameters": [ + "Object", + "Behavior", + "no" + ] + } ] }, { @@ -10313,7 +10564,12 @@ "type": { "value": "ButtonStates::ButtonFSM::PropertyTouchId" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] }, { "type": { @@ -10331,7 +10587,11 @@ "type": { "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -10354,7 +10614,9 @@ "type": { "value": "HasAnyTouchOrMouseStarted" }, - "parameters": [""] + "parameters": [ + "" + ] } ], "actions": [ @@ -10362,7 +10624,12 @@ "type": { "value": "ButtonStates::ButtonFSM::SetPropertyIndex" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] } ], "events": [ @@ -10501,7 +10768,10 @@ "inverted": true, "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] }, { "type": { @@ -10536,7 +10806,10 @@ "type": { "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] }, { "type": { @@ -10572,7 +10845,10 @@ "inverted": true, "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] }, { "type": { @@ -10607,7 +10883,10 @@ "type": { "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] }, { "type": { @@ -10665,7 +10944,12 @@ "type": { "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] } ], "events": [ @@ -10778,7 +11062,11 @@ "type": { "value": "ButtonStates::ButtonFSM::ResetState" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } @@ -10814,13 +11102,23 @@ "type": { "value": "ButtonStates::ButtonFSM::SetPropertyState" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] }, { "type": { "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] } ] } @@ -10854,7 +11152,12 @@ "type": { "value": "ButtonStates::ButtonFSM::PropertyState" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] } ], "actions": [ @@ -10862,7 +11165,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -10896,7 +11201,12 @@ "type": { "value": "ButtonStates::ButtonFSM::PropertyState" }, - "parameters": ["Object", "Behavior", "=", "\"Validated\""] + "parameters": [ + "Object", + "Behavior", + "=", + "\"Validated\"" + ] } ], "actions": [ @@ -10904,7 +11214,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -10938,7 +11250,12 @@ "type": { "value": "ButtonStates::ButtonFSM::PropertyState" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -10946,7 +11263,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -10980,7 +11299,12 @@ "type": { "value": "ButtonStates::ButtonFSM::PropertyState" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -10988,7 +11312,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] }, @@ -11012,7 +11338,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -11059,7 +11387,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -11106,7 +11436,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -11141,7 +11473,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyTouchId()"] + "parameters": [ + "Object.Behavior::PropertyTouchId()" + ] } ] } @@ -11171,8 +11505,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -11180,8 +11512,6 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", "extraInformation": [ "Idle", "Hovered", @@ -11196,9 +11526,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -11206,9 +11533,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -11216,9 +11540,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -11226,9 +11547,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -11363,13 +11681,22 @@ "type": { "value": "ButtonStates::ButtonObjectEffects::PropertyIdleEffect" }, - "parameters": ["Object", "Behavior", "!=", "\"\""] + "parameters": [ + "Object", + "Behavior", + "!=", + "\"\"" + ] }, { "type": { "value": "ButtonStates::ButtonFSM::IsIdle" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -11393,13 +11720,22 @@ "type": { "value": "ButtonStates::ButtonObjectEffects::PropertyFocusedEffect" }, - "parameters": ["Object", "Behavior", "!=", "\"\""] + "parameters": [ + "Object", + "Behavior", + "!=", + "\"\"" + ] }, { "type": { "value": "ButtonStates::ButtonFSM::IsFocused" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -11423,13 +11759,22 @@ "type": { "value": "ButtonStates::ButtonObjectEffects::PropertyPressedEffect" }, - "parameters": ["Object", "Behavior", "!=", "\"\""] + "parameters": [ + "Object", + "Behavior", + "!=", + "\"\"" + ] }, { "type": { "value": "ButtonStates::ButtonFSM::IsPressed" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -11481,7 +11826,9 @@ "type": { "value": "SetReturnString" }, - "parameters": ["Object.Behavior::PropertyIdleEffect()"] + "parameters": [ + "Object.Behavior::PropertyIdleEffect()" + ] } ] } @@ -11560,7 +11907,9 @@ "type": { "value": "SetReturnString" }, - "parameters": ["Object.Behavior::PropertyFocusedEffect()"] + "parameters": [ + "Object.Behavior::PropertyFocusedEffect()" + ] } ] } @@ -11639,7 +11988,9 @@ "type": { "value": "SetReturnString" }, - "parameters": ["Object.Behavior::PropertyPressedEffect()"] + "parameters": [ + "Object.Behavior::PropertyPressedEffect()" + ] } ] } @@ -11708,27 +12059,25 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", - "extraInformation": ["ButtonStates::ButtonFSM"], + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", - "extraInformation": ["EffectCapability::EffectBehavior"], + "extraInformation": [ + "EffectCapability::EffectBehavior" + ], "name": "Effect" }, { "value": "", "type": "String", "label": "Idle state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "IdleEffect" }, { @@ -11737,16 +12086,13 @@ "label": "Focused state effect", "description": "The state is Focused when the button is hovered or held outside.", "group": "Effects", - "extraInformation": [], "name": "FocusedEffect" }, { "value": "", "type": "String", "label": "Pressed state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "PressedEffect" } ], @@ -11820,7 +12166,11 @@ "type": { "value": "ButtonStates::ButtonFSM::IsIdle" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -11844,7 +12194,11 @@ "type": { "value": "ButtonStates::ButtonFSM::IsFocused" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -11868,7 +12222,11 @@ "type": { "value": "ButtonStates::ButtonFSM::IsPressed" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -12160,18 +12518,16 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", - "extraInformation": ["ButtonStates::ButtonFSM"], + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], "name": "ButtonFSM" }, { "value": "Idle", "type": "String", "label": "Idle state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "IdleAnimationName" }, { @@ -12180,16 +12536,13 @@ "label": "Focused state animation name", "description": "The state is Focused when the button is hovered or held outside.", "group": "Animation", - "extraInformation": [], "name": "FocusedAnimationName" }, { "value": "Pressed", "type": "String", "label": "Pressed state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "PressedAnimationName" } ], @@ -12262,13 +12615,22 @@ "type": { "value": "ButtonStates::ButtonFSM::IsIdle" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] }, { "type": { "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" }, - "parameters": ["Object", "Behavior", "!=", "\"Idle\""] + "parameters": [ + "Object", + "Behavior", + "!=", + "\"Idle\"" + ] } ], "actions": [ @@ -12276,7 +12638,12 @@ "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] }, { "type": { @@ -12298,7 +12665,11 @@ "type": { "value": "ButtonStates::ButtonFSM::IsFocused" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] } ], "actions": [], @@ -12392,7 +12763,11 @@ "type": { "value": "ButtonStates::ButtonFSM::IsPressed" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] }, { "type": { @@ -12577,13 +12952,23 @@ "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] }, { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" }, - "parameters": ["Object", "Behavior", "=", "\"FadeIn\""] + "parameters": [ + "Object", + "Behavior", + "=", + "\"FadeIn\"" + ] }, { "type": { @@ -12645,13 +13030,23 @@ "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] }, { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" }, - "parameters": ["Object", "Behavior", "=", "\"FadeOut\""] + "parameters": [ + "Object", + "Behavior", + "=", + "\"FadeOut\"" + ] }, { "type": { @@ -12765,7 +13160,12 @@ "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" }, - "parameters": ["Object", "Behavior", "=", "\"NoTween\""] + "parameters": [ + "Object", + "Behavior", + "=", + "\"NoTween\"" + ] }, { "type": { @@ -12841,7 +13241,9 @@ "type": { "value": "SetReturnString" }, - "parameters": ["Object.Behavior::PropertyEffectName()"] + "parameters": [ + "Object.Behavior::PropertyEffectName()" + ] } ] } @@ -12984,7 +13386,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyIdleValue()"] + "parameters": [ + "Object.Behavior::PropertyIdleValue()" + ] } ] } @@ -13063,7 +13467,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyFocusedValue()"] + "parameters": [ + "Object.Behavior::PropertyFocusedValue()" + ] } ] } @@ -13142,7 +13548,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyPressedValue()"] + "parameters": [ + "Object.Behavior::PropertyPressedValue()" + ] } ] } @@ -13221,7 +13629,9 @@ "type": { "value": "SetReturnString" }, - "parameters": ["Object.Behavior::PropertyFadeInEasing()"] + "parameters": [ + "Object.Behavior::PropertyFadeInEasing()" + ] } ] } @@ -13301,7 +13711,9 @@ "type": { "value": "SetReturnString" }, - "parameters": ["Object.Behavior::PropertyFadeOutEasing()"] + "parameters": [ + "Object.Behavior::PropertyFadeOutEasing()" + ] } ] } @@ -13533,27 +13945,25 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", - "extraInformation": ["ButtonStates::ButtonFSM"], + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", - "extraInformation": ["EffectCapability::EffectBehavior"], + "extraInformation": [ + "EffectCapability::EffectBehavior" + ], "name": "Effect" }, { "value": "Effect", "type": "String", "label": "Effect name", - "description": "", "group": "Effect", - "extraInformation": [], "name": "EffectName" }, { @@ -13562,16 +13972,13 @@ "label": "Effect parameter", "description": "The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", "group": "Effect", - "extraInformation": [], "name": "EffectProperty" }, { "value": "0", "type": "Number", "label": "Idle effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], "name": "IdleValue" }, { @@ -13580,23 +13987,19 @@ "label": "Focused effect parameter value", "description": "The state is Focused when the button is hovered or held outside.", "group": "Value", - "extraInformation": [], "name": "FocusedValue" }, { "value": "0", "type": "Number", "label": "Pressed effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], "name": "PressedValue" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -13639,7 +14042,6 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -13683,9 +14085,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -13693,18 +14093,18 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": ["Idle", "Focused", "Pressed"], + "extraInformation": [ + "Idle", + "Focused", + "Pressed" + ], "hidden": true, "name": "PreviousState" }, @@ -13712,9 +14112,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenInitialValue" }, @@ -13722,9 +14119,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTargetedValue" }, @@ -13732,9 +14126,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTime" }, @@ -13742,9 +14133,11 @@ "value": "NoTween", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": ["NoTween", "FadeIn", "FadeOut"], + "extraInformation": [ + "NoTween", + "FadeIn", + "FadeOut" + ], "hidden": true, "name": "TweenState" }, @@ -13752,9 +14145,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "EffectValue" } @@ -13829,13 +14219,22 @@ "type": { "value": "ButtonStates::ButtonFSM::IsIdle" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] }, { "type": { "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" }, - "parameters": ["Object", "Behavior", "!=", "\"Idle\""] + "parameters": [ + "Object", + "Behavior", + "!=", + "\"Idle\"" + ] } ], "actions": [ @@ -13843,7 +14242,12 @@ "type": { "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] }, { "type": { @@ -13865,7 +14269,11 @@ "type": { "value": "ButtonStates::ButtonFSM::IsFocused" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] } ], "actions": [], @@ -13959,7 +14367,11 @@ "type": { "value": "ButtonStates::ButtonFSM::IsPressed" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] }, { "type": { @@ -14136,7 +14548,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyIdleScale()"] + "parameters": [ + "Object.Behavior::PropertyIdleScale()" + ] } ] } @@ -14217,7 +14631,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyFocusedScale()"] + "parameters": [ + "Object.Behavior::PropertyFocusedScale()" + ] } ] } @@ -14298,7 +14714,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyPressedScale()"] + "parameters": [ + "Object.Behavior::PropertyPressedScale()" + ] } ] } @@ -14545,7 +14963,9 @@ "type": { "value": "SetReturnString" }, - "parameters": ["Object.Behavior::PropertyFadeInEasing()"] + "parameters": [ + "Object.Behavior::PropertyFadeInEasing()" + ] } ] } @@ -14627,7 +15047,9 @@ "type": { "value": "SetReturnString" }, - "parameters": ["Object.Behavior::PropertyFadeOutEasing()"] + "parameters": [ + "Object.Behavior::PropertyFadeOutEasing()" + ] } ] } @@ -14699,18 +15121,18 @@ "value": "", "type": "Behavior", "label": "Button states behavior (required)", - "description": "", - "group": "", - "extraInformation": ["ButtonStates::ButtonFSM"], - "name": "ButtonFSM" + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween behavior (required)", - "description": "", - "group": "", - "extraInformation": ["Tween::TweenBehavior"], + "extraInformation": [ + "Tween::TweenBehavior" + ], "name": "Tween" }, { @@ -14718,9 +15140,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Idle state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "IdleScale" }, { @@ -14730,7 +15150,6 @@ "label": "Focused state size scale", "description": "The state is Focused when the button is hovered or held outside.", "group": "Size", - "extraInformation": [], "name": "FocusedScale" }, { @@ -14738,9 +15157,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -14748,9 +15165,7 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { @@ -14758,16 +15173,13 @@ "type": "Number", "unit": "Dimensionless", "label": "Pressed state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "PressedScale" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -14810,7 +15222,6 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -14853,9 +15264,11 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": ["Idle", "Focused", "Pressed"], + "extraInformation": [ + "Idle", + "Focused", + "Pressed" + ], "hidden": true, "name": "PreviousState" } @@ -14928,13 +15341,22 @@ "type": { "value": "ButtonStates::ButtonFSM::IsIdle" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] }, { "type": { "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" }, - "parameters": ["Object", "Behavior", "!=", "\"Idle\""] + "parameters": [ + "Object", + "Behavior", + "!=", + "\"Idle\"" + ] } ], "actions": [ @@ -14942,7 +15364,12 @@ "type": { "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] }, { "type": { @@ -14964,7 +15391,11 @@ "type": { "value": "ButtonStates::ButtonFSM::IsFocused" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] } ], "actions": [], @@ -15058,7 +15489,11 @@ "type": { "value": "ButtonStates::ButtonFSM::IsPressed" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] }, { "type": { @@ -15233,7 +15668,9 @@ "type": { "value": "SetReturnString" }, - "parameters": ["Object.Behavior::PropertyIdleColorTint()"] + "parameters": [ + "Object.Behavior::PropertyIdleColorTint()" + ] } ] } @@ -15646,7 +16083,9 @@ "type": { "value": "SetReturnString" }, - "parameters": ["Object.Behavior::PropertyFadeInEasing()"] + "parameters": [ + "Object.Behavior::PropertyFadeInEasing()" + ] } ] } @@ -15728,7 +16167,9 @@ "type": { "value": "SetReturnString" }, - "parameters": ["Object.Behavior::PropertyFadeOutEasing()"] + "parameters": [ + "Object.Behavior::PropertyFadeOutEasing()" + ] } ] } @@ -15800,27 +16241,25 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", - "extraInformation": ["ButtonStates::ButtonFSM"], + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween", - "description": "", - "group": "", - "extraInformation": ["Tween::TweenBehavior"], + "extraInformation": [ + "Tween::TweenBehavior" + ], "name": "Tween" }, { "value": "255;255;255", "type": "Color", "label": "Idle state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "IdleColorTint" }, { @@ -15829,16 +16268,13 @@ "label": "Focused state color tint", "description": "The state is Focused when the button is hovered or held outside.", "group": "Color", - "extraInformation": [], "name": "FocusedColorTint" }, { "value": "64;64;64", "type": "Color", "label": "Pressed state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "PressedColorTint" }, { @@ -15846,9 +16282,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -15856,16 +16290,13 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -15908,7 +16339,6 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -15951,9 +16381,11 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": ["Idle", "Focused", "Pressed"], + "extraInformation": [ + "Idle", + "Focused", + "Pressed" + ], "hidden": true, "name": "PreviousState" } @@ -15968,12 +16400,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", + "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.4.4", + "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.", "", @@ -15983,8 +16416,19 @@ "identifier": "PanelSpriteButton", "name": "gdevelop-extension-store" }, - "tags": ["button", "ui"], - "authorIds": ["IWykYNRvhCZBN3vEgKEbBPOR3Oc2"], + "tags": [ + "button", + "ui" + ], + "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": [], @@ -16029,11 +16473,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -16042,9 +16485,13 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] } ] }, @@ -16075,9 +16522,13 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "MouseIsInside", + "False", + "" + ] } ] }, @@ -16086,9 +16537,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] }, { "type": { @@ -16104,9 +16559,13 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "MouseIsInside", + "True", + "" + ] } ] }, @@ -16128,9 +16587,13 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "TouchIsInside", + "False", + "" + ] } ] }, @@ -16139,9 +16602,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "TouchId", + "!=", + "0" + ] }, { "type": { @@ -16149,17 +16616,21 @@ }, "parameters": [ "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "TouchIsInside", + "True", + "" + ] } ] } @@ -16182,15 +16653,21 @@ "type": { "value": "HasAnyTouchOrMouseStarted" }, - "parameters": [""] + "parameters": [ + "" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Index", + "=", + "0" + ] } ], "events": [ @@ -16209,31 +16686,30 @@ }, "parameters": [ "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -16275,11 +16751,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -16294,11 +16769,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -16327,17 +16801,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "MouseIsInside", + "True", + "" + ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -16346,11 +16823,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -16362,17 +16838,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "MouseIsInside", + "True", + "" + ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -16381,11 +16860,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -16398,17 +16876,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "TouchIsInside", + "True", + "" + ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -16417,11 +16898,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -16433,17 +16913,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "TouchIsInside", + "True", + "" + ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -16452,11 +16935,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -16484,16 +16966,20 @@ }, "parameters": [ "", - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "TouchId", + "=", + "0" + ] } ], "events": [ @@ -16502,11 +16988,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -16515,11 +17000,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -16532,11 +17016,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -16544,11 +17027,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -16557,11 +17039,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -16606,7 +17087,11 @@ "type": { "value": "PanelSpriteButton::ButtonFSM::ResetState" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } @@ -16640,15 +17125,23 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "TouchId", + "=", + "0" + ] } ] } @@ -16680,9 +17173,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] } ], "actions": [ @@ -16690,7 +17187,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -16722,9 +17221,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Validated\""] + "parameters": [ + "State", + "=", + "\"Validated\"" + ] } ], "actions": [ @@ -16732,7 +17235,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -16764,9 +17269,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -16774,7 +17283,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -16806,9 +17317,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -16816,7 +17331,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] }, @@ -16825,11 +17342,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -16840,7 +17356,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -16872,11 +17390,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -16887,7 +17404,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -16919,11 +17438,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -16934,7 +17452,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -16969,7 +17489,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyTouchId()"] + "parameters": [ + "TouchId" + ] } ] } @@ -16999,8 +17521,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -17008,8 +17528,6 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", "extraInformation": [ "Idle", "Hovered", @@ -17024,9 +17542,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -17034,9 +17549,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -17044,9 +17556,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -17054,9 +17563,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -17066,7 +17572,7 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 64, + "areaMaxX": 256, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, @@ -17075,68 +17581,265 @@ "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", - "eventsFunctions": [ + "objects": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." - }, + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": ["", "Idle", "0", "0", ""] - }, - { - "type": { - "value": "Create" - }, - "parameters": ["", "Hovered", "0", "0", ""] - }, - { - "type": { - "value": "Create" - }, - "parameters": ["", "Pressed", "0", "0", ""] - }, - { - "type": { - "value": "Cache" - }, - "parameters": ["Hovered"] - }, - { - "type": { - "value": "Cache" - }, - "parameters": ["Pressed"] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": ["Hovered", "=", "1"] - } - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 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": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": 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": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -17147,7 +17850,7 @@ "textG": 0, "textR": 0 }, - "comment": "Place the label over the backgrounds." + "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." }, { "type": "BuiltinCommonInstructions::Standard", @@ -17157,25 +17860,94 @@ "type": { "value": "Create" }, - "parameters": ["", "Label", "0", "0", ""] + "parameters": [ + "", + "Hovered", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Pressed", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Hovered", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Pressed", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] }, { "type": { "value": "ChangePlan" }, - "parameters": ["Label", "=", "2"] + "parameters": [ + "Hovered", + "=", + "1" + ] }, { "type": { - "value": "TextObject::SetWrapping" + "value": "ChangePlan" }, - "parameters": ["Label", "yes"] + "parameters": [ + "Pressed", + "=", + "1" + ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, - "parameters": ["Object", ""] + "parameters": [ + "Label", + "Text", + "=", + "LabelText" + ] } ] } @@ -17211,15 +17983,47 @@ "name": "onHotReloading", "sentence": "", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + }, + "parameters": [ + "Object", + "=", + "PressedLabelOffsetY", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, - "parameters": ["Object", ""] + "parameters": [ + "Label", + "Text", + "=", + "LabelText" + ] } ] } @@ -17268,7 +18072,10 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::IsIdle" }, - "parameters": ["Object", "ButtonFSM"] + "parameters": [ + "Object", + "ButtonFSM" + ] }, { "type": { @@ -17280,25 +18087,31 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { "type": { "value": "Montre" }, - "parameters": ["Idle", ""] + "parameters": [ + "Idle", + "" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Pressed"] + "parameters": [ + "Pressed" + ] } ], "events": [ @@ -17309,19 +18122,25 @@ "type": { "value": "Visible" }, - "parameters": ["Hovered"] + "parameters": [ + "Hovered" + ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, - "parameters": ["Object", ">", "0"] + "parameters": [ + "HoveredFadeOutDuration", + ">", + "0" + ] } ], "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -17329,7 +18148,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -17340,9 +18159,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, - "parameters": ["Object", "=", "0"] + "parameters": [ + "HoveredFadeOutDuration", + "=", + "0" + ] } ], "actions": [ @@ -17350,7 +18173,9 @@ "type": { "value": "Cache" }, - "parameters": ["Hovered"] + "parameters": [ + "Hovered" + ] } ] } @@ -17361,9 +18186,14 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, - "parameters": ["Hovered", "=", "0"] + "parameters": [ + "Hovered", + "Opacity", + "=", + "0" + ] } ], "actions": [ @@ -17371,13 +18201,20 @@ "type": { "value": "Cache" }, - "parameters": ["Hovered"] + "parameters": [ + "Hovered" + ] }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, - "parameters": ["Hovered", "=", "255"] + "parameters": [ + "Hovered", + "Opacity", + "=", + "255" + ] } ] }, @@ -17388,7 +18225,10 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" }, - "parameters": ["Object", "ButtonFSM"] + "parameters": [ + "Object", + "ButtonFSM" + ] }, { "type": { @@ -17400,43 +18240,60 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { "type": { "value": "Cache" }, - "parameters": ["Idle"] + "parameters": [ + "Idle" + ] }, { "type": { "value": "Montre" }, - "parameters": ["Hovered", ""] + "parameters": [ + "Hovered", + "" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Pressed"] + "parameters": [ + "Pressed" + ] }, { "type": { "value": "Tween::RemoveTween" }, - "parameters": ["Hovered", "Tween", "\"Fadeout\""] + "parameters": [ + "Hovered", + "Tween", + "\"Fadeout\"" + ] }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, - "parameters": ["Hovered", "=", "255"] + "parameters": [ + "Hovered", + "Opacity", + "=", + "255" + ] } ] }, @@ -17447,7 +18304,10 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" }, - "parameters": ["Object", "ButtonFSM"] + "parameters": [ + "Object", + "ButtonFSM" + ] }, { "type": { @@ -17459,31 +18319,39 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { "type": { "value": "Cache" }, - "parameters": ["Idle"] + "parameters": [ + "Idle" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Hovered"] + "parameters": [ + "Hovered" + ] }, { "type": { "value": "Montre" }, - "parameters": ["Pressed", ""] + "parameters": [ + "Pressed", + "" + ] } ] }, @@ -17494,7 +18362,10 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::IsFocused" }, - "parameters": ["Object", "ButtonFSM"] + "parameters": [ + "Object", + "ButtonFSM" + ] }, { "type": { @@ -17506,139 +18377,39 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { "type": { "value": "Cache" }, - "parameters": ["Idle"] - }, - { - "type": { - "value": "Montre" - }, - "parameters": ["Hovered", ""] - }, - { - "type": { - "value": "Cache" - }, - "parameters": ["Pressed"] - } - ] - } - ], - "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": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": ["Idle", "Width", "=", "Object.Width()"] - }, - { - "type": { - "value": "ModVarObjet" - }, "parameters": [ - "Idle", - "Height", - "=", - "Object.Height()" + "Idle" ] }, { "type": { - "value": "PanelSpriteButton::Scale" - }, - "parameters": ["Object", "=", "1"] - }, - { - "type": { - "value": "PanelSpriteObject::Width" + "value": "Montre" }, "parameters": [ - "Background", - "=", - "Idle.Variable(Width)" + "Hovered", + "" ] }, { "type": { - "value": "PanelSpriteObject::Height" + "value": "Cache" }, "parameters": [ - "Background", - "=", - "Idle.Variable(Height)" + "Pressed" ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": ["Object", ""] } ] } @@ -17654,22 +18425,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -17685,7 +18441,11 @@ "type": { "value": "PanelSpriteButton::ButtonFSM::IsIdle" }, - "parameters": ["Idle", "ButtonFSM", ""] + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -17693,7 +18453,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -17722,7 +18484,11 @@ "type": { "value": "PanelSpriteButton::ButtonFSM::IsClicked" }, - "parameters": ["Idle", "ButtonFSM", ""] + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -17730,7 +18496,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -17759,7 +18527,11 @@ "type": { "value": "PanelSpriteButton::ButtonFSM::IsHovered" }, - "parameters": ["Idle", "ButtonFSM", ""] + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -17767,7 +18539,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -17796,7 +18570,11 @@ "type": { "value": "PanelSpriteButton::ButtonFSM::IsFocused" }, - "parameters": ["Idle", "ButtonFSM", ""] + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -17804,7 +18582,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -17833,7 +18613,11 @@ "type": { "value": "PanelSpriteButton::ButtonFSM::IsPressed" }, - "parameters": ["Idle", "ButtonFSM", ""] + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -17841,7 +18625,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -17861,6 +18647,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -17869,19 +18656,14 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", - "GetArgumentAsString(\"LabelText\")" + "Value" ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": ["Object", ""] } ] } @@ -17895,17 +18677,17 @@ }, { "description": "Text", - "name": "LabelText", + "name": "Value", "type": "string" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", "sentence": "", "events": [ { @@ -17914,16 +18696,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, - "parameters": ["Label.String()"] + "parameters": [ + "Label", + "Text", + "=", + "Value" + ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -17935,12 +18719,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", @@ -17948,17 +18731,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Label.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -17971,65 +18754,35 @@ "objectGroups": [] }, { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" - ] - }, + "conditions": [ { "type": { - "value": "TextObject::WrappingWidth" + "value": "BooleanVariable" }, "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" + "ShouldActivate", + "True", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "SetCenterY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } + "Idle", + "ButtonFSM", + "yes" ] } ] @@ -18039,20 +18792,25 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "inverted": true, + "value": "BooleanVariable" }, - "parameters": ["Object", ""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "MettreY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" + "Idle", + "ButtonFSM", + "no" ] } ] @@ -18064,110 +18822,124 @@ "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - } - ], - "objectGroups": [ + }, { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" } - ] + ], + "objectGroups": [] }, { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BehaviorActivated" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "Idle", + "ButtonFSM" + ] } ], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnBoolean" }, - "parameters": ["Idle", "ButtonFSM", "yes"] + "parameters": [ + "True" + ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": ["\"ShouldActivate\""] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnNumber" }, - "parameters": ["Idle", "ButtonFSM", "no"] + "parameters": [ + "LabelOffset" + ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - }, - { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "BehaviorActivated" + "value": "SetCenterY" }, - "parameters": ["Idle", "ButtonFSM"] - } - ], - "actions": [ + "parameters": [ + "Label", + "+", + "Value - LabelOffset" + ] + }, { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, - "parameters": ["True"] + "parameters": [ + "LabelOffset", + "=", + "Value" + ] } ] } @@ -18185,218 +18957,851 @@ ], "propertyDescriptors": [ { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "name": "PressedLabelOffsetY" - }, - { - "value": "0", - "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": ["Label"], - "name": "LeftPadding" + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" }, { - "value": "0", + "value": "0.25", "type": "Number", - "label": "Right padding", - "description": "", - "group": "Padding", - "extraInformation": ["Label"], - "name": "RightPadding" + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" }, { "value": "0", "type": "Number", - "label": "Top padding", - "description": "", - "group": "Padding", - "extraInformation": ["Label"], - "name": "TopPadding" + "unit": "Pixel", + "label": "Label offset on Y axis when pressed", + "group": "States", + "name": "PressedLabelOffsetY" }, { "value": "0", "type": "Number", - "label": "Bottom padding", - "description": "", - "group": "Padding", - "extraInformation": ["Label"], - "name": "BottomPadding" - }, - { - "value": "0.25", - "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], - "name": "HoveredFadeOutDuration" - } - ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 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": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": "0;0;0" - } + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "value": "", + "type": "Choice", + "label": "", + "extraInformation": [ + "Label.Text=LabelText" + ], + "hidden": true, + "name": "_PropertyMapping" + } + ], + "variants": [ + { + "areaMaxX": 192, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Big Floating Out Button Dark Blue", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "Button", + "font": "CarterOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 60, + "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": "Button", + "font": "CarterOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 60, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Idle", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Idle.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Hovered", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Hovered.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Pressed", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Pressed.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] } ], - "effects": [], - "behaviors": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 57, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "dfb1b714-aad7-4c68-9234-531c340769cd", + "width": 186, + "x": 3, + "y": 31, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ] }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + "areaMaxX": 192, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Small Floating Out Button Dark Blue", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "Button", + "font": "CarterOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 30, + "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": "Button", + "font": "CarterOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 30, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Idle", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Idle.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, { - "name": "Tween", - "type": "Tween::TweenBehavior" + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Hovered", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Hovered.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Pressed", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Pressed.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 57, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "dfb1b714-aad7-4c68-9234-531c340769cd", + "width": 186, + "x": 3, + "y": 31, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ] }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Idle" - }, - { - "objectName": "Hovered" + "areaMaxX": 192, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "d00645a899e762e085fa6fdf2625701baea9cc10ee903a64ca7d371e5bbb8dca", + "assetStoreOriginalName": "Floating Out Button Dark Blue", + "name": "Floating Out Button Dark Blue", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "Button", + "font": "CarterOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "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": "Button", + "font": "CarterOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Idle", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Idle.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Hovered", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Hovered.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Pressed", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Pressed.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] }, - { - "objectName": "Pressed" - } - ] - }, - "objectsGroups": [], - "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": [ + "objectsGroups": [ { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] } ], - "effects": [] + "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": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 57, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "dfb1b714-aad7-4c68-9234-531c340769cd", + "width": 186, + "x": 3, + "y": 31, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] } - ], - "instances": [] + ] } ] }, @@ -18405,6 +19810,7 @@ "category": "Visual effect", "extensionNamespace": "", "fullName": "Shake object", + "gdevelopVersion": "", "helpPath": "https://victrisgames.itch.io/gdevelop-camera-shake-example", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFycm93LWFsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMywxMUgxOEwxNi41LDkuNUwxNy45Miw4LjA4TDIxLjg0LDEyTDE3LjkyLDE1LjkyTDE2LjUsMTQuNUwxOCwxM0gxM1YxOEwxNC41LDE2LjVMMTUuOTIsMTcuOTJMMTIsMjEuODRMOC4wOCwxNy45Mkw5LjUsMTYuNUwxMSwxOFYxM0g2TDcuNSwxNC41TDYuMDgsMTUuOTJMMi4xNiwxMkw2LjA4LDguMDhMNy41LDkuNUw2LDExSDExVjZMOS41LDcuNUw4LjA4LDYuMDhMMTIsMi4xNkwxNS45Miw2LjA4TDE0LjUsNy41TDEzLDZWMTFaIiAvPjwvc3ZnPg==", "name": "ShakeObject", @@ -18435,7 +19841,9 @@ "rotate", "angle" ], - "authorIds": ["gqDaZjCfevOOxBYkK6zlhtZnXCg1"], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], "dependencies": [], "globalVariables": [], "sceneVariables": [], @@ -18598,7 +20006,9 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": ["\"ShakeForever\""] + "parameters": [ + "\"ShakeForever\"" + ] } ], "actions": [ @@ -20335,7 +21745,11 @@ "type": { "value": "ShakeObject::ShakeObject_PositionAngle::IsShaking" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ @@ -20395,7 +21809,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -20587,7 +22003,9 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": ["\"ShakeForever\""] + "parameters": [ + "\"ShakeForever\"" + ] } ], "actions": [ @@ -22697,7 +24115,11 @@ "type": { "value": "ShakeObject::ShakeObject_PositionAngleScale::IsShaking" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ @@ -22758,7 +24180,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -22791,6 +24215,7 @@ "category": "Camera", "extensionNamespace": "", "fullName": "Smooth Camera", + "gdevelopVersion": "", "helpPath": "/tutorials/follow-player-with-camera/", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjQsMTNoLTZjLTEuMSwwLTItMC45LTItMlY1YzAtMS4xLDAuOS0yLDItMmg2YzEuMSwwLDIsMC45LDIsMnY2QzI2LDEyLjEsMjUuMSwxMywyNCwxM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNiw4djEwYzAsMS4xLTAuOSwyLTIsMkg4Yy0xLjEsMC0yLTAuOS0yLTJWOGMwLTEuMSwwLjktMiwyLTJoOCIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjEiIGN5PSI4IiByPSIyIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxMSIgY3k9IjE2IiByPSIxIi8+DQo8cmVjdCB4PSI5IiB5PSI5IiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMSwyOSAyMSwyOSAxMSwyOSAxMSwyOSAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE4LDIwIDE4LDI5IDE0LDI5IDE0LDIwICIvPg0KPHJlY3QgeD0iNyIgeT0iMyIgY2xhc3M9InN0MCIgd2lkdGg9IjQiIGhlaWdodD0iMyIvPg0KPC9zdmc+DQo=", "name": "SmoothCamera", @@ -22820,7 +24245,9 @@ "platformer", "platform" ], - "authorIds": ["IWykYNRvhCZBN3vEgKEbBPOR3Oc2"], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], "dependencies": [], "globalVariables": [], "sceneVariables": [], @@ -23029,7 +24456,10 @@ "inverted": true, "value": "SmoothCamera::SmoothCamera::PropertyIsCalledManually" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -23037,7 +24467,11 @@ "type": { "value": "SmoothCamera::SmoothCamera::DoMoveCameraCloser" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } @@ -23084,13 +24518,21 @@ "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyIsCalledManually" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] }, { "type": { "value": "SmoothCamera::SmoothCamera::DoMoveCameraCloser" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } @@ -23138,13 +24580,21 @@ "type": { "value": "SmoothCamera::SmoothCamera::UpdateDelayedPosition" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "value": "SmoothCamera::SmoothCamera::UpdateForecastedPosition" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] }, @@ -23167,7 +24617,10 @@ "type": { "value": "SmoothCamera::SmoothCamera::PropertyFollowOnX" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -23321,7 +24774,10 @@ "type": { "value": "SmoothCamera::SmoothCamera::PropertyFollowOnY" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -23621,7 +25077,11 @@ "type": { "value": "PrimitiveDrawing::FillOpacity" }, - "parameters": ["ShapePainter", "=", "0"] + "parameters": [ + "ShapePainter", + "=", + "0" + ] } ] }, @@ -23653,13 +25113,21 @@ "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] }, { "type": { "value": "PrimitiveDrawing::OutlineColor" }, - "parameters": ["ShapePainter", "\"245;166;35\""] + "parameters": [ + "ShapePainter", + "\"245;166;35\"" + ] }, { "type": { @@ -23692,7 +25160,12 @@ "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" }, - "parameters": ["Object", "Behavior", "+", "1"] + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] } ] }, @@ -23704,7 +25177,9 @@ "type": { "value": "PrimitiveDrawing::EndFillPath" }, - "parameters": ["ShapePainter"] + "parameters": [ + "ShapePainter" + ] } ] } @@ -23735,25 +25210,45 @@ "type": { "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaLeft" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] }, { "type": { "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaRight" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] }, { "type": { "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaTop" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] }, { "type": { "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaBottom" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] } ] } @@ -23763,7 +25258,10 @@ "type": { "value": "PrimitiveDrawing::OutlineColor" }, - "parameters": ["ShapePainter", "\"126;211;33\""] + "parameters": [ + "ShapePainter", + "\"126;211;33\"" + ] }, { "type": { @@ -23799,7 +25297,10 @@ "type": { "value": "PrimitiveDrawing::OutlineColor" }, - "parameters": ["ShapePainter", "\"208;2;27\""] + "parameters": [ + "ShapePainter", + "\"208;2;27\"" + ] }, { "type": { @@ -23912,7 +25413,11 @@ "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] }, @@ -23923,7 +25428,9 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": ["\"FollowOnX\""] + "parameters": [ + "\"FollowOnX\"" + ] } ], "actions": [ @@ -23931,7 +25438,11 @@ "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -23972,7 +25483,11 @@ "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] }, @@ -23983,7 +25498,9 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": ["\"FollowOnY\""] + "parameters": [ + "\"FollowOnY\"" + ] } ], "actions": [ @@ -23991,7 +25508,11 @@ "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -24628,7 +26149,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyCameraOffsetX()"] + "parameters": [ + "Object.Behavior::PropertyCameraOffsetX()" + ] } ] } @@ -24767,7 +26290,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyCameraOffsetY()"] + "parameters": [ + "Object.Behavior::PropertyCameraOffsetY()" + ] } ] } @@ -25178,7 +26703,11 @@ "type": { "value": "SmoothCamera::SmoothCamera::IsWaiting" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { @@ -25272,7 +26801,11 @@ "inverted": true, "value": "SmoothCamera::SmoothCamera::IsDelayed" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ @@ -25304,13 +26837,21 @@ "type": { "value": "SmoothCamera::SmoothCamera::IsDelayed" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "value": "SmoothCamera::SmoothCamera::IsWaiting" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } @@ -25519,7 +27060,11 @@ "type": { "value": "SmoothCamera::SmoothCamera::IsWaiting" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ @@ -25607,14 +27152,22 @@ "inverted": true, "value": "SmoothCamera::SmoothCamera::IsDelayed" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "inverted": true, "value": "SmoothCamera::SmoothCamera::IsWaiting" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ @@ -25622,19 +27175,28 @@ "type": { "value": "ObjectVariableClearChildren" }, - "parameters": ["Object", "__SmoothCamera.ObjectTime"] + "parameters": [ + "Object", + "__SmoothCamera.ObjectTime" + ] }, { "type": { "value": "ObjectVariableClearChildren" }, - "parameters": ["Object", "__SmoothCamera.ObjectX"] + "parameters": [ + "Object", + "__SmoothCamera.ObjectX" + ] }, { "type": { "value": "ObjectVariableClearChildren" }, - "parameters": ["Object", "__SmoothCamera.ObjectY"] + "parameters": [ + "Object", + "__SmoothCamera.ObjectY" + ] } ] }, @@ -25646,7 +27208,11 @@ "inverted": true, "value": "SmoothCamera::SmoothCamera::IsWaiting" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { @@ -25696,13 +27262,22 @@ "inverted": true, "value": "SmoothCamera::SmoothCamera::IsWaiting" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "value": "SmoothCamera::SmoothCamera::PropertyCameraExtraDelay" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] } ], "actions": [ @@ -25781,7 +27356,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -25870,7 +27447,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -25912,13 +27491,23 @@ "type": { "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] }, { "type": { "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] } ] } @@ -26133,13 +27722,23 @@ "type": { "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] }, { "type": { "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] } ] } @@ -26163,13 +27762,23 @@ "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] } ] }, @@ -26193,7 +27802,12 @@ "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" }, - "parameters": ["Object", "Behavior", "+", "1"] + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] } ] }, @@ -26234,13 +27848,23 @@ "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] } ] }, @@ -26264,7 +27888,12 @@ "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" }, - "parameters": ["Object", "Behavior", "+", "1"] + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] } ] }, @@ -26334,25 +27963,45 @@ "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] } ] }, @@ -26398,7 +28047,12 @@ "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" }, - "parameters": ["Object", "Behavior", "+", "1"] + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] } ] }, @@ -27083,54 +28737,40 @@ "value": "0.9", "type": "Number", "label": "Leftward catch-up speed (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "LeftwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Rightward catch-up speed (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "RightwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Upward catch-up speed (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "UpwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Downward catch-up speed (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "DownwardSpeed" }, { "value": "true", "type": "Boolean", "label": "Follow on X axis", - "description": "", - "group": "", - "extraInformation": [], "name": "FollowOnX" }, { "value": "true", "type": "Boolean", "label": "Follow on Y axis", - "description": "", - "group": "", - "extraInformation": [], "name": "FollowOnY" }, { @@ -27138,9 +28778,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area left border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaLeft" }, @@ -27149,9 +28787,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area right border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaRight" }, @@ -27160,9 +28796,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area top border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaTop" }, @@ -27171,9 +28805,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area bottom border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaBottom" }, @@ -27182,9 +28814,7 @@ "type": "Number", "unit": "Pixel", "label": "Camera offset X", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "CameraOffsetX" }, @@ -27193,9 +28823,7 @@ "type": "Number", "unit": "Pixel", "label": "Camera offset Y", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "CameraOffsetY" }, @@ -27204,9 +28832,7 @@ "type": "Number", "unit": "Second", "label": "Camera delay", - "description": "", "group": "Timing", - "extraInformation": [], "deprecated": true, "name": "CameraDelay" }, @@ -27215,9 +28841,7 @@ "type": "Number", "unit": "Second", "label": "Forecast time", - "description": "", "group": "Timing", - "extraInformation": [], "deprecated": true, "name": "ForecastTime" }, @@ -27226,9 +28850,7 @@ "type": "Number", "unit": "Second", "label": "Forecast history duration", - "description": "", "group": "Timing", - "extraInformation": [], "deprecated": true, "name": "ForecastHistoryDuration" }, @@ -27236,9 +28858,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogLeftwardSpeed" }, @@ -27246,9 +28865,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogRightwardSpeed" }, @@ -27256,9 +28872,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogDownwardSpeed" }, @@ -27266,9 +28879,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogUpwardSpeed" }, @@ -27276,9 +28886,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DelayedCenterX" }, @@ -27286,9 +28893,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DelayedCenterY" }, @@ -27296,9 +28900,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryMeanX" }, @@ -27306,9 +28907,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryMeanY" }, @@ -27316,9 +28914,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryVarianceX" }, @@ -27326,9 +28921,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryCovariance" }, @@ -27336,9 +28928,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryLinearA" }, @@ -27346,9 +28935,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryLinearB" }, @@ -27356,9 +28942,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastedX" }, @@ -27366,9 +28949,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastedY" }, @@ -27376,9 +28956,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedNewestX" }, @@ -27386,9 +28963,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedNewestY" }, @@ -27396,9 +28970,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedOldestX" }, @@ -27406,9 +28977,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedOldestY" }, @@ -27416,9 +28984,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryVarianceY" }, @@ -27426,9 +28991,6 @@ "value": "", "type": "Number", "label": "Index (local variable)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" }, @@ -27436,9 +28998,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CameraDelayCatchUpSpeed" }, @@ -27446,9 +29005,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CameraExtraDelay" }, @@ -27456,9 +29012,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WaitingSpeedXMax" }, @@ -27466,9 +29019,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WaitingSpeedYMax" }, @@ -27476,9 +29026,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WaitingEnd" }, @@ -27486,9 +29033,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CameraDelayCatchUpDuration" }, @@ -27497,9 +29041,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Leftward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "LeftwardSpeedMax" }, @@ -27508,9 +29050,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Rightward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "RightwardSpeedMax" }, @@ -27519,9 +29059,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Upward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "UpwardSpeedMax" }, @@ -27530,9 +29068,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Downward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "DownwardSpeedMax" }, @@ -27540,9 +29076,6 @@ "value": "", "type": "Number", "label": "OldX (local variable)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldX" }, @@ -27550,9 +29083,6 @@ "value": "", "type": "Number", "label": "OldY (local variable)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldY" }, @@ -27560,9 +29090,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsCalledManually" } @@ -27589,14 +29116,20 @@ "inverted": true, "value": "PlatformBehavior::IsJumping" }, - "parameters": ["Object", "PlatformerCharacter"] + "parameters": [ + "Object", + "PlatformerCharacter" + ] }, { "type": { "inverted": true, "value": "PlatformBehavior::IsFalling" }, - "parameters": ["Object", "PlatformerCharacter"] + "parameters": [ + "Object", + "PlatformerCharacter" + ] } ], "actions": [ @@ -27681,13 +29214,19 @@ "type": { "value": "PlatformBehavior::IsJumping" }, - "parameters": ["Object", "PlatformerCharacter"] + "parameters": [ + "Object", + "PlatformerCharacter" + ] }, { "type": { "value": "PlatformBehavior::IsFalling" }, - "parameters": ["Object", "PlatformerCharacter"] + "parameters": [ + "Object", + "PlatformerCharacter" + ] } ] } @@ -27783,8 +29322,6 @@ "value": "", "type": "Behavior", "label": "Platformer character behavior", - "description": "", - "group": "", "extraInformation": [ "PlatformBehavior::PlatformerObjectBehavior" ], @@ -27794,18 +29331,15 @@ "value": "", "type": "Behavior", "label": "Smooth camera behavior", - "description": "", - "group": "", - "extraInformation": ["SmoothCamera::SmoothCamera"], + "extraInformation": [ + "SmoothCamera::SmoothCamera" + ], "name": "SmoothCamera" }, { "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "JumpOriginY" }, @@ -27814,9 +29348,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area top in the air", - "description": "", "group": "Position", - "extraInformation": [], "name": "AirFollowFreeAreaTop" }, { @@ -27824,9 +29356,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area bottom in the air", - "description": "", "group": "Position", - "extraInformation": [], "name": "AirFollowFreeAreaBottom" }, { @@ -27834,9 +29364,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area top on the floor", - "description": "", "group": "Position", - "extraInformation": [], "name": "FloorFollowFreeAreaTop" }, { @@ -27844,45 +29372,35 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area bottom on the floor", - "description": "", "group": "Position", - "extraInformation": [], "name": "FloorFollowFreeAreaBottom" }, { "value": "0.95", "type": "Number", "label": "Upward speed in the air (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "AirUpwardSpeed" }, { "value": "0.95", "type": "Number", "label": "Downward speed in the air (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "AirDownwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Upward speed on the floor (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "FloorUpwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Downward speed on the floor (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "FloorDownwardSpeed" }, { @@ -27890,9 +29408,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Upward maximum speed in the air", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "AirUpwardSpeedMax" }, { @@ -27900,9 +29416,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Downward maximum speed in the air", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "AirDownwardSpeedMax" }, { @@ -27910,9 +29424,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Upward maximum speed on the floor", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "FloorUpwardSpeedMax" }, { @@ -27920,9 +29432,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Downward maximum speed on the floor", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "FloorDownwardSpeedMax" } ], @@ -27932,6 +29442,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] -} + "externalLayouts": [] +} \ No newline at end of file diff --git a/examples/multiplayer-platformer-arrow-fight/multiplayer-platformer-arrow-fight.json b/examples/multiplayer-platformer-arrow-fight/multiplayer-platformer-arrow-fight.json index 5e3a33c92..811b8a2bf 100644 --- a/examples/multiplayer-platformer-arrow-fight/multiplayer-platformer-arrow-fight.json +++ b/examples/multiplayer-platformer-arrow-fight/multiplayer-platformer-arrow-fight.json @@ -1,7 +1,7 @@ { "firstLayout": "Lobby", "gdVersion": { - "build": 236, + "build": 237, "major": 5, "minor": 5, "revision": 0 @@ -87,6 +87,7 @@ ], "playableDevices": [ "keyboard", + "mobile", "mobile" ], "extensionProperties": [], @@ -99,17 +100,6 @@ }, "resources": { "resources": [ - { - "file": "assets/CantoraOne-Regular.ttf", - "kind": "font", - "metadata": "", - "name": "CantoraOne-Regular.ttf", - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/05b0c1364a92b436b86ca819e66b63480d1bc2fb399f6c0cf8bffbf8199ccc2a_CantoraOne-Regular.ttf", - "name": "CantoraOne-Regular.ttf" - } - }, { "file": "assets/CameraCenter.png", "kind": "image", @@ -442,42 +432,6 @@ "preloadInCache": false, "userAdded": true }, - { - "file": "assets/Medieval Button Beige_Hovered.png", - "kind": "image", - "metadata": "", - "name": "Medieval Button Beige_Hovered.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/6fad8e544ef611861ec9222dd95874cd2b011f1a98a4593372a25801f3236c1c_Medieval Button Beige_Hovered.png", - "name": "Medieval Button Beige_Hovered.png" - } - }, - { - "file": "assets/Medieval Button Beige_Idle.png", - "kind": "image", - "metadata": "", - "name": "Medieval Button Beige_Idle.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/7366f06f5fb6f903e0745608c31da98b3d781c9f29af9016636619b32685ec97_Medieval Button Beige_Idle.png", - "name": "Medieval Button Beige_Idle.png" - } - }, - { - "file": "assets/Medieval Button Beige_Pressed.png", - "kind": "image", - "metadata": "", - "name": "Medieval Button Beige_Pressed.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/8ca64832a117b91bf3128f96ab66c83c7126c3ffb82909ac01ab1d687137997a_Medieval Button Beige_Pressed.png", - "name": "Medieval Button Beige_Pressed.png" - } - }, { "file": "assets/Transparent light joystick border.png", "kind": "image", @@ -535,59 +489,114 @@ "userAdded": true }, { - "file": "assets/Floating Out Button Dark Blue_Idle.png", + "file": "assets/thumbnail.png", "kind": "image", "metadata": "", - "name": "assets\\Floating Out Button Dark Blue_Idle.png", + "name": "thumbnail.png", "smoothed": true, + "userAdded": false + }, + { + "file": "assets/world_tileset.png", + "kind": "image", + "metadata": "", + "name": "world_tileset.png", + "smoothed": false, "userAdded": true }, + { + "file": "assets/unknown.png", + "kind": "image", + "metadata": "", + "name": "assets\\unknown.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/avatar_border_white.png", + "kind": "image", + "metadata": "", + "name": "assets\\avatar_border_white.png", + "smoothed": true, + "userAdded": false + }, { "file": "assets/Floating Out Button Dark Blue_Hovered.png", "kind": "image", "metadata": "", - "name": "assets\\Floating Out Button Dark Blue_Hovered.png", + "name": "Floating Out Button Dark Blue_Hovered.png", "smoothed": true, - "userAdded": true + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/2f8919c3cad70134ff1732dbaef5dd9babd0aed0240dd817c1db9e27aa6b205b_Floating Out Button Dark Blue_Hovered.png", + "name": "Floating Out Button Dark Blue_Hovered.png" + } }, { - "file": "assets/Floating Out Button Dark Blue_Pressed.png", + "file": "assets/Floating Out Button Dark Blue_Idle.png", "kind": "image", "metadata": "", - "name": "assets\\Floating Out Button Dark Blue_Pressed.png", + "name": "Floating Out Button Dark Blue_Idle.png", "smoothed": true, - "userAdded": true + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/d2cedf36d5812262daf2389108558a2ee0b40ca23da05f6200e1f0eee905ca11_Floating Out Button Dark Blue_Idle.png", + "name": "Floating Out Button Dark Blue_Idle.png" + } }, { - "file": "assets/thumbnail.png", + "file": "assets/Floating Out Button Dark Blue_Pressed.png", "kind": "image", "metadata": "", - "name": "thumbnail.png", + "name": "Floating Out Button Dark Blue_Pressed.png", "smoothed": true, - "userAdded": false + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/d246e92fe474d2825e38af207a9926794d490bc052aef447688612f61ec48861_Floating Out Button Dark Blue_Pressed.png", + "name": "Floating Out Button Dark Blue_Pressed.png" + } }, { - "file": "assets/world_tileset.png", + "file": "assets/Medieval Button Beige_Hovered.png", "kind": "image", "metadata": "", - "name": "world_tileset.png", - "smoothed": false, - "userAdded": true + "name": "Medieval Button Beige_Hovered.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/6fad8e544ef611861ec9222dd95874cd2b011f1a98a4593372a25801f3236c1c_Medieval Button Beige_Hovered.png", + "name": "Medieval Button Beige_Hovered.png" + } }, { - "file": "assets/unknown.png", + "file": "assets/Medieval Button Beige_Idle.png", "kind": "image", "metadata": "", - "name": "assets\\unknown.png", + "name": "Medieval Button Beige_Idle.png", "smoothed": true, - "userAdded": false + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/7366f06f5fb6f903e0745608c31da98b3d781c9f29af9016636619b32685ec97_Medieval Button Beige_Idle.png", + "name": "Medieval Button Beige_Idle.png" + } }, { - "file": "assets/avatar_border_white.png", + "file": "assets/Medieval Button Beige_Pressed.png", "kind": "image", "metadata": "", - "name": "assets\\avatar_border_white.png", + "name": "Medieval Button Beige_Pressed.png", "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/8ca64832a117b91bf3128f96ab66c83c7126c3ffb82909ac01ab1d687137997a_Medieval Button Beige_Pressed.png", + "name": "Medieval Button Beige_Pressed.png" + } + }, + { + "file": "assets/CantoraOne-Regular.ttf", + "kind": "font", + "metadata": "", + "name": "CantoraOne-Regular.ttf", "userAdded": false } ], @@ -811,7 +820,7 @@ "assetStoreId": "1cacfe2713f10642e8079542f28282d52f1bf46ae2dc27dc6c291a2970c90971", "name": "LobbyButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Big Floating Out Button Dark Blue", "variables": [], "effects": [], "behaviors": [], @@ -821,7 +830,8 @@ "PressedLabelOffsetY": 4, "BottomPadding": 10, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 + "HoveredFadeOutDuration": 0.2, + "LabelText": "Join Lobby" }, "childrenContent": { "Hovered": { @@ -1124,6 +1134,24 @@ ] } ] + }, + { + "assetStoreId": "d00645a899e762e085fa6fdf2625701baea9cc10ee903a64ca7d371e5bbb8dca", + "name": "FloatingOutButtonDarkBlue", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Floating Out Button Dark Blue", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 0, + "RightPadding": 0, + "PressedLabelOffsetY": 2, + "BottomPadding": 4, + "TopPadding": 0, + "HoveredFadeOutDuration": 0, + "LabelText": "Button" + } } ], "objectsFolderStructure": { @@ -1132,6 +1160,9 @@ { "objectName": "LobbyButton" }, + { + "objectName": "FloatingOutButtonDarkBlue" + }, { "objectName": "Instructions_Text" }, @@ -3562,7 +3593,7 @@ "assetStoreId": "1cacfe2713f10642e8079542f28282d52f1bf46ae2dc27dc6c291a2970c90971", "name": "LeaveGameButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Medieval Button Beige 2", "variables": [], "effects": [], "behaviors": [ @@ -3577,7 +3608,8 @@ "PressedLabelOffsetY": 4, "BottomPadding": 10, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 + "HoveredFadeOutDuration": 0.2, + "LabelText": "Leave Game" }, "childrenContent": { "Hovered": { @@ -34783,13 +34815,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.", "", @@ -34806,6 +34838,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": [], @@ -35949,7 +35987,7 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 64, + "areaMaxX": 256, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, @@ -35958,7 +35996,8 @@ "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", - "isUsingLegacyInstancesRenderer": true, + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", "objects": [ { @@ -35971,10 +36010,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, @@ -35997,8 +36047,8 @@ "underlined": false, "text": "Text", "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", + "textAlignment": "center", + "verticalTextAlignment": "center", "characterSize": 20, "color": "0;0;0" } @@ -36025,6 +36075,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", @@ -36047,6 +36107,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" @@ -36067,7 +36137,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": { @@ -36087,7 +36168,22 @@ } ] }, - "objectsGroups": [], + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], "layers": [ { "ambientLightColorB": 200, @@ -36118,7 +36214,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": "", @@ -36148,7 +36277,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -36160,7 +36289,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -36168,14 +36297,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()" ] }, { @@ -36203,63 +36342,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" ] } ] @@ -36298,18 +36400,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": [ @@ -36371,12 +36502,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -36423,7 +36555,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -36431,7 +36563,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -36469,10 +36601,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -36489,10 +36622,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -36521,12 +36655,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -36566,10 +36701,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -36598,12 +36734,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -36655,12 +36792,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -36692,143 +36830,49 @@ } ], "parameters": [] - }, + } + ], + "parameters": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsIdle" }, - "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": [ + "Idle", + "ButtonFSM", + "" ] } ], - "parameters": [] + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] } ], "parameters": [ @@ -36839,36 +36883,107 @@ "type": "object" } ], - "objectGroups": [ + "objectGroups": [] + }, + { + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", + "events": [ { - "name": "Background", - "objects": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "name": "Idle" - }, + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsClicked" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ { - "name": "Hovered" - }, + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "name": "Pressed" + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsHovered" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] } ] } - ] + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] }, { - "description": "Check if the button is not used.", - "fullName": "Is idle", + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", "functionType": "Condition", - "name": "IsIdle", - "sentence": "_PARAM0_ is idle", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::IsIdle" + "value": "PanelSpriteButton::ButtonFSM::IsFocused" }, "parameters": [ "Idle", @@ -36900,18 +37015,18 @@ "objectGroups": [] }, { - "description": "Check if the button was just clicked.", - "fullName": "Is clicked", + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", "functionType": "Condition", - "name": "IsClicked", - "sentence": "_PARAM0_ is clicked", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::IsClicked" + "value": "PanelSpriteButton::ButtonFSM::IsPressed" }, "parameters": [ "Idle", @@ -36943,33 +37058,26 @@ "objectGroups": [] }, { - "description": "Check if the cursor is hovered over the button.", - "fullName": "Is hovered", - "functionType": "Condition", - "name": "IsHovered", - "sentence": "_PARAM0_ is hovered", + "description": "Change the text of the button label.", + "fullName": "Label text", + "functionType": "Action", + "name": "SetLabelText", + "private": true, + "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsHovered" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "True" + "Label", + "Text", + "=", + "Value" ] } ] @@ -36981,38 +37089,35 @@ "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" + }, + { + "description": "Text", + "name": "Value", + "type": "string" } ], "objectGroups": [] }, { - "description": "Check if the button is either hovered or pressed but not hovered.", - "fullName": "Is focused", - "functionType": "Condition", - "name": "IsFocused", - "sentence": "_PARAM0_ is focused", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsFocused" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "True" + "Label", + "Text", + "=", + "Value" ] } ] @@ -37029,38 +37134,30 @@ "objectGroups": [] }, { - "description": "Check if the button is currently being pressed with mouse or touch.", - "fullName": "Is pressed", - "functionType": "Condition", - "name": "IsPressed", - "sentence": "_PARAM0_ is pressed", + "description": "the label text.", + "fullName": "Label text", + "functionType": "ExpressionAndCondition", + "name": "LabelText", + "sentence": "the label text", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsPressed" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnString" }, "parameters": [ - "True" + "Label.Text::Value()" ] } ] } ], + "expressionType": { + "type": "string" + }, "parameters": [ { "description": "Object", @@ -37072,35 +37169,65 @@ "objectGroups": [] }, { - "description": "Change the text of the button label.", - "fullName": "Label text", + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", "functionType": "Action", - "name": "SetLabelText", - "sentence": "Change the text of _PARAM0_ to _PARAM1_", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldActivate", + "True", + "" + ] + } + ], "actions": [ { "type": { - "value": "TextObject::String" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "=", - "LabelText" + "Idle", + "ButtonFSM", + "yes" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", + "ShouldActivate", + "True", "" ] } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "no" + ] + } ] } ], @@ -37112,38 +37239,45 @@ "type": "object" }, { - "description": "Text", - "name": "LabelText", - "type": "string" + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" } ], "objectGroups": [] }, { - "description": "the label text.", - "fullName": "Label text", - "functionType": "ExpressionAndCondition", - "name": "LabelText", - "sentence": "the label text", + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "BehaviorActivated" + }, + "parameters": [ + "Idle", + "ButtonFSM" + ] + } + ], "actions": [ { "type": { - "value": "SetReturnString" + "value": "SetReturnBoolean" }, "parameters": [ - "Label.String()" + "True" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -37155,12 +37289,12 @@ "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", + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", "private": true, - "sentence": "", + "sentence": "the labelOffset", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -37171,7 +37305,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "LabelOffset" ] } ] @@ -37191,12 +37325,12 @@ "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", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", "private": true, - "sentence": "Center the label of _PARAM0_", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -37204,92 +37338,267 @@ "actions": [ { "type": { - "value": "MettreXY" + "value": "SetCenterY" }, "parameters": [ "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" + "+", + "Value - LabelOffset" ] }, { "type": { - "value": "TextObject::WrappingWidth" + "value": "SetNumberVariable" }, "parameters": [ - "Label", + "LabelOffset", "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" + "Value" ] - }, + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" + }, + { + "value": "0.25", + "type": "Number", + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Label offset on Y axis when pressed", + "group": "States", + "name": "PressedLabelOffsetY" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" + }, + { + "value": "", + "type": "Choice", + "label": "", + "extraInformation": [ + "Label.Text=LabelText" + ], + "hidden": true, + "name": "_PropertyMapping" + } + ], + "variants": [ + { + "areaMaxX": 192, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Medieval Button Beige 2", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false } ], - "events": [ + "string": "Button", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 64, + "g": 99, + "r": 133 + }, + "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": "Button", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "color": "133;99;64" + } + }, + { + "assetStoreId": "", + "bottomMargin": 11, + "height": 64, + "leftMargin": 7, + "name": "Idle", + "rightMargin": 7, + "texture": "Medieval Button Beige_Idle.png", + "tiled": false, + "topMargin": 7, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } - ] + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "assetStoreId": "", + "bottomMargin": 11, + "height": 64, + "leftMargin": 7, + "name": "Hovered", + "rightMargin": 7, + "texture": "Medieval Button Beige_Hovered.png", + "tiled": false, + "topMargin": 7, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": [ - "Object", - "" - ] - } - ], - "actions": [ + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, { - "type": { - "value": "MettreY" - }, - "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" - ] + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } } ] - } - ], - "parameters": [ + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "assetStoreId": "", + "bottomMargin": 7, + "height": 64, + "leftMargin": 7, + "name": "Pressed", + "rightMargin": 7, + "texture": "Medieval Button Beige_Pressed.png", + "tiled": false, + "topMargin": 11, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] } ], - "objectGroups": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ { "name": "Background", "objects": [ @@ -37304,184 +37613,879 @@ } ] } + ], + "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": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 52, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "d6340d76-d9e1-41b2-bc4f-1a39e5098dd3", + "width": 184, + "x": 4, + "y": 30, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } ] }, { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", - "events": [ + "areaMaxX": 192, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Big Floating Out Button Dark Blue", + "objects": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "BooleanVariable" - }, - "parameters": [ - "ShouldActivate", - "True", - "" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false } ], - "actions": [ + "string": "Button", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 60, + "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": "Button", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 60, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Idle", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Idle.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ { - "type": { - "value": "ActivateBehavior" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "yes" - ] + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Hovered", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Hovered.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "inverted": true, - "value": "BooleanVariable" - }, - "parameters": [ - "ShouldActivate", - "True", - "" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } } - ], - "actions": [ + ] + }, + { + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Pressed", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Pressed.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "ActivateBehavior" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "no" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false } ] } ], - "parameters": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - }, + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "layers": [ { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" + "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": [] } ], - "objectGroups": [] + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 57, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "dfb1b714-aad7-4c68-9234-531c340769cd", + "width": 186, + "x": 3, + "y": 31, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] }, { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", - "events": [ + "areaMaxX": 192, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "d00645a899e762e085fa6fdf2625701baea9cc10ee903a64ca7d371e5bbb8dca", + "assetStoreOriginalName": "Floating Out Button Dark Blue", + "name": "Floating Out Button Dark Blue", + "objects": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "BehaviorActivated" - }, - "parameters": [ - "Idle", - "ButtonFSM" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false } ], - "actions": [ + "string": "Button", + "font": "CarterOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "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": "Button", + "font": "CarterOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Idle", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Idle.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Hovered", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Hovered.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Pressed", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Pressed.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false } ] } ], - "parameters": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] } ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "name": "PressedLabelOffsetY" - }, - { - "value": "0", - "type": "Number", - "label": "Left padding", - "group": "Padding", - "extraInformation": [ - "Label" + "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": [] + } ], - "name": "LeftPadding" + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 57, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "dfb1b714-aad7-4c68-9234-531c340769cd", + "width": 186, + "x": 3, + "y": 31, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] }, { - "value": "0", - "type": "Number", - "label": "Right padding", - "group": "Padding", - "extraInformation": [ - "Label" + "areaMaxX": 192, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "1cacfe2713f10642e8079542f28282d52f1bf46ae2dc27dc6c291a2970c90971", + "assetStoreOriginalName": "Medieval Button Beige", + "name": "Medieval Button Beige", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "Button", + "font": "CaesarDressing-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 64, + "g": 99, + "r": 133 + }, + "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": "Button", + "font": "CaesarDressing-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "color": "133;99;64" + } + }, + { + "assetStoreId": "", + "bottomMargin": 11, + "height": 64, + "leftMargin": 7, + "name": "Idle", + "rightMargin": 7, + "texture": "Medieval Button Beige_Idle.png", + "tiled": false, + "topMargin": 7, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 11, + "height": 64, + "leftMargin": 7, + "name": "Hovered", + "rightMargin": 7, + "texture": "Medieval Button Beige_Hovered.png", + "tiled": false, + "topMargin": 7, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 7, + "height": 64, + "leftMargin": 7, + "name": "Pressed", + "rightMargin": 7, + "texture": "Medieval Button Beige_Pressed.png", + "tiled": false, + "topMargin": 11, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } ], - "name": "RightPadding" - }, - { - "value": "0", - "type": "Number", - "label": "Top padding", - "group": "Padding", - "extraInformation": [ - "Label" + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } ], - "name": "TopPadding" - }, - { - "value": "0", - "type": "Number", - "label": "Bottom padding", - "group": "Padding", - "extraInformation": [ - "Label" + "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": [] + } ], - "name": "BottomPadding" - }, - { - "value": "0.25", - "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "name": "HoveredFadeOutDuration" + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 52, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "d6340d76-d9e1-41b2-bc4f-1a39e5098dd3", + "width": 184, + "x": 4, + "y": 30, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] } - ], - "variants": [] + ] } ] }, diff --git a/examples/multiplayer-platformer-pickup/multiplayer-platformer-pickup.json b/examples/multiplayer-platformer-pickup/multiplayer-platformer-pickup.json index 2ab998206..9ef17e327 100644 --- a/examples/multiplayer-platformer-pickup/multiplayer-platformer-pickup.json +++ b/examples/multiplayer-platformer-pickup/multiplayer-platformer-pickup.json @@ -1,7 +1,7 @@ { "firstLayout": "Lobby", "gdVersion": { - "build": 221, + "build": 237, "major": 5, "minor": 5, "revision": 0 @@ -52,7 +52,10 @@ "authorIds": [], "authorUsernames": [], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile", + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -95,53 +98,6 @@ "smoothed": false, "userAdded": false }, - { - "file": "assets/Green Button With Shadow_Hovered.png", - "kind": "image", - "metadata": "", - "name": "Green Button With Shadow_Hovered.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/3cfcef451f366e0586d68ae863db979bdeb2ec9453290b236ba3a1fbf19db418_Green Button With Shadow_Hovered.png", - "name": "Green Button With Shadow_Hovered.png" - } - }, - { - "file": "assets/Green Button With Shadow_Idle.png", - "kind": "image", - "metadata": "", - "name": "Green Button With Shadow_Idle.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/63f468aa943eb440db683045192c88a94de99bd6e3aa5fc0afc3d93dd8d39324_Green Button With Shadow_Idle.png", - "name": "Green Button With Shadow_Idle.png" - } - }, - { - "file": "assets/Green Button With Shadow_Pressed.png", - "kind": "image", - "metadata": "", - "name": "Green Button With Shadow_Pressed.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/3c957fd6edd0a38bee1807034ca83d582216e6e2f48058e413979f8b1f504e8b_Green Button With Shadow_Pressed.png", - "name": "Green Button With Shadow_Pressed.png" - } - }, - { - "file": "assets/CantoraOne-Regular.ttf", - "kind": "font", - "metadata": "", - "name": "CantoraOne-Regular.ttf", - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/05b0c1364a92b436b86ca819e66b63480d1bc2fb399f6c0cf8bffbf8199ccc2a_CantoraOne-Regular.ttf", - "name": "CantoraOne-Regular.ttf" - } - }, { "file": "assets/slime_green_walk1.png", "kind": "image", @@ -634,30 +590,6 @@ "preloadInCache": false, "userAdded": false }, - { - "file": "assets/Medieval Button Beige_Idle.png", - "kind": "image", - "metadata": "", - "name": "Medieval Button Beige_Idle.png", - "smoothed": false, - "userAdded": true - }, - { - "file": "assets/Medieval Button Beige_Hovered.png", - "kind": "image", - "metadata": "", - "name": "Medieval Button Beige_Hovered.png", - "smoothed": false, - "userAdded": true - }, - { - "file": "assets/Medieval Button Beige_Pressed.png", - "kind": "image", - "metadata": "", - "name": "Medieval Button Beige_Pressed.png", - "smoothed": false, - "userAdded": true - }, { "file": "assets/Directional Arrow Full Circle.png", "kind": "image", @@ -728,6 +660,89 @@ "name": "world_tileset.png", "smoothed": false, "userAdded": true + }, + { + "file": "assets/Green Button With Shadow_Hovered.png", + "kind": "image", + "metadata": "", + "name": "Green Button With Shadow_Hovered.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/3cfcef451f366e0586d68ae863db979bdeb2ec9453290b236ba3a1fbf19db418_Green Button With Shadow_Hovered.png", + "name": "Green Button With Shadow_Hovered.png" + } + }, + { + "file": "assets/Green Button With Shadow_Idle.png", + "kind": "image", + "metadata": "", + "name": "Green Button With Shadow_Idle.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/63f468aa943eb440db683045192c88a94de99bd6e3aa5fc0afc3d93dd8d39324_Green Button With Shadow_Idle.png", + "name": "Green Button With Shadow_Idle.png" + } + }, + { + "file": "assets/Green Button With Shadow_Pressed.png", + "kind": "image", + "metadata": "", + "name": "Green Button With Shadow_Pressed.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/3c957fd6edd0a38bee1807034ca83d582216e6e2f48058e413979f8b1f504e8b_Green Button With Shadow_Pressed.png", + "name": "Green Button With Shadow_Pressed.png" + } + }, + { + "file": "assets/CantoraOne-Regular.ttf", + "kind": "font", + "metadata": "", + "name": "CantoraOne-Regular.ttf", + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/05b0c1364a92b436b86ca819e66b63480d1bc2fb399f6c0cf8bffbf8199ccc2a_CantoraOne-Regular.ttf", + "name": "CantoraOne-Regular.ttf" + } + }, + { + "file": "assets/Medieval Button Beige_Hovered.png", + "kind": "image", + "metadata": "", + "name": "Medieval Button Beige_Hovered.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/6fad8e544ef611861ec9222dd95874cd2b011f1a98a4593372a25801f3236c1c_Medieval Button Beige_Hovered.png", + "name": "Medieval Button Beige_Hovered.png" + } + }, + { + "file": "assets/Medieval Button Beige_Idle.png", + "kind": "image", + "metadata": "", + "name": "Medieval Button Beige_Idle.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/7366f06f5fb6f903e0745608c31da98b3d781c9f29af9016636619b32685ec97_Medieval Button Beige_Idle.png", + "name": "Medieval Button Beige_Idle.png" + } + }, + { + "file": "assets/Medieval Button Beige_Pressed.png", + "kind": "image", + "metadata": "", + "name": "Medieval Button Beige_Pressed.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/8ca64832a117b91bf3128f96ab66c83c7126c3ffb82909ac01ab1d687137997a_Medieval Button Beige_Pressed.png", + "name": "Medieval Button Beige_Pressed.png" + } } ], "resourceFolders": [] @@ -811,6 +826,7 @@ "assetStoreId": "569b45d3c7c34f7706563239938d04ca599016ff9857ee38c945c72330d4339e", "name": "LobbyButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -820,7 +836,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Join Lobby" }, "childrenContent": { "Hovered": { @@ -4015,6 +4032,7 @@ "assetStoreId": "1cacfe2713f10642e8079542f28282d52f1bf46ae2dc27dc6c291a2970c90971", "name": "LeaveGameButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Medieval Button Beige 2", "variables": [], "effects": [], "behaviors": [ @@ -4035,7 +4053,8 @@ "PressedLabelOffsetY": 4, "BottomPadding": 10, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 + "HoveredFadeOutDuration": 0.2, + "LabelText": "Leave Game" }, "childrenContent": { "Hovered": { @@ -4333,6 +4352,7 @@ "assetStoreId": "9be1b0d0d5a1afad4537db989ea5e3a4a4564dfd123630a9bf61330a73803c63", "name": "ShadedDarkJoystick", "type": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "variant": "", "variables": [], "effects": [], "behaviors": [], @@ -4433,7 +4453,8 @@ "bitmapFontResourceName": "8BitOperatorPlus8Regular_Edited.fnt", "textureAtlasResourceName": "8BitOperatorPlus8Regular_Edited3.png", "align": "center", - "wordWrap": false + "wordWrap": false, + "verticalTextAlignment": "top" } }, { @@ -8575,6 +8596,7 @@ "assetStoreId": "1cacfe2713f10642e8079542f28282d52f1bf46ae2dc27dc6c291a2970c90971", "name": "LeaveGameButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "", "variables": [], "effects": [], "behaviors": [ @@ -8916,6 +8938,7 @@ "category": "Input", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", + "gdevelopVersion": "", "helpPath": "/objects/multitouch-joystick", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMTYiIGN5PSIxNiIgcj0iMTMiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjI4LjQsMTIgMjAsMTIgMjAsMy42ICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMjAsMjguNCAyMCwyMCAyOC40LDIwICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMy42LDIwIDEyLDIwIDEyLDI4LjQgIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIxMiwzLjYgMTIsMTIgMy42LDEyICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIxNiw2IDE2LjcsNyAxNS4zLDcgIi8+DQo8cG9seWdvbiBjbGFzcz0ic3QwIiBwb2ludHM9IjE2LDI2IDE1LjMsMjUgMTYuNywyNSAiLz4NCjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iNiwxNiA3LDE1LjMgNywxNi43ICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIyNiwxNiAyNSwxNi43IDI1LDE1LjMgIi8+DQo8L3N2Zz4NCg==", "name": "SpriteMultitouchJoystick", @@ -11965,18 +11988,12 @@ "value": "1", "type": "Number", "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Primary", "type": "String", "label": "Joystick name", - "description": "", - "group": "", - "extraInformation": [], "name": "JoystickIdentifier" }, { @@ -11984,17 +12001,12 @@ "type": "Number", "label": "Dead zone radius (range: 0 to 1)", "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", - "group": "", - "extraInformation": [], "name": "DeadZoneRadius" }, { "value": "0", "type": "Number", "label": "Joystick angle (range: -180 to 180)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "JoystickAngle" }, @@ -12002,9 +12014,6 @@ "value": "0", "type": "Number", "label": "Joystick force (range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "JoystickForce" }, @@ -12012,9 +12021,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -12022,9 +12028,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIndex" } @@ -12426,27 +12429,18 @@ "value": "1", "type": "Number", "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "A", "type": "String", "label": "Button identifier", - "description": "", - "group": "", - "extraInformation": [], "name": "ButtonIdentifier" }, { "value": "0", "type": "Number", "label": "TouchID", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -12454,9 +12448,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIndex" }, @@ -12464,9 +12455,6 @@ "value": "", "type": "Boolean", "label": "Button released", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsReleased" }, @@ -12476,8 +12464,6 @@ "unit": "Pixel", "label": "Triggering circle radius", "description": "This circle adds up to the object collision mask.", - "group": "", - "extraInformation": [], "name": "Radius" } ], @@ -12665,8 +12651,6 @@ "value": "", "type": "Behavior", "label": "Platform character behavior", - "description": "", - "group": "", "extraInformation": [ "PlatformBehavior::PlatformerObjectBehavior" ], @@ -12676,16 +12660,12 @@ "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Joystick name", - "description": "", "group": "Controls", "extraInformation": [ "Primary", @@ -12697,9 +12677,7 @@ "value": "A", "type": "String", "label": "Jump button name", - "description": "", "group": "Controls", - "extraInformation": [], "name": "JumpButton" } ], @@ -12808,8 +12786,6 @@ "value": "", "type": "Behavior", "label": "3D physics character", - "description": "", - "group": "", "extraInformation": [ "Physics3D::PhysicsCharacter3D" ], @@ -12819,16 +12795,12 @@ "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Walk joystick", - "description": "", "group": "Controls", "extraInformation": [ "Primary", @@ -12840,9 +12812,7 @@ "value": "A", "type": "String", "label": "Jump button name", - "description": "", "group": "Controls", - "extraInformation": [], "name": "JumpButton" } ], @@ -12940,8 +12910,6 @@ "value": "", "type": "Behavior", "label": "3D physics character", - "description": "", - "group": "", "extraInformation": [ "Physics3D::PhysicsCharacter3D" ], @@ -12951,16 +12919,12 @@ "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Walk joystick", - "description": "", "group": "Controls", "extraInformation": [ "Primary", @@ -12972,9 +12936,7 @@ "value": "A", "type": "String", "label": "Jump button name", - "description": "", "group": "Controls", - "extraInformation": [], "name": "JumpButton" } ], @@ -13916,8 +13878,6 @@ "value": "", "type": "Behavior", "label": "3D capability", - "description": "", - "group": "", "extraInformation": [ "Scene3D::Base3DBehavior" ], @@ -13927,16 +13887,12 @@ "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Secondary", "type": "Choice", "label": "Camera joystick", - "description": "", "group": "Controls", "extraInformation": [ "Primary", @@ -13949,27 +13905,21 @@ "type": "Number", "unit": "AngularSpeed", "label": "Maximum rotation speed", - "description": "", "group": "Horizontal rotation", - "extraInformation": [], "name": "HorizontalRotationSpeedMax" }, { "value": "360", "type": "Number", "label": "Rotation acceleration", - "description": "", "group": "Horizontal rotation", - "extraInformation": [], "name": "HorizontalRotationAcceleration" }, { "value": "720", "type": "Number", "label": "Rotation deceleration", - "description": "", "group": "Horizontal rotation", - "extraInformation": [], "name": "HorizontalRotationDeceleration" }, { @@ -13977,27 +13927,21 @@ "type": "Number", "unit": "AngularSpeed", "label": "Maximum rotation speed", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalRotationSpeedMax" }, { "value": "240", "type": "Number", "label": "Rotation acceleration", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalRotationAcceleration" }, { "value": "480", "type": "Number", "label": "Rotation deceleration", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalRotationDeceleration" }, { @@ -14005,9 +13949,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Minimum angle", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalAngleMin" }, { @@ -14015,9 +13957,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Maximum angle", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalAngleMax" }, { @@ -14025,9 +13965,7 @@ "type": "Number", "unit": "Pixel", "label": "Z position offset", - "description": "", "group": "Position", - "extraInformation": [], "name": "OffsetZ" }, { @@ -14035,9 +13973,6 @@ "type": "Number", "unit": "AngularSpeed", "label": "Current rotation speed Z", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentRotationSpeedZ" }, @@ -14046,9 +13981,6 @@ "type": "Number", "unit": "AngularSpeed", "label": "Current rotation speed Y", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentRotationSpeedY" } @@ -14573,8 +14505,6 @@ "value": "", "type": "Behavior", "label": "Top-down movement behavior", - "description": "", - "group": "", "extraInformation": [ "TopDownMovementBehavior::TopDownMovementBehavior" ], @@ -14584,17 +14514,12 @@ "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Joystick name", - "description": "", - "group": "", "extraInformation": [ "Primary", "Secondary" @@ -14605,7 +14530,6 @@ "value": "Analog", "type": "Choice", "label": "Stick mode", - "description": "", "group": "Controls", "extraInformation": [ "Analog", @@ -14631,6 +14555,110 @@ "fullName": "Multitouch Joystick", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "objects": [ + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "Thumb", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "Border", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "MultitouchJoystick", + "type": "SpriteMultitouchJoystick::MultitouchJoystick", + "ControllerIdentifier": 1, + "JoystickIdentifier": "Primary", + "FloatingEnabled": false, + "DeadZoneRadius": 0.4, + "JoystickAngle": 0, + "JoystickForce": 0, + "TouchId": 0, + "TouchIndex": 0 + } + ], + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Thumb" + }, + { + "objectName": "Border" + } + ] + }, + "objectsGroups": [], + "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": [], "eventsFunctions": [ { "fullName": "", @@ -15732,17 +15760,12 @@ "value": "1", "type": "Number", "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Joystick name", - "description": "", - "group": "", "extraInformation": [ "Primary", "Secondary" @@ -15754,8 +15777,6 @@ "type": "Number", "label": "Dead zone radius (range: 0 to 1)", "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", - "group": "", - "extraInformation": [], "name": "DeadZoneRadius" }, { @@ -15763,7 +15784,6 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Thumb" ], @@ -15775,8 +15795,6 @@ "type": "Number", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [], "hidden": true, "name": "ThumbAnchorTarget" }, @@ -15785,7 +15803,6 @@ "type": "Boolean", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Thumb" ], @@ -15797,8 +15814,6 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [], "hidden": true, "name": "ParentOrigin" }, @@ -15806,117 +15821,11 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldBeHiddenWhenReleased" } ], - "objects": [ - { - "adaptCollisionMaskAutomatically": false, - "assetStoreId": "", - "name": "Thumb", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [], - "animations": [ - { - "name": "Idle", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] - } - ] - } - ] - }, - { - "adaptCollisionMaskAutomatically": false, - "assetStoreId": "", - "name": "Border", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "MultitouchJoystick", - "type": "SpriteMultitouchJoystick::MultitouchJoystick", - "ControllerIdentifier": 1, - "JoystickIdentifier": "Primary", - "FloatingEnabled": false, - "DeadZoneRadius": 0.4, - "JoystickAngle": 0, - "JoystickForce": 0, - "TouchId": 0, - "TouchIndex": 0 - } - ], - "animations": [ - { - "name": "Idle", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] - } - ] - } - ] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Thumb" - }, - { - "objectName": "Border" - } - ] - }, - "objectsGroups": [], - "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": [] + "variants": [] } ] }, @@ -15925,6 +15834,7 @@ "category": "Camera", "extensionNamespace": "", "fullName": "Smooth Camera", + "gdevelopVersion": "", "helpPath": "/tutorials/follow-player-with-camera/", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjQsMTNoLTZjLTEuMSwwLTItMC45LTItMlY1YzAtMS4xLDAuOS0yLDItMmg2YzEuMSwwLDIsMC45LDIsMnY2QzI2LDEyLjEsMjUuMSwxMywyNCwxM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNiw4djEwYzAsMS4xLTAuOSwyLTIsMkg4Yy0xLjEsMC0yLTAuOS0yLTJWOGMwLTEuMSwwLjktMiwyLTJoOCIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjEiIGN5PSI4IiByPSIyIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxMSIgY3k9IjE2IiByPSIxIi8+DQo8cmVjdCB4PSI5IiB5PSI5IiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMSwyOSAyMSwyOSAxMSwyOSAxMSwyOSAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE4LDIwIDE4LDI5IDE0LDI5IDE0LDIwICIvPg0KPHJlY3QgeD0iNyIgeT0iMyIgY2xhc3M9InN0MCIgd2lkdGg9IjQiIGhlaWdodD0iMyIvPg0KPC9zdmc+DQo=", "name": "SmoothCamera", @@ -20446,54 +20356,40 @@ "value": "0.9", "type": "Number", "label": "Leftward catch-up speed (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "LeftwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Rightward catch-up speed (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "RightwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Upward catch-up speed (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "UpwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Downward catch-up speed (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "DownwardSpeed" }, { "value": "true", "type": "Boolean", "label": "Follow on X axis", - "description": "", - "group": "", - "extraInformation": [], "name": "FollowOnX" }, { "value": "true", "type": "Boolean", "label": "Follow on Y axis", - "description": "", - "group": "", - "extraInformation": [], "name": "FollowOnY" }, { @@ -20501,9 +20397,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area left border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaLeft" }, @@ -20512,9 +20406,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area right border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaRight" }, @@ -20523,9 +20415,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area top border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaTop" }, @@ -20534,9 +20424,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area bottom border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaBottom" }, @@ -20545,9 +20433,7 @@ "type": "Number", "unit": "Pixel", "label": "Camera offset X", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "CameraOffsetX" }, @@ -20556,9 +20442,7 @@ "type": "Number", "unit": "Pixel", "label": "Camera offset Y", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "CameraOffsetY" }, @@ -20567,9 +20451,7 @@ "type": "Number", "unit": "Second", "label": "Camera delay", - "description": "", "group": "Timing", - "extraInformation": [], "deprecated": true, "name": "CameraDelay" }, @@ -20578,9 +20460,7 @@ "type": "Number", "unit": "Second", "label": "Forecast time", - "description": "", "group": "Timing", - "extraInformation": [], "deprecated": true, "name": "ForecastTime" }, @@ -20589,9 +20469,7 @@ "type": "Number", "unit": "Second", "label": "Forecast history duration", - "description": "", "group": "Timing", - "extraInformation": [], "deprecated": true, "name": "ForecastHistoryDuration" }, @@ -20599,9 +20477,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogLeftwardSpeed" }, @@ -20609,9 +20484,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogRightwardSpeed" }, @@ -20619,9 +20491,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogDownwardSpeed" }, @@ -20629,9 +20498,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogUpwardSpeed" }, @@ -20639,9 +20505,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DelayedCenterX" }, @@ -20649,9 +20512,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DelayedCenterY" }, @@ -20659,9 +20519,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryMeanX" }, @@ -20669,9 +20526,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryMeanY" }, @@ -20679,9 +20533,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryVarianceX" }, @@ -20689,9 +20540,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryCovariance" }, @@ -20699,9 +20547,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryLinearA" }, @@ -20709,9 +20554,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryLinearB" }, @@ -20719,9 +20561,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastedX" }, @@ -20729,9 +20568,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastedY" }, @@ -20739,9 +20575,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedNewestX" }, @@ -20749,9 +20582,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedNewestY" }, @@ -20759,9 +20589,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedOldestX" }, @@ -20769,9 +20596,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedOldestY" }, @@ -20779,9 +20603,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryVarianceY" }, @@ -20789,9 +20610,6 @@ "value": "", "type": "Number", "label": "Index (local variable)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" }, @@ -20799,9 +20617,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CameraDelayCatchUpSpeed" }, @@ -20809,9 +20624,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CameraExtraDelay" }, @@ -20819,9 +20631,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WaitingSpeedXMax" }, @@ -20829,9 +20638,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WaitingSpeedYMax" }, @@ -20839,9 +20645,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WaitingEnd" }, @@ -20849,9 +20652,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CameraDelayCatchUpDuration" }, @@ -20860,9 +20660,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Leftward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "LeftwardSpeedMax" }, @@ -20871,9 +20669,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Rightward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "RightwardSpeedMax" }, @@ -20882,9 +20678,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Upward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "UpwardSpeedMax" }, @@ -20893,9 +20687,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Downward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "DownwardSpeedMax" }, @@ -20903,9 +20695,6 @@ "value": "", "type": "Number", "label": "OldX (local variable)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldX" }, @@ -20913,9 +20702,6 @@ "value": "", "type": "Number", "label": "OldY (local variable)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldY" }, @@ -20923,9 +20709,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsCalledManually" } @@ -21158,8 +20941,6 @@ "value": "", "type": "Behavior", "label": "Platformer character behavior", - "description": "", - "group": "", "extraInformation": [ "PlatformBehavior::PlatformerObjectBehavior" ], @@ -21169,8 +20950,6 @@ "value": "", "type": "Behavior", "label": "Smooth camera behavior", - "description": "", - "group": "", "extraInformation": [ "SmoothCamera::SmoothCamera" ], @@ -21180,9 +20959,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "JumpOriginY" }, @@ -21191,9 +20967,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area top in the air", - "description": "", "group": "Position", - "extraInformation": [], "name": "AirFollowFreeAreaTop" }, { @@ -21201,9 +20975,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area bottom in the air", - "description": "", "group": "Position", - "extraInformation": [], "name": "AirFollowFreeAreaBottom" }, { @@ -21211,9 +20983,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area top on the floor", - "description": "", "group": "Position", - "extraInformation": [], "name": "FloorFollowFreeAreaTop" }, { @@ -21221,45 +20991,35 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area bottom on the floor", - "description": "", "group": "Position", - "extraInformation": [], "name": "FloorFollowFreeAreaBottom" }, { "value": "0.95", "type": "Number", "label": "Upward speed in the air (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "AirUpwardSpeed" }, { "value": "0.95", "type": "Number", "label": "Downward speed in the air (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "AirDownwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Upward speed on the floor (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "FloorUpwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Downward speed on the floor (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "FloorDownwardSpeed" }, { @@ -21267,9 +21027,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Upward maximum speed in the air", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "AirUpwardSpeedMax" }, { @@ -21277,9 +21035,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Downward maximum speed in the air", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "AirDownwardSpeedMax" }, { @@ -21287,9 +21043,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Upward maximum speed on the floor", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "FloorUpwardSpeedMax" }, { @@ -21297,9 +21051,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Downward maximum speed on the floor", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "FloorDownwardSpeedMax" } ], @@ -21313,6 +21065,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Button states and effects", + "gdevelopVersion": "", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtdGFwLWJ1dHRvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMyA1QzE1LjIxIDUgMTcgNi43OSAxNyA5QzE3IDEwLjUgMTYuMiAxMS43NyAxNSAxMi40NlYxMS4yNEMxNS42MSAxMC42OSAxNiA5Ljg5IDE2IDlDMTYgNy4zNCAxNC42NiA2IDEzIDZTMTAgNy4zNCAxMCA5QzEwIDkuODkgMTAuMzkgMTAuNjkgMTEgMTEuMjRWMTIuNDZDOS44IDExLjc3IDkgMTAuNSA5IDlDOSA2Ljc5IDEwLjc5IDUgMTMgNU0yMCAyMC41QzE5Ljk3IDIxLjMyIDE5LjMyIDIxLjk3IDE4LjUgMjJIMTNDMTIuNjIgMjIgMTIuMjYgMjEuODUgMTIgMjEuNTdMOCAxNy4zN0w4Ljc0IDE2LjZDOC45MyAxNi4zOSA5LjIgMTYuMjggOS41IDE2LjI4SDkuN0wxMiAxOFY5QzEyIDguNDUgMTIuNDUgOCAxMyA4UzE0IDguNDUgMTQgOVYxMy40N0wxNS4yMSAxMy42TDE5LjE1IDE1Ljc5QzE5LjY4IDE2LjAzIDIwIDE2LjU2IDIwIDE3LjE0VjIwLjVNMjAgMkg0QzIuOSAyIDIgMi45IDIgNFYxMkMyIDEzLjExIDIuOSAxNCA0IDE0SDhWMTJMNCAxMkw0IDRIMjBMMjAgMTJIMThWMTRIMjBWMTMuOTZMMjAuMDQgMTRDMjEuMTMgMTQgMjIgMTMuMDkgMjIgMTJWNEMyMiAyLjkgMjEuMTEgMiAyMCAyWiIgLz48L3N2Zz4=", "name": "ButtonStates", @@ -22462,8 +22215,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -22471,8 +22222,6 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", "extraInformation": [ "Idle", "Hovered", @@ -22487,9 +22236,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -22497,9 +22243,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -22507,9 +22250,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -22517,9 +22257,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -23032,8 +22769,6 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -23043,8 +22778,6 @@ "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], @@ -23054,9 +22787,7 @@ "value": "", "type": "String", "label": "Idle state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "IdleEffect" }, { @@ -23065,16 +22796,13 @@ "label": "Focused state effect", "description": "The state is Focused when the button is hovered or held outside.", "group": "Effects", - "extraInformation": [], "name": "FocusedEffect" }, { "value": "", "type": "String", "label": "Pressed state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "PressedEffect" } ], @@ -23492,8 +23220,6 @@ "value": "", "type": "Behavior", "label": "Animatable capability", - "description": "", - "group": "", "extraInformation": [ "AnimatableCapability::AnimatableBehavior" ], @@ -23503,8 +23229,6 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -23514,9 +23238,7 @@ "value": "Idle", "type": "String", "label": "Idle state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "IdleAnimationName" }, { @@ -23525,16 +23247,13 @@ "label": "Focused state animation name", "description": "The state is Focused when the button is hovered or held outside.", "group": "Animation", - "extraInformation": [], "name": "FocusedAnimationName" }, { "value": "Pressed", "type": "String", "label": "Pressed state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "PressedAnimationName" } ], @@ -24937,8 +24656,6 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -24948,8 +24665,6 @@ "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], @@ -24959,9 +24674,7 @@ "value": "Effect", "type": "String", "label": "Effect name", - "description": "", "group": "Effect", - "extraInformation": [], "name": "EffectName" }, { @@ -24970,16 +24683,13 @@ "label": "Effect parameter", "description": "The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", "group": "Effect", - "extraInformation": [], "name": "EffectProperty" }, { "value": "0", "type": "Number", "label": "Idle effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], "name": "IdleValue" }, { @@ -24988,23 +24698,19 @@ "label": "Focused effect parameter value", "description": "The state is Focused when the button is hovered or held outside.", "group": "Value", - "extraInformation": [], "name": "FocusedValue" }, { "value": "0", "type": "Number", "label": "Pressed effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], "name": "PressedValue" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -25047,7 +24753,6 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -25091,9 +24796,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -25101,17 +24804,13 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "Idle", "Focused", @@ -25124,9 +24823,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenInitialValue" }, @@ -25134,9 +24830,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTargetedValue" }, @@ -25144,9 +24837,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTime" }, @@ -25154,8 +24844,6 @@ "value": "NoTween", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "NoTween", "FadeIn", @@ -25168,9 +24856,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "EffectValue" } @@ -26129,8 +25814,6 @@ "value": "", "type": "Behavior", "label": "Scalable capability", - "description": "", - "group": "", "extraInformation": [ "ScalableCapability::ScalableBehavior" ], @@ -26140,8 +25823,6 @@ "value": "", "type": "Behavior", "label": "Button states behavior (required)", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -26151,8 +25832,6 @@ "value": "", "type": "Behavior", "label": "Tween behavior (required)", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], @@ -26163,9 +25842,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Idle state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "IdleScale" }, { @@ -26175,7 +25852,6 @@ "label": "Focused state size scale", "description": "The state is Focused when the button is hovered or held outside.", "group": "Size", - "extraInformation": [], "name": "FocusedScale" }, { @@ -26183,9 +25859,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -26193,9 +25867,7 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { @@ -26203,16 +25875,13 @@ "type": "Number", "unit": "Dimensionless", "label": "Pressed state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "PressedScale" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -26255,7 +25924,6 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -26298,8 +25966,6 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "Idle", "Focused", @@ -27277,8 +26943,6 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -27288,8 +26952,6 @@ "value": "", "type": "Behavior", "label": "Tween", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], @@ -27299,9 +26961,7 @@ "value": "255;255;255", "type": "Color", "label": "Idle state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "IdleColorTint" }, { @@ -27310,16 +26970,13 @@ "label": "Focused state color tint", "description": "The state is Focused when the button is hovered or held outside.", "group": "Color", - "extraInformation": [], "name": "FocusedColorTint" }, { "value": "64;64;64", "type": "Color", "label": "Pressed state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "PressedColorTint" }, { @@ -27327,9 +26984,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -27337,16 +26992,13 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -27389,7 +27041,6 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -27432,8 +27083,6 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "Idle", "Focused", @@ -27453,6 +27102,7 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Platformer character animator", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGc+DQoJPHBhdGggZD0iTTIzLDExYzIuMiwwLDQtMS44LDQtNHMtMS44LTQtNC00cy00LDEuOC00LDRTMjAuOCwxMSwyMywxMXoiLz4NCgk8cGF0aCBkPSJNMzAuOCwxMi40Yy0wLjMtMC40LTEtMC41LTEuNC0wLjJsLTIuOSwyLjNjLTAuOCwwLjctMiwwLjYtMi43LTAuMmwtNy45LTcuOWMtMS42LTEuNi00LjEtMS42LTUuNywwTDcuMyw5LjMNCgkJYy0wLjQsMC40LTAuNCwxLDAsMS40czEsMC40LDEuNCwwbDIuOC0yLjhjMC44LTAuOCwyLjEtMC44LDIuOSwwbDEuNiwxLjZMMTEuNiwxNGMtMSwxLTEuNCwyLjMtMS4xLDMuN2MwLjIsMS4xLDAuOSwyLDEuOCwyLjYNCgkJbC0xLjYsMS42Yy0wLjQsMC40LTEsMC40LTEuNCwwbC0zLjYtMy42Yy0wLjQtMC40LTEtMC40LTEuNCwwcy0wLjQsMSwwLDEuNGwzLjYsMy42YzAuNiwwLjYsMS4zLDAuOSwyLjEsMC45czEuNi0wLjMsMi4xLTAuOQ0KCQlsMi4xLTIuMWwyLjUsMWMwLjcsMC4zLDEuMiwxLDEuMiwxLjh2NmMwLDAuNiwwLjQsMSwxLDFzMS0wLjQsMS0xdi02YzAtMS42LTEtMy4xLTIuNS0zLjdsLTEuNy0wLjdsNS4yLTUuMmwxLjQsMS40DQoJCWMwLjgsMC44LDEuOCwxLjIsMi45LDEuMmMwLjksMCwxLjgtMC4zLDIuNS0wLjlsMi45LTIuM0MzMS4xLDEzLjQsMzEuMSwxMi44LDMwLjgsMTIuNHoiLz4NCjwvZz4NCjwvc3ZnPg0K", "name": "PlatformerCharacterAnimator", @@ -28713,71 +28363,53 @@ "value": "true", "type": "Boolean", "label": "Enable animation changes", - "description": "", - "group": "", - "extraInformation": [], "name": "EnableAnimationChanges" }, { "value": "true", "type": "Boolean", "label": "Enable horizontal flipping", - "description": "", - "group": "", - "extraInformation": [], "name": "EnableHorizontalFlipping" }, { "value": "Idle", "type": "String", "label": "\"Idle\" animation name ", - "description": "", "group": "Animation names", - "extraInformation": [], "name": "IdleAnimationName" }, { "value": "Run", "type": "String", "label": "\"Run\" animation name", - "description": "", "group": "Animation names", - "extraInformation": [], "name": "RunAnimationName" }, { "value": "Jump", "type": "String", "label": "\"Jump\" animation name", - "description": "", "group": "Animation names", - "extraInformation": [], "name": "JumpAnimationName" }, { "value": "Fall", "type": "String", "label": "\"Fall\" animation name", - "description": "", "group": "Animation names", - "extraInformation": [], "name": "FallAnimationName" }, { "value": "Climb", "type": "String", "label": "\"Climb\" animation name", - "description": "", "group": "Animation names", - "extraInformation": [], "name": "ClimbAnimationName" }, { "value": "", "type": "Behavior", "label": "Platformer character", - "description": "", - "group": "", "extraInformation": [ "PlatformBehavior::PlatformerObjectBehavior" ], @@ -28787,8 +28419,6 @@ "value": "", "type": "Behavior", "label": "Animatable capacity", - "description": "", - "group": "", "extraInformation": [ "AnimatableCapability::AnimatableBehavior" ], @@ -28798,8 +28428,6 @@ "value": "", "type": "Behavior", "label": "Flippable capacity", - "description": "", - "group": "", "extraInformation": [ "FlippableCapability::FlippableBehavior" ], @@ -28816,6 +28444,7 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Rectangular movement", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNoYXBlLXJlY3RhbmdsZS1wbHVzIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE5LDZIMjJWOEgxOVYxMUgxN1Y4SDE0VjZIMTdWM0gxOVY2TTE3LDE3VjE0SDE5VjE5SDNWNkgxMVY4SDVWMTdIMTdaIiAvPjwvc3ZnPg==", "name": "RectangleMovement", @@ -32554,9 +32183,7 @@ "type": "Number", "unit": "Pixel", "label": "Width", - "description": "", "group": "Dimension", - "extraInformation": [], "name": "Width" }, { @@ -32564,18 +32191,14 @@ "type": "Number", "unit": "Pixel", "label": "Height", - "description": "", "group": "Dimension", - "extraInformation": [], "name": "Height" }, { "value": "true", "type": "Boolean", "label": "Clockwise", - "description": "", "group": "Speed", - "extraInformation": [], "name": "Clockwise" }, { @@ -32583,9 +32206,7 @@ "type": "Number", "unit": "Second", "label": "Horizontal edge duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "HorizontalEdgeDuration" }, { @@ -32593,18 +32214,13 @@ "type": "Number", "unit": "Second", "label": "Vertical edge duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "VerticalEdgeDuration" }, { "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Left" }, @@ -32612,9 +32228,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Top" }, @@ -32622,9 +32235,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Progress" }, @@ -32632,9 +32242,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldX" }, @@ -32642,9 +32249,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldY" }, @@ -32652,7 +32256,6 @@ "value": "easeInOutSine", "type": "Choice", "label": "Easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -32695,8 +32298,6 @@ "value": "Top-left corner", "type": "Choice", "label": "Initial position", - "description": "", - "group": "", "extraInformation": [ "Top-left corner", "Top-right corner", @@ -32709,9 +32310,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ToogleClockwise" } @@ -32726,12 +32324,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", + "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.4.6", + "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.", "", @@ -32748,6 +32347,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": [], @@ -32792,11 +32397,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -32805,11 +32409,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -32843,12 +32446,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -32858,11 +32461,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -32879,12 +32483,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -32907,12 +32511,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -32922,11 +32526,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -32945,12 +32548,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -32982,11 +32585,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -33016,23 +32618,22 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -33074,11 +32675,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -33093,11 +32693,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -33126,20 +32725,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -33148,11 +32747,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -33164,20 +32762,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -33186,11 +32784,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -33203,20 +32800,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -33225,11 +32822,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -33241,20 +32837,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -33263,11 +32859,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -33302,11 +32897,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -33318,11 +32912,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -33331,11 +32924,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -33348,11 +32940,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -33360,11 +32951,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -33373,11 +32963,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -33460,22 +33049,20 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -33510,11 +33097,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -33559,11 +33145,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -33608,11 +33193,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -33657,11 +33241,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -33683,11 +33266,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -33732,11 +33314,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -33781,11 +33362,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -33865,8 +33445,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -33874,8 +33452,6 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", "extraInformation": [ "Idle", "Hovered", @@ -33890,9 +33466,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -33900,9 +33473,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -33910,9 +33480,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -33920,9 +33487,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -33932,7 +33496,7 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 64, + "areaMaxX": 256, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, @@ -33941,8 +33505,258 @@ "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", - "isUsingLegacyInstancesRenderer": true, + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 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": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": 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": "", @@ -33972,7 +33786,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -33984,7 +33798,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -33992,14 +33806,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()" ] }, { @@ -34027,63 +33851,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" ] } ] @@ -34122,18 +33909,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": [ @@ -34195,12 +34011,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -34235,10 +34052,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -34247,7 +34064,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -34255,7 +34072,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -34266,10 +34083,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -34293,10 +34110,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -34313,10 +34131,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -34345,12 +34164,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -34390,10 +34210,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -34422,12 +34243,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -34479,12 +34301,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -34516,143 +34339,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": [ @@ -34663,79 +34349,64 @@ "type": "object" } ], - "objectGroups": [ + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "name": "Hovered" - }, + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsIdle" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ { - "name": "Pressed" + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] } ] } - ] + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] }, { - "description": "Check if the button is not used.", - "fullName": "Is idle", + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", "functionType": "Condition", - "name": "IsIdle", - "sentence": "_PARAM0_ is idle", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::IsIdle" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the button was just clicked.", - "fullName": "Is clicked", - "functionType": "Condition", - "name": "IsClicked", - "sentence": "_PARAM0_ is clicked", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsClicked" + "value": "PanelSpriteButton::ButtonFSM::IsClicked" }, "parameters": [ "Idle", @@ -34900,6 +34571,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -34908,21 +34580,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", - "LabelText" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -34937,17 +34601,17 @@ }, { "description": "Text", - "name": "LabelText", + "name": "Value", "type": "string" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", "sentence": "", "events": [ { @@ -34956,18 +34620,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Label", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -34979,12 +34643,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", @@ -34992,17 +34655,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Label.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -35015,65 +34678,35 @@ "objectGroups": [] }, { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" - ] - }, + "conditions": [ { "type": { - "value": "TextObject::WrappingWidth" + "value": "BooleanVariable" }, "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" + "ShouldActivate", + "True", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "SetCenterY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } + "Idle", + "ButtonFSM", + "yes" ] } ] @@ -35083,10 +34716,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", + "ShouldActivate", + "True", "" ] } @@ -35094,12 +34729,12 @@ "actions": [ { "type": { - "value": "MettreY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" + "Idle", + "ButtonFSM", + "no" ] } ] @@ -35111,126 +34746,123 @@ "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - } - ], - "objectGroups": [ + }, { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" } - ] + ], + "objectGroups": [] }, { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BehaviorActivated" }, "parameters": [ - "\"ShouldActivate\"" + "Idle", + "ButtonFSM" ] } ], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnBoolean" }, "parameters": [ - "Idle", - "ButtonFSM", - "yes" + "True" ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"ShouldActivate\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnNumber" }, "parameters": [ - "Idle", - "ButtonFSM", - "no" + "LabelOffset" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - }, - { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "BehaviorActivated" + "value": "SetCenterY" }, "parameters": [ - "Idle", - "ButtonFSM" + "Label", + "+", + "Value - LabelOffset" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "LabelOffset", + "=", + "Value" ] } ] @@ -35249,227 +34881,853 @@ ], "propertyDescriptors": [ { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "name": "PressedLabelOffsetY" + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" }, { - "value": "0", + "value": "0.25", "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "LeftPadding" + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" }, { "value": "0", "type": "Number", - "label": "Right padding", - "description": "", - "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", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "TopPadding" + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" }, { - "value": "0", - "type": "Number", - "label": "Bottom padding", - "description": "", - "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)", - "description": "", - "group": "", - "extraInformation": [], - "name": "HoveredFadeOutDuration" + "hidden": true, + "name": "_PropertyMapping" } ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 + "variants": [ + { + "areaMaxX": 192, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Medieval Button Beige 2", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "Button", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 64, + "g": 99, + "r": 133 + }, + "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": "Button", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "color": "133;99;64" + } + }, + { + "assetStoreId": "", + "bottomMargin": 11, + "height": 64, + "leftMargin": 7, + "name": "Idle", + "rightMargin": 7, + "texture": "Medieval Button Beige_Idle.png", + "tiled": false, + "topMargin": 7, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 11, + "height": 64, + "leftMargin": 7, + "name": "Hovered", + "rightMargin": 7, + "texture": "Medieval Button Beige_Hovered.png", + "tiled": false, + "topMargin": 7, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 7, + "height": 64, + "leftMargin": 7, + "name": "Pressed", + "rightMargin": 7, + "texture": "Medieval Button Beige_Pressed.png", + "tiled": false, + "topMargin": 11, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] }, - "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": "Text", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "0;0;0" - } - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "objectsGroups": [ { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] } ], - "effects": [], - "behaviors": [ + "layers": [ { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "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": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 52, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "d6340d76-d9e1-41b2-bc4f-1a39e5098dd3", + "width": 184, + "x": 4, + "y": 30, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ] }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + "areaMaxX": 192, + "areaMaxY": 69, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "569b45d3c7c34f7706563239938d04ca599016ff9857ee38c945c72330d4339e", + "assetStoreOriginalName": "Green Button With Shadow", + "name": "Green Button With Shadow", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "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": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Green Button With Shadow_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Green Button With Shadow_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Green Button With Shadow_Pressed.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ { - "name": "Tween", - "type": "Tween::TweenBehavior" + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 60, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "0fc63b9b-9e62-48c4-a3fa-576380a64e67", + "width": 188, + "x": 2, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ] }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Idle" - }, - { - "objectName": "Hovered" + "areaMaxX": 192, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "1cacfe2713f10642e8079542f28282d52f1bf46ae2dc27dc6c291a2970c90971", + "assetStoreOriginalName": "Medieval Button Beige", + "name": "Medieval Button Beige", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "Button", + "font": "CaesarDressing-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 64, + "g": 99, + "r": 133 + }, + "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": "Button", + "font": "CaesarDressing-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "color": "133;99;64" + } + }, + { + "assetStoreId": "", + "bottomMargin": 11, + "height": 64, + "leftMargin": 7, + "name": "Idle", + "rightMargin": 7, + "texture": "Medieval Button Beige_Idle.png", + "tiled": false, + "topMargin": 7, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 11, + "height": 64, + "leftMargin": 7, + "name": "Hovered", + "rightMargin": 7, + "texture": "Medieval Button Beige_Hovered.png", + "tiled": false, + "topMargin": 7, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 7, + "height": 64, + "leftMargin": 7, + "name": "Pressed", + "rightMargin": 7, + "texture": "Medieval Button Beige_Pressed.png", + "tiled": false, + "topMargin": 11, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] }, - { - "objectName": "Pressed" - } - ] - }, - "objectsGroups": [], - "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": [ + "objectsGroups": [ { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] } ], - "effects": [] + "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": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 52, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "d6340d76-d9e1-41b2-bc4f-1a39e5098dd3", + "width": 184, + "x": 4, + "y": 30, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] } - ], - "instances": [] + ] } ] } diff --git a/examples/pairs/pairs.json b/examples/pairs/pairs.json index b4e8e08e5..fcaa53a01 100644 --- a/examples/pairs/pairs.json +++ b/examples/pairs/pairs.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 213, + "build": 237, "major": 5, - "minor": 4, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Pairs", "description": "", @@ -55,7 +54,9 @@ ], "authorUsernames": [], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -67,7 +68,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "images/position_placeholder-1.png", "kind": "image", "metadata": "", @@ -76,7 +76,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "images/card_back.png", "kind": "image", "metadata": "", @@ -85,7 +84,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "images/card_blowfish.png", "kind": "image", "metadata": "", @@ -94,7 +92,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "images/card_crab.png", "kind": "image", "metadata": "", @@ -103,7 +100,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "images/card_seahorse.png", "kind": "image", "metadata": "", @@ -112,7 +108,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "images/card_snail.png", "kind": "image", "metadata": "", @@ -121,7 +116,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "images/card_seagrass.png", "kind": "image", "metadata": "", @@ -130,7 +124,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "images/card_coral.png", "kind": "image", "metadata": "", @@ -139,7 +132,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "images/card_anemone.png", "kind": "image", "metadata": "", @@ -148,7 +140,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "images/card_plasticbag.png", "kind": "image", "metadata": "", @@ -157,7 +148,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "images/board.png", "kind": "image", "metadata": "", @@ -173,7 +163,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "images/background.png", "kind": "image", "metadata": "", @@ -182,7 +171,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "images/star.png", "kind": "image", "metadata": "", @@ -191,7 +179,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "images/screen_fade-1.png", "kind": "image", "metadata": "", @@ -240,7 +227,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "images/card_back.png", "kind": "image", "metadata": "", @@ -249,7 +235,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "images/Button_Idle.png", "kind": "image", "metadata": "", @@ -258,7 +243,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "images/Button_Hovered.png", "kind": "image", "metadata": "", @@ -267,7 +251,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "images/Button_Pressed.png", "kind": "image", "metadata": "", @@ -288,8 +271,8 @@ { "b": 149, "disableInputWhenNotFocused": true, - "mangledName": "NewScene", - "name": "NewScene", + "mangledName": "Game", + "name": "Game", "r": 103, "standardSortMethod": true, "stopSoundsOnStartup": false, @@ -2198,6 +2181,7 @@ "text": "Pairs: ", "font": "fonts/LuckiestGuy.ttf", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 40, "color": "199;209;112" } @@ -2244,6 +2228,7 @@ "text": "New Game", "font": "fonts/LuckiestGuy.ttf", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 30, "color": "228;231;163" } @@ -2285,6 +2270,7 @@ "text": "You Won!", "font": "fonts/LuckiestGuy.ttf", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 120, "color": "247;247;247" } @@ -2311,6 +2297,8 @@ "particleAngleRandomness2": 0, "particleBlue1": 255, "particleBlue2": 255, + "particleColor1": "255;255;255", + "particleColor2": "255;255;255", "particleGravityX": 0, "particleGravityY": 0, "particleGreen1": 255, @@ -2495,10 +2483,13 @@ "assetStoreId": "", "name": "NewgameButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Light Green Glossy Button", "variables": [], "effects": [], "behaviors": [], - "content": {}, + "content": { + "LabelText": "New Game" + }, "childrenContent": { "Hovered": { "bottomMargin": 16, @@ -2551,6 +2542,7 @@ "text": "New Game", "font": "fonts/LuckiestGuy.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 30, "color": "255;255;255" } @@ -3249,7 +3241,7 @@ }, "parameters": [ "", - "\"NewScene\"", + "\"Game\"", "" ] } @@ -3382,12 +3374,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", + "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.4.4", + "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.", "", @@ -3404,6 +3397,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": [], @@ -3448,11 +3447,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -3461,11 +3459,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -3499,12 +3496,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -3514,11 +3511,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -3535,12 +3533,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -3563,12 +3561,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -3578,11 +3576,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -3593,20 +3590,20 @@ }, "parameters": [ "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -3638,11 +3635,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -3664,31 +3660,30 @@ }, "parameters": [ "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -3730,11 +3725,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -3749,11 +3743,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -3782,20 +3775,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -3804,11 +3797,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -3820,20 +3812,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -3842,11 +3834,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -3859,20 +3850,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -3881,11 +3872,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -3897,20 +3887,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -3919,11 +3909,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -3951,18 +3940,17 @@ }, "parameters": [ "", - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -3974,11 +3962,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -3987,11 +3974,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -4004,11 +3990,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -4016,11 +4001,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -4029,11 +4013,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -4116,22 +4099,20 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -4166,11 +4147,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -4215,11 +4195,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -4264,11 +4243,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -4313,11 +4291,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -4339,11 +4316,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -4388,11 +4364,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -4437,11 +4412,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -4490,7 +4464,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -4521,8 +4495,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -4530,8 +4502,6 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", "extraInformation": [ "Idle", "Hovered", @@ -4546,9 +4516,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -4556,9 +4523,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -4566,9 +4530,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -4576,9 +4537,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -4588,7 +4546,7 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 64, + "areaMaxX": 256, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, @@ -4597,95 +4555,265 @@ "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", - "isUsingLegacyInstancesRenderer": true, + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", - "eventsFunctions": [ + "objects": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 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": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Idle", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Hovered", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Pressed", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Hovered" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Pressed" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Hovered", - "=", - "1" - ] - } - ] + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" }, + { + "name": "Pressed" + } + ] + } + ], + "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": 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": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -4696,7 +4824,7 @@ "textG": 0, "textR": 0 }, - "comment": "Place the label over the backgrounds." + "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." }, { "type": "BuiltinCommonInstructions::Standard", @@ -4708,38 +4836,91 @@ }, "parameters": [ "", - "Label", + "Hovered", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Pressed", "0", "0", "" ] }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Hovered", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Pressed", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] + }, { "type": { "value": "ChangePlan" }, "parameters": [ - "Label", + "Hovered", "=", - "2" + "1" ] }, { "type": { - "value": "TextObject::SetWrapping" + "value": "ChangePlan" }, "parameters": [ - "Label", - "yes" + "Pressed", + "=", + "1" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Object", - "" + "Label", + "Text", + "=", + "LabelText" ] } ] @@ -4778,18 +4959,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": [ @@ -4851,12 +5061,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -4891,10 +5102,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -4903,7 +5114,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -4911,7 +5122,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -4922,10 +5133,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -4949,10 +5160,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -4969,10 +5181,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -5001,12 +5214,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -5046,10 +5260,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -5078,12 +5293,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -5135,12 +5351,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -5172,163 +5389,28 @@ } ], "parameters": [] - }, + } + ], + "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": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteButton::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" - ] - } - ] - } - ], - "parameters": [] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] - }, - { - "description": "Check if the button is not used.", - "fullName": "Is idle", - "functionType": "Condition", - "name": "IsIdle", - "sentence": "_PARAM0_ is idle", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { "value": "PanelSpriteButton::ButtonFSM::IsIdle" @@ -5539,6 +5621,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -5547,21 +5630,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", - "GetArgumentAsString(\"LabelText\")" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -5576,17 +5651,17 @@ }, { "description": "Text", - "name": "LabelText", + "name": "Value", "type": "string" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", "sentence": "", "events": [ { @@ -5595,18 +5670,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Label", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -5618,12 +5693,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", @@ -5631,17 +5705,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Label.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -5654,65 +5728,35 @@ "objectGroups": [] }, { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" - ] - }, + "conditions": [ { "type": { - "value": "TextObject::WrappingWidth" + "value": "BooleanVariable" }, "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" + "ShouldActivate", + "True", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "SetCenterY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } + "Idle", + "ButtonFSM", + "yes" ] } ] @@ -5722,10 +5766,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", + "ShouldActivate", + "True", "" ] } @@ -5733,12 +5779,12 @@ "actions": [ { "type": { - "value": "MettreY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" + "Idle", + "ButtonFSM", + "no" ] } ] @@ -5750,126 +5796,123 @@ "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - } - ], - "objectGroups": [ + }, { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" } - ] + ], + "objectGroups": [] }, { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BehaviorActivated" }, "parameters": [ - "\"ShouldActivate\"" + "Idle", + "ButtonFSM" ] } ], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnBoolean" }, "parameters": [ - "Idle", - "ButtonFSM", - "yes" + "True" ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"ShouldActivate\"" - ] - } - ], + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "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": "ActivateBehavior" + "value": "SetReturnNumber" }, "parameters": [ - "Idle", - "ButtonFSM", - "no" + "LabelOffset" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - }, - { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "BehaviorActivated" + "value": "SetCenterY" }, "parameters": [ - "Idle", - "ButtonFSM" + "Label", + "+", + "Value - LabelOffset" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "LabelOffset", + "=", + "Value" ] } ] @@ -5888,226 +5931,305 @@ ], "propertyDescriptors": [ { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "name": "PressedLabelOffsetY" + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" }, { - "value": "0", + "value": "0.25", "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "LeftPadding" + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" }, { "value": "0", "type": "Number", - "label": "Right padding", - "description": "", - "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", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "TopPadding" + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" }, { - "value": "0", - "type": "Number", - "label": "Bottom padding", - "description": "", - "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)", - "description": "", - "group": "", - "extraInformation": [], - "name": "HoveredFadeOutDuration" + "hidden": true, + "name": "_PropertyMapping" } ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 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": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": "0;0;0" - } - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "variants": [ + { + "areaMaxX": 197, + "areaMaxY": 64, + "areaMaxZ": 1, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Light Green Glossy Button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "fonts/LuckiestGuy.ttf", + "textAlignment": "center", + "characterSize": 30, + "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": "Text", + "font": "fonts/LuckiestGuy.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 30, + "color": "255;255;255" + } + }, { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "assetStoreId": "", + "bottomMargin": 16, + "height": 64, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "images\\Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 197, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 64, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "images\\Button_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 197, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 64, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "images\\Button_Pressed.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 197, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] } ], - "effects": [], - "behaviors": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + ], + "layers": [ { - "name": "Tween", - "type": "Tween::TweenBehavior" + "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": false, + "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": 197, + "x": 0, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Idle" - }, - { - "objectName": "Hovered" - }, - { - "objectName": "Pressed" - } - ] - }, - "objectsGroups": [], - "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": [] + ] } ] }, @@ -6116,6 +6238,7 @@ "category": "Visual effect", "extensionNamespace": "", "fullName": "3D Flip", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZsaXAtaG9yaXpvbnRhbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNSAyMUgxN1YxOUgxNU0xOSA5SDIxVjdIMTlNMyA1VjE5QzMgMjAuMSAzLjkgMjEgNSAyMUg5VjE5SDVWNUg5VjNINUMzLjkgMyAzIDMuOSAzIDVNMTkgM1Y1SDIxQzIxIDMuOSAyMC4xIDMgMTkgM00xMSAyM0gxM1YxSDExTTE5IDE3SDIxVjE1SDE5TTE1IDVIMTdWM0gxNU0xOSAxM0gyMVYxMUgxOU0xOSAyMUMyMC4xIDIxIDIxIDIwLjEgMjEgMTlIMTlaIiAvPjwvc3ZnPg==", "name": "ThreeDFlip", @@ -7421,8 +7544,6 @@ "value": "", "type": "Behavior", "label": "Resizable capability", - "description": "", - "group": "", "extraInformation": [ "ResizableCapability::ResizableBehavior" ], @@ -7432,8 +7553,6 @@ "value": "", "type": "Behavior", "label": "Flippable capability", - "description": "", - "group": "", "extraInformation": [ "FlippableCapability::FlippableBehavior" ], @@ -7443,8 +7562,6 @@ "value": "", "type": "Behavior", "label": "Animatable capability", - "description": "", - "group": "", "extraInformation": [ "AnimatableCapability::AnimatableBehavior" ], @@ -7454,8 +7571,6 @@ "value": "Mirror", "type": "Choice", "label": "Flipping method", - "description": "", - "group": "", "extraInformation": [ "Mirror", "Animation" @@ -7466,27 +7581,20 @@ "value": "Front", "type": "String", "label": "Front animation name", - "description": "", "group": "Animation method", - "extraInformation": [], "name": "FrontAnimation" }, { "value": "Back", "type": "String", "label": "Back animation name", - "description": "", "group": "Animation method", - "extraInformation": [], "name": "BackAnimation" }, { "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Duration" }, @@ -7494,9 +7602,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsFlipped" }, @@ -7504,9 +7609,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Width" }, @@ -7514,9 +7616,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ElapsedTime" }, @@ -7524,9 +7623,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Toggle" } @@ -7541,6 +7637,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Button states and effects", + "gdevelopVersion": "", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtdGFwLWJ1dHRvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMyA1QzE1LjIxIDUgMTcgNi43OSAxNyA5QzE3IDEwLjUgMTYuMiAxMS43NyAxNSAxMi40NlYxMS4yNEMxNS42MSAxMC42OSAxNiA5Ljg5IDE2IDlDMTYgNy4zNCAxNC42NiA2IDEzIDZTMTAgNy4zNCAxMCA5QzEwIDkuODkgMTAuMzkgMTAuNjkgMTEgMTEuMjRWMTIuNDZDOS44IDExLjc3IDkgMTAuNSA5IDlDOSA2Ljc5IDEwLjc5IDUgMTMgNU0yMCAyMC41QzE5Ljk3IDIxLjMyIDE5LjMyIDIxLjk3IDE4LjUgMjJIMTNDMTIuNjIgMjIgMTIuMjYgMjEuODUgMTIgMjEuNTdMOCAxNy4zN0w4Ljc0IDE2LjZDOC45MyAxNi4zOSA5LjIgMTYuMjggOS41IDE2LjI4SDkuN0wxMiAxOFY5QzEyIDguNDUgMTIuNDUgOCAxMyA4UzE0IDguNDUgMTQgOVYxMy40N0wxNS4yMSAxMy42TDE5LjE1IDE1Ljc5QzE5LjY4IDE2LjAzIDIwIDE2LjU2IDIwIDE3LjE0VjIwLjVNMjAgMkg0QzIuOSAyIDIgMi45IDIgNFYxMkMyIDEzLjExIDIuOSAxNCA0IDE0SDhWMTJMNCAxMkw0IDRIMjBMMjAgMTJIMThWMTRIMjBWMTMuOTZMMjAuMDQgMTRDMjEuMTMgMTQgMjIgMTMuMDkgMjIgMTJWNEMyMiAyLjkgMjEuMTEgMiAyMCAyWiIgLz48L3N2Zz4=", "name": "ButtonStates", @@ -8690,8 +8787,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -8699,8 +8794,6 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", "extraInformation": [ "Idle", "Hovered", @@ -8715,9 +8808,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -8725,9 +8815,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -8735,9 +8822,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -8745,9 +8829,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -9260,8 +9341,6 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -9271,8 +9350,6 @@ "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], @@ -9282,9 +9359,7 @@ "value": "", "type": "String", "label": "Idle state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "IdleEffect" }, { @@ -9293,16 +9368,13 @@ "label": "Focused state effect", "description": "The state is Focused when the button is hovered or held outside.", "group": "Effects", - "extraInformation": [], "name": "FocusedEffect" }, { "value": "", "type": "String", "label": "Pressed state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "PressedEffect" } ], @@ -9720,8 +9792,6 @@ "value": "", "type": "Behavior", "label": "Animatable capability", - "description": "", - "group": "", "extraInformation": [ "AnimatableCapability::AnimatableBehavior" ], @@ -9731,8 +9801,6 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -9742,9 +9810,7 @@ "value": "Idle", "type": "String", "label": "Idle state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "IdleAnimationName" }, { @@ -9753,16 +9819,13 @@ "label": "Focused state animation name", "description": "The state is Focused when the button is hovered or held outside.", "group": "Animation", - "extraInformation": [], "name": "FocusedAnimationName" }, { "value": "Pressed", "type": "String", "label": "Pressed state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "PressedAnimationName" } ], @@ -11165,8 +11228,6 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -11176,8 +11237,6 @@ "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], @@ -11187,9 +11246,7 @@ "value": "Effect", "type": "String", "label": "Effect name", - "description": "", "group": "Effect", - "extraInformation": [], "name": "EffectName" }, { @@ -11198,16 +11255,13 @@ "label": "Effect parameter", "description": "The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", "group": "Effect", - "extraInformation": [], "name": "EffectProperty" }, { "value": "0", "type": "Number", "label": "Idle effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], "name": "IdleValue" }, { @@ -11216,23 +11270,19 @@ "label": "Focused effect parameter value", "description": "The state is Focused when the button is hovered or held outside.", "group": "Value", - "extraInformation": [], "name": "FocusedValue" }, { "value": "0", "type": "Number", "label": "Pressed effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], "name": "PressedValue" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -11275,7 +11325,6 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -11319,9 +11368,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -11329,17 +11376,13 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "Idle", "Focused", @@ -11352,9 +11395,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenInitialValue" }, @@ -11362,9 +11402,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTargetedValue" }, @@ -11372,9 +11409,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTime" }, @@ -11382,8 +11416,6 @@ "value": "NoTween", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "NoTween", "FadeIn", @@ -11396,9 +11428,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "EffectValue" } @@ -12357,8 +12386,6 @@ "value": "", "type": "Behavior", "label": "Scalable capability", - "description": "", - "group": "", "extraInformation": [ "ScalableCapability::ScalableBehavior" ], @@ -12368,8 +12395,6 @@ "value": "", "type": "Behavior", "label": "Button states behavior (required)", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -12379,8 +12404,6 @@ "value": "", "type": "Behavior", "label": "Tween behavior (required)", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], @@ -12391,9 +12414,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Idle state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "IdleScale" }, { @@ -12403,7 +12424,6 @@ "label": "Focused state size scale", "description": "The state is Focused when the button is hovered or held outside.", "group": "Size", - "extraInformation": [], "name": "FocusedScale" }, { @@ -12411,9 +12431,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -12421,9 +12439,7 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { @@ -12431,16 +12447,13 @@ "type": "Number", "unit": "Dimensionless", "label": "Pressed state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "PressedScale" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -12483,7 +12496,6 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -12526,8 +12538,6 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "Idle", "Focused", @@ -13505,8 +13515,6 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -13516,8 +13524,6 @@ "value": "", "type": "Behavior", "label": "Tween", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], @@ -13527,9 +13533,7 @@ "value": "255;255;255", "type": "Color", "label": "Idle state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "IdleColorTint" }, { @@ -13538,16 +13542,13 @@ "label": "Focused state color tint", "description": "The state is Focused when the button is hovered or held outside.", "group": "Color", - "extraInformation": [], "name": "FocusedColorTint" }, { "value": "64;64;64", "type": "Color", "label": "Pressed state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "PressedColorTint" }, { @@ -13555,9 +13556,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -13565,16 +13564,13 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -13617,7 +13613,6 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -13660,8 +13655,6 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "Idle", "Focused", @@ -13681,6 +13674,7 @@ "category": "Game mechanic", "extensionNamespace": "", "fullName": "Object Stack", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTE4LDI5SDhjLTIuMiwwLTQtMS44LTQtNFY3YzAtMi4yLDEuOC00LDQtNGgxMGMyLjIsMCw0LDEuOCw0LDR2MThDMjIsMjcuMiwyMC4yLDI5LDE4LDI5eiIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIyLDYuNGw1LDNjMS45LDEuMSwyLjUsMy42LDEuMyw1LjVMMjIsMjUuNSIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI4LDE2bDAuNSwwLjdjMS4zLDEuOCwwLjgsNC4zLTEsNS42bC01LjcsNCIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjgiIHkxPSI3IiB4Mj0iOCIgeTI9IjkiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjIzIiB4Mj0iMTgiIHkyPSIyNSIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTEwLjQsMTYuNmMwLjUsMC41LDEuMywwLjUsMS44LDBsMC44LTAuOGwwLjgsMC44YzAuNSwwLjUsMS4zLDAuNSwxLjgsMGMwLjUtMC41LDAuNS0xLjQsMC0xLjlsLTAuOC0wLjhMMTMsMTINCglsLTEuOCwxLjlsLTAuOCwwLjhDOS45LDE1LjIsOS45LDE2LjEsMTAuNCwxNi42eiIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjEyIiB5MT0iMjAiIHgyPSIxNCIgeTI9IjIwIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMTMiIHkxPSIxNyIgeDI9IjEzIiB5Mj0iMTkiLz4NCjwvc3ZnPg0K", "name": "ObjectStack", @@ -14842,6 +14836,7 @@ "category": "", "extensionNamespace": "", "fullName": "", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "", "name": "Card", @@ -14958,6 +14953,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/papa-is-you/papa-is-you.json b/examples/papa-is-you/papa-is-you.json index 48c8a3d73..afa115279 100644 --- a/examples/papa-is-you/papa-is-you.json +++ b/examples/papa-is-you/papa-is-you.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 237, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Papa Is You", "description": "Building upon the sokoban example gamein GDevelop, this example uses mechanics similar to those found in Baba is You, a hit indie puzzle game made by Arvi Teikari in 2019.\n\nIn this example you play using typical sokoban controls, but you'll also move text blocks that can turn on and off different logic to solve puzzles in the game. With the eventual goal of each level being to put an object with the \"win\" logic in collision with an object with the \"controlled\" logic.", @@ -82,7 +81,9 @@ "authorIds": [], "authorUsernames": [], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -94,7 +95,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Marker.png", "kind": "image", "metadata": "", @@ -103,7 +103,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ReturnMarker.png", "kind": "image", "metadata": "", @@ -112,7 +111,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Player.png", "kind": "image", "metadata": "", @@ -121,7 +119,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Stone.png", "kind": "image", "metadata": "", @@ -130,7 +127,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/CrateUnpicked.png", "kind": "image", "metadata": "", @@ -139,7 +135,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/CratePicked.png", "kind": "image", "metadata": "", @@ -148,7 +143,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Ground.png", "kind": "image", "metadata": "", @@ -157,7 +151,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/BlankBlock.png", "kind": "image", "metadata": "", @@ -166,7 +159,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Restart.png", "kind": "image", "metadata": "", @@ -175,7 +167,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Text_Is.png", "kind": "image", "metadata": "", @@ -184,7 +175,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Test_Man.png", "kind": "image", "metadata": "", @@ -193,7 +183,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Text_You.png", "kind": "image", "metadata": "", @@ -202,7 +191,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Text_Box.png", "kind": "image", "metadata": "", @@ -211,7 +199,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Text_Push.png", "kind": "image", "metadata": "", @@ -220,7 +207,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Text_Rock.png", "kind": "image", "metadata": "", @@ -229,7 +215,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Text_Stop.png", "kind": "image", "metadata": "", @@ -238,7 +223,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Star.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -247,7 +231,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Text_Star.png", "kind": "image", "metadata": "", @@ -256,7 +239,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Text_Win.png", "kind": "image", "metadata": "", @@ -265,7 +247,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Rewind.png", "kind": "image", "metadata": "", @@ -274,7 +255,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/D-pad up.png", "kind": "image", "metadata": "", @@ -283,7 +263,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/D-pad right.png", "kind": "image", "metadata": "", @@ -292,7 +271,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/D-pad left.png", "kind": "image", "metadata": "", @@ -301,7 +279,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/D-pad bottom.png", "kind": "image", "metadata": "", @@ -310,7 +287,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "thumbnail.png", "kind": "image", "metadata": "", @@ -319,7 +295,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Sokoban Icon.png", "kind": "image", "metadata": "", @@ -328,7 +303,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "desktop-icon-512.png", "kind": "image", "metadata": "", @@ -337,7 +311,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "android-icon-192.png", "kind": "image", "metadata": "", @@ -346,7 +319,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "android-icon-144.png", "kind": "image", "metadata": "", @@ -355,7 +327,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "android-icon-96.png", "kind": "image", "metadata": "", @@ -364,7 +335,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "android-icon-72.png", "kind": "image", "metadata": "", @@ -373,7 +343,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "android-icon-48.png", "kind": "image", "metadata": "", @@ -382,7 +351,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "android-icon-36.png", "kind": "image", "metadata": "", @@ -391,7 +359,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "android-windowSplashScreenAnimatedIcon.png", "kind": "image", "metadata": "", @@ -400,7 +367,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-1024.png", "kind": "image", "metadata": "", @@ -409,7 +375,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-180.png", "kind": "image", "metadata": "", @@ -418,7 +383,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-167.png", "kind": "image", "metadata": "", @@ -427,7 +391,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-152.png", "kind": "image", "metadata": "", @@ -436,7 +399,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-144.png", "kind": "image", "metadata": "", @@ -445,7 +407,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-120.png", "kind": "image", "metadata": "", @@ -454,7 +415,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-114.png", "kind": "image", "metadata": "", @@ -463,7 +423,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-100.png", "kind": "image", "metadata": "", @@ -472,7 +431,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-87.png", "kind": "image", "metadata": "", @@ -481,7 +439,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-80.png", "kind": "image", "metadata": "", @@ -490,7 +447,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-76.png", "kind": "image", "metadata": "", @@ -499,7 +455,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-72.png", "kind": "image", "metadata": "", @@ -508,7 +463,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-60.png", "kind": "image", "metadata": "", @@ -517,7 +471,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-58.png", "kind": "image", "metadata": "", @@ -526,7 +479,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-57.png", "kind": "image", "metadata": "", @@ -535,7 +487,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-50.png", "kind": "image", "metadata": "", @@ -544,7 +495,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-40.png", "kind": "image", "metadata": "", @@ -553,7 +503,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-29.png", "kind": "image", "metadata": "", @@ -562,7 +511,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-20.png", "kind": "image", "metadata": "", @@ -600,7 +548,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, - "zoomFactor": 0.45986522709186245, + "zoomFactor": 0.7077344239866599, "windowMask": false }, "objectsGroups": [ @@ -699,20 +647,7 @@ }, { "name": "OnScreenButton", - "objects": [ - { - "name": "UpButton" - }, - { - "name": "RightButton" - }, - { - "name": "LeftButton" - }, - { - "name": "DownButton" - } - ] + "objects": [] } ], "variables": [ @@ -2638,21 +2573,6 @@ "stringProperties": [], "initialVariables": [] }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "UI", - "name": "ReverseTurnButton", - "persistentUuid": "16a3b360-dafc-4a50-bd8c-41039a64c90f", - "width": 0, - "x": 1184, - "y": 128, - "zOrder": 43, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, { "angle": 0, "customSize": false, @@ -2848,36 +2768,6 @@ "stringProperties": [], "initialVariables": [] }, - { - "angle": 0, - "customSize": true, - "height": 64, - "layer": "", - "name": "UpButton", - "persistentUuid": "e8a9a722-3076-44f8-ab6a-68bce8149cb6", - "width": 64, - "x": 608, - "y": 502, - "zOrder": 45, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "height": 64, - "layer": "", - "name": "RightButton", - "persistentUuid": "474f8bd1-9203-4fea-ac99-1af1a1506228", - "width": 64, - "x": 672, - "y": 566, - "zOrder": 46, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, { "angle": 0, "customSize": false, @@ -3103,36 +2993,6 @@ "stringProperties": [], "initialVariables": [] }, - { - "angle": 0, - "customSize": true, - "height": 64, - "layer": "", - "name": "LeftButton", - "persistentUuid": "de971e01-3fd2-42df-8016-f99d340300ae", - "width": 64, - "x": 544, - "y": 566, - "zOrder": 47, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "height": 64, - "layer": "", - "name": "DownButton", - "persistentUuid": "f041291c-0967-4eda-9eef-619fe41e4e28", - "width": 64, - "x": 608, - "y": 630, - "zOrder": 48, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, { "angle": 0, "customSize": false, @@ -3163,21 +3023,6 @@ "stringProperties": [], "initialVariables": [] }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "ResetGameButton", - "persistentUuid": "a78bb416-4270-4a6e-ac91-9f9d1e1e5ae1", - "width": 0, - "x": 1184, - "y": 32, - "zOrder": 49, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, { "angle": 0, "customSize": false, @@ -3237,6 +3082,102 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "UpButton", + "persistentUuid": "b5b7ba0b-d545-48f4-9d6e-7b95f514463f", + "width": 64, + "x": 608, + "y": 502, + "zOrder": 52, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "DownButton", + "persistentUuid": "7d0b6e17-8f33-40f1-acd6-b781ed2deb20", + "width": 64, + "x": 608, + "y": 630, + "zOrder": 53, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "LeftButton", + "persistentUuid": "a1409c66-7da6-4513-ade9-102f478d49c7", + "width": 64, + "x": 544, + "y": 566, + "zOrder": 54, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "RightButton", + "persistentUuid": "0d4d70e2-349c-48ad-9b7b-38e5680b8f34", + "width": 64, + "x": 672, + "y": 566, + "zOrder": 55, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "ResetGameButton", + "persistentUuid": "653c020c-7d67-41da-af49-1d19b582ddfa", + "width": 64, + "x": 1184, + "y": 32, + "zOrder": 56, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "ReverseTurnButton", + "persistentUuid": "b90dcc76-8622-4ab5-b880-76a1dd68f752", + "width": 64, + "x": 1184, + "y": 128, + "zOrder": 57, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ @@ -3840,172 +3781,6 @@ "effects": [], "behaviors": [] }, - { - "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", - "name": "ReverseTurnButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 0, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 64, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\Directional Arrow Quarter Circle.png", - "tiled": false, - "topMargin": 0, - "width": 64 - }, - "Idle": { - "bottomMargin": 0, - "height": 64, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\Directional Arrow Quarter Circle.png", - "tiled": false, - "topMargin": 0, - "width": 64 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 60, - "color": { - "b": 99, - "g": 69, - "r": 28 - }, - "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", - "characterSize": 60, - "color": "28;69;99" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 64, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\Directional Arrow Quarter Circle.png", - "tiled": false, - "topMargin": 0, - "width": 64 - } - } - }, - { - "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", - "name": "ResetGameButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 0, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 64, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\Directional Arrow Full Circle.png", - "tiled": false, - "topMargin": 0, - "width": 64 - }, - "Idle": { - "bottomMargin": 0, - "height": 64, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\Directional Arrow Full Circle.png", - "tiled": false, - "topMargin": 0, - "width": 64 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 60, - "color": { - "b": 99, - "g": 69, - "r": 28 - }, - "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", - "characterSize": 60, - "color": "28;69;99" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 64, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\Directional Arrow Full Circle.png", - "tiled": false, - "topMargin": 0, - "width": 64 - } - } - }, { "assetStoreId": "", "bold": false, @@ -4056,6 +3831,7 @@ "text": "You Win!", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 200, "color": "255;255;255" } @@ -4973,447 +4749,212 @@ ] }, { + "adaptCollisionMaskAutomatically": true, "assetStoreId": "", "name": "UpButton", - "type": "PanelSpriteButton::PanelSpriteButton", + "type": "Sprite", + "updateIfNotVisible": false, "variables": [], "effects": [], - "behaviors": [], - "content": { - "HoveredFadeOutDuration": 0 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "D-pad up.png", - "tiled": false, - "topMargin": 0, - "width": 32 - }, - "Idle": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "D-pad up.png", - "tiled": false, - "topMargin": 0, - "width": 32 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 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": "", - "characterSize": 20, - "color": "0;0;0" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "D-pad up.png", - "tiled": false, - "topMargin": 0, - "width": 32 + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 2.0247e-320 } - } + ], + "animations": [ + { + "name": "default", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "D-pad up.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 61, + "y": 0 + }, + { + "x": 61, + "y": 76 + }, + { + "x": 0, + "y": 76 + } + ] + ] + } + ] + } + ] + } + ] }, { + "adaptCollisionMaskAutomatically": true, "assetStoreId": "", - "name": "RightButton", - "type": "PanelSpriteButton::PanelSpriteButton", + "name": "DownButton", + "type": "Sprite", + "updateIfNotVisible": false, "variables": [], "effects": [], - "behaviors": [], - "content": { - "HoveredFadeOutDuration": 0 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "D-pad right.png", - "tiled": false, - "topMargin": 0, - "width": 32 - }, - "Idle": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "D-pad right.png", - "tiled": false, - "topMargin": 0, - "width": 32 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 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": "", - "characterSize": 20, - "color": "0;0;0" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "D-pad right.png", - "tiled": false, - "topMargin": 0, - "width": 32 + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 2.0247e-320 } - } - }, - { - "assetStoreId": "", - "name": "LeftButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "HoveredFadeOutDuration": 0 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "D-pad left.png", - "tiled": false, - "topMargin": 0, - "width": 32 - }, - "Idle": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "D-pad left.png", - "tiled": false, - "topMargin": 0, - "width": 32 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 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": "", - "characterSize": 20, - "color": "0;0;0" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "D-pad left.png", - "tiled": false, - "topMargin": 0, - "width": 32 + ], + "animations": [ + { + "name": "default", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "D-pad bottom.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 61, + "y": 1 + }, + { + "x": 61, + "y": 75 + }, + { + "x": 0, + "y": 75 + } + ] + ] + } + ] + } + ] } - } + ] }, { + "adaptCollisionMaskAutomatically": true, "assetStoreId": "", - "name": "DownButton", - "type": "PanelSpriteButton::PanelSpriteButton", + "name": "LeftButton", + "type": "Sprite", + "updateIfNotVisible": false, "variables": [], "effects": [], - "behaviors": [], - "content": { - "HoveredFadeOutDuration": 0 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "D-pad bottom.png", - "tiled": false, - "topMargin": 0, - "width": 32 - }, - "Idle": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "D-pad bottom.png", - "tiled": false, - "topMargin": 0, - "width": 32 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 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": "", - "characterSize": 20, - "color": "0;0;0" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "D-pad bottom.png", - "tiled": false, - "topMargin": 0, - "width": 32 - } - } - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "folderName": "UI", - "children": [ - { - "objectName": "DownButton" - }, - { - "objectName": "LeftButton" - }, - { - "objectName": "RightButton" - }, - { - "objectName": "UpButton" - }, - { - "objectName": "YouWin" - }, - { - "objectName": "ResetGameButton" - }, - { - "objectName": "ReverseTurnButton" - } - ] - }, - { - "objectName": "Player" - }, - { - "objectName": "Box" - }, - { - "objectName": "WallBlock" - }, - { - "objectName": "Marker" - }, - { - "objectName": "ReturnMarker" - }, - { - "objectName": "Star" - }, - { - "objectName": "VoidWall" - }, - { - "objectName": "Floor" - }, - { - "objectName": "TextIs" - }, - { - "objectName": "TextMan" - }, - { - "objectName": "TextYou" - }, - { - "objectName": "TextBox" - }, - { - "objectName": "TextPush" - }, - { - "objectName": "TextRock" - }, - { - "objectName": "TextStop" - }, - { - "objectName": "TextStar" - }, - { - "objectName": "TextWin" - } - ] - }, - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DepartScene" - }, - "parameters": [ - "" - ] - } - ], - "actions": [ + "behaviors": [ { - "type": { - "value": "SetStringVariable" - }, - "parameters": [ - "GameState", - "=", - "\"WaitPlayerInput\"" - ] + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 2.0247e-320 } ], - "events": [ + "animations": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SystemInfo::HasTouchScreen" - }, - "parameters": [ - "" - ] - } - ], - "actions": [ + "name": "default", + "useMultipleDirections": false, + "directions": [ { - "type": { - "value": "Delete" - }, - "parameters": [ - "OnScreenButton", - "" + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "D-pad left.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 75, + "y": 0 + }, + { + "x": 75, + "y": 61 + }, + { + "x": 0, + "y": 61 + } + ] + ] + } ] } ] @@ -5421,516 +4962,525 @@ ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Wait for player input", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "RightButton", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "GameState", - "=", - "\"WaitPlayerInput\"" - ] - } - ], - "actions": [], - "events": [ + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 2.0247e-320 + } + ], + "animations": [ + { + "name": "default", + "useMultipleDirections": false, + "directions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [], - "events": [ + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "hasCustomCollisionMask": true, + "image": "D-pad right.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 }, - "comment": "In games like Baba is You, game rules are not set in stone.\nThe text blocks form sentenses that define the rules.\nA set of boolean variables are used to know what a block can do:\n- Controlled, move with arrows\n- Push, can be pushed by other blocks\n- Stop, can't be moved\n- Win, the game is won when a controlled block reach one of them\n- none of the above, don't do anything, they don't even have collision" - }, - { - "type": "BuiltinCommonInstructions::Link", - "include": { - "includeConfig": 0 + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 }, - "target": "FindAndUpdateRulesFromTextBlocks" - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Check game success", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "customCollisionMask": [ + [ + { + "x": 1, + "y": 0 }, - "comment": "The game is won if a \"Controlled\" object is in collision with a \"Win\" object, or if a single object has both of those variables set to true.\nThis is checked by creating a marker object on top of any object that has a true \"Win\" variable, and then checking if that is in collision with an object that has the \"Controlled\" variable set to true." - }, - { - "type": "BuiltinCommonInstructions::ForEach", - "object": "AllObjects", - "conditions": [ - { - "type": { - "value": "BooleanObjectVariable" - }, - "parameters": [ - "AllObjects", - "Win", - "True" - ] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Marker", - "AllObjects.X()", - "AllObjects.Y()", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionNP" - }, - "parameters": [ - "Marker", - "AllObjects", - "", - "", - "" - ] - }, - { - "type": { - "value": "BooleanObjectVariable" - }, - "parameters": [ - "AllObjects", - "Controlled", - "True" - ] - } - ], - "actions": [ - { - "type": { - "value": "ShowLayer" - }, - "parameters": [ - "", - "\"WinGame\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "Marker", - "" - ] - } - ] - } - ], - "parameters": [] + { + "x": 75, + "y": 0 + }, + { + "x": 75, + "y": 61 + }, + { + "x": 1, + "y": 61 + } + ] + ] } ] - }, + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "ResetGameButton", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 2.0247e-320 + } + ], + "animations": [ + { + "name": "default", + "useMultipleDirections": false, + "directions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Player input", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "hasCustomCollisionMask": true, + "image": "assets\\Directional Arrow Full Circle.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 }, - "comment": "Check in which direction the player intend to move." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetNumberVariable" + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 5, + "y": 5 }, - "parameters": [ - "XMove", - "=", - "0" - ] - }, - { - "type": { - "value": "SetNumberVariable" + { + "x": 143, + "y": 5 }, - "parameters": [ - "YMove", - "=", - "0" - ] - }, - { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "IsAnyArrowPressed", - "False" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": [ - "LeftButton", - "" - ] - }, - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "Left" - ] - }, - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "a" - ] - } - ] - }, - { - "type": { - "value": "BooleanVariable" - }, - "parameters": [ - "IsAnyArrowPressed", - "False", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "XMove", - "=", - "-64" - ] - }, - { - "type": { - "value": "SetBooleanVariable" + { + "x": 143, + "y": 142 }, - "parameters": [ - "IsAnyArrowPressed", - "True" - ] - } + { + "x": 5, + "y": 142 + } + ] ] - }, + } + ] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "ReverseTurnButton", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 2.0247e-320 + } + ], + "animations": [ + { + "name": "default", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": [ - "DownButton", - "" - ] - }, - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "Down" - ] - }, - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "s" - ] - } - ] - }, - { - "type": { - "value": "BooleanVariable" + "hasCustomCollisionMask": true, + "image": "assets\\Directional Arrow Quarter Circle.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 5, + "y": 5 }, - "parameters": [ - "IsAnyArrowPressed", - "False" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetNumberVariable" + { + "x": 101, + "y": 5 }, - "parameters": [ - "YMove", - "=", - "64" - ] - }, - { - "type": { - "value": "SetBooleanVariable" + { + "x": 101, + "y": 86 }, - "parameters": [ - "IsAnyArrowPressed", - "True" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": [ - "UpButton", - "" - ] - }, - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "Up" - ] - }, - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "w" - ] - } - ] - }, - { - "type": { - "value": "BooleanVariable" - }, - "parameters": [ - "IsAnyArrowPressed", - "False" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "YMove", - "=", - "-64" - ] - }, - { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "IsAnyArrowPressed", - "True" - ] - } + { + "x": 5, + "y": 86 + } + ] ] + } + ] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "UI", + "children": [ + { + "objectName": "DownButton" + }, + { + "objectName": "LeftButton" + }, + { + "objectName": "RightButton" + }, + { + "objectName": "UpButton" + }, + { + "objectName": "YouWin" + }, + { + "objectName": "ResetGameButton" + }, + { + "objectName": "ReverseTurnButton" + } + ] + }, + { + "objectName": "Player" + }, + { + "objectName": "Box" + }, + { + "objectName": "WallBlock" + }, + { + "objectName": "Marker" + }, + { + "objectName": "ReturnMarker" + }, + { + "objectName": "Star" + }, + { + "objectName": "VoidWall" + }, + { + "objectName": "Floor" + }, + { + "objectName": "TextIs" + }, + { + "objectName": "TextMan" + }, + { + "objectName": "TextYou" + }, + { + "objectName": "TextBox" + }, + { + "objectName": "TextPush" + }, + { + "objectName": "TextRock" + }, + { + "objectName": "TextStop" + }, + { + "objectName": "TextStar" + }, + { + "objectName": "TextWin" + } + ] + }, + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "GameState", + "=", + "\"WaitPlayerInput\"" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SystemInfo::HasTouchScreen" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "OnScreenButton", + "" + ] + } + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Wait for player input", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "GameState", + "=", + "\"WaitPlayerInput\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "In games like Baba is You, game rules are not set in stone.\nThe text blocks form sentenses that define the rules.\nA set of boolean variables are used to know what a block can do:\n- Controlled, move with arrows\n- Push, can be pushed by other blocks\n- Stop, can't be moved\n- Win, the game is won when a controlled block reach one of them\n- none of the above, don't do anything, they don't even have collision" }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "type": "BuiltinCommonInstructions::Link", + "include": { + "includeConfig": 0 + }, + "target": "FindAndUpdateRulesFromTextBlocks" + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check game success", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "BuiltinCommonInstructions::Or" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": [ - "RightButton", - "" - ] - }, + "comment": "The game is won if a \"Controlled\" object is in collision with a \"Win\" object, or if a single object has both of those variables set to true.\nThis is checked by creating a marker object on top of any object that has a true \"Win\" variable, and then checking if that is in collision with an object that has the \"Controlled\" variable set to true." + }, + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "AllObjects", + "conditions": [ { "type": { - "value": "KeyPressed" + "value": "BooleanObjectVariable" }, "parameters": [ - "", - "Right" + "AllObjects", + "Win", + "True" ] - }, + } + ], + "actions": [ { "type": { - "value": "KeyPressed" + "value": "Create" }, "parameters": [ "", - "d" + "Marker", + "AllObjects.X()", + "AllObjects.Y()", + "" ] } ] }, { - "type": { - "value": "BooleanVariable" - }, - "parameters": [ - "IsAnyArrowPressed", - "False" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "XMove", - "=", - "64" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "Marker", + "AllObjects", + "", + "", + "" + ] + }, + { + "type": { + "value": "BooleanObjectVariable" + }, + "parameters": [ + "AllObjects", + "Controlled", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "ShowLayer" + }, + "parameters": [ + "", + "\"WinGame\"" + ] + } ] }, { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "IsAnyArrowPressed", - "True" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Marker", + "" + ] + } ] } - ] + ], + "parameters": [] } - ], - "parameters": [] + ] }, { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Push and collision checks", + "name": "Player input", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -5944,316 +5494,447 @@ "textG": 0, "textR": 0 }, - "comment": "When players are trying to move..." + "comment": "Check in which direction the player intend to move." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "XMove", + "=", + "0" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "YMove", + "=", + "0" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsAnyArrowPressed", + "False" + ] + } + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "LeftButton", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "a" + ] + } + ] + }, { "type": { "value": "BooleanVariable" }, "parameters": [ "IsAnyArrowPressed", - "True" + "False", + "" ] } ], - "actions": [], - "events": [ + "actions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Look for free cells to go", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "XMove", + "=", + "-64" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsAnyArrowPressed", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" }, - "comment": "...check if this is really possible.\n\nEvery controlled object checks if they can move in the direction asked by the player.\nA marker is used to check each cell in that direction. It will move from one cell to the next." + "parameters": [ + "DownButton", + "ButtonFSM", + "" + ] }, { - "type": "BuiltinCommonInstructions::ForEach", - "object": "AllObjects", - "conditions": [ - { - "type": { - "value": "BooleanObjectVariable" - }, - "parameters": [ - "AllObjects", - "Controlled", - "True" - ] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Marker", - "AllObjects.X() + XMove", - "AllObjects.Y() + YMove", - "\"\"" - ] - }, - { - "type": { - "value": "SetStringObjectVariable" - }, - "parameters": [ - "AllObjects", - "Direction", - "=", - "\"Move\"" - ] - } + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Down" ] }, { - "type": "BuiltinCommonInstructions::ForEach", - "object": "Marker", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The marker is on a pushable object.\nThis pushable object could maybe be pushed..." - }, - { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ - { - "type": { - "value": "CollisionNP" - }, - "parameters": [ - "Marker", - "AllObjects", - "", - "", - "" - ] - }, - { - "type": { - "value": "BooleanObjectVariable" - }, - "parameters": [ - "AllObjects", - "Push", - "True" - ] - } - ], - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "...move the marker to check the next cell." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetStringObjectVariable" - }, - "parameters": [ - "AllObjects", - "Direction", - "=", - "\"Move\"" - ] - }, - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Marker", - "=", - "Marker.X() + XMove", - "=", - "Marker.Y() + YMove" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "When the marker reached a controlled object, we remve the marker because this controlled object already have a marker on the next cell.\nThis other marker will continue to look further there is no need to do it 2 times." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionNP" - }, - "parameters": [ - "Marker", - "AllObjects", - "", - "", - "" - ] - }, - { - "type": { - "value": "BooleanObjectVariable" - }, - "parameters": [ - "AllObjects", - "Controlled", - "True" - ] - } - ], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "Marker", - "" - ] - } - ] - } + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "s" ] } - ], - "parameters": [] + ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Reached walls", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsAnyArrowPressed", + "False" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "YMove", + "=", + "64" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsAnyArrowPressed", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" }, - "comment": "When the marker has finished moving and the cell contains a stop object, it means that there is actually no room to move.\nWe have to go back and tell objects they can't move. ReturnMarker is used for this." + "parameters": [ + "UpButton", + "ButtonFSM", + "" + ] }, { - "type": "BuiltinCommonInstructions::ForEach", - "object": "Marker", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionNP" - }, - "parameters": [ - "Marker", - "AllObjects", - "", - "", - "" - ] - }, - { - "type": { - "value": "BooleanObjectVariable" - }, - "parameters": [ - "AllObjects", - "Stop", - "True" - ] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "ReturnMarker", - "Marker.X() - XMove", - "Marker.Y() - YMove", - "\"\"" - ] - }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "Marker", - "" - ] - } + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Up" + ] + }, + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "w" + ] + } + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsAnyArrowPressed", + "False" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "YMove", + "=", + "-64" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsAnyArrowPressed", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "RightButton", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Right" + ] + }, + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "d" + ] + } + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsAnyArrowPressed", + "False" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "XMove", + "=", + "64" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsAnyArrowPressed", + "True" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Push and collision checks", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "When players are trying to move..." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsAnyArrowPressed", + "True" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Look for free cells to go", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "...check if this is really possible.\n\nEvery controlled object checks if they can move in the direction asked by the player.\nA marker is used to check each cell in that direction. It will move from one cell to the next." + }, + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "AllObjects", + "conditions": [ + { + "type": { + "value": "BooleanObjectVariable" + }, + "parameters": [ + "AllObjects", + "Controlled", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Marker", + "AllObjects.X() + XMove", + "AllObjects.Y() + YMove", + "\"\"" + ] + }, + { + "type": { + "value": "SetStringObjectVariable" + }, + "parameters": [ + "AllObjects", + "Direction", + "=", + "\"Move\"" ] } ] }, { "type": "BuiltinCommonInstructions::ForEach", - "object": "ReturnMarker", + "object": "Marker", "conditions": [], "actions": [], "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The marker is on a pushable object.\nThis pushable object could maybe be pushed..." + }, { "infiniteLoopWarning": true, "type": "BuiltinCommonInstructions::While", @@ -6263,7 +5944,7 @@ "value": "CollisionNP" }, "parameters": [ - "ReturnMarker", + "Marker", "AllObjects", "", "", @@ -6272,23 +5953,236 @@ }, { "type": { - "value": "StringObjectVariable" + "value": "BooleanObjectVariable" }, "parameters": [ "AllObjects", - "Direction", - "=", - "\"Move\"" + "Push", + "True" ] } ], "conditions": [], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "SetStringObjectVariable" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ + "comment": "...move the marker to check the next cell." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringObjectVariable" + }, + "parameters": [ + "AllObjects", + "Direction", + "=", + "\"Move\"" + ] + }, + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "Marker", + "=", + "Marker.X() + XMove", + "=", + "Marker.Y() + YMove" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "When the marker reached a controlled object, we remve the marker because this controlled object already have a marker on the next cell.\nThis other marker will continue to look further there is no need to do it 2 times." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "Marker", + "AllObjects", + "", + "", + "" + ] + }, + { + "type": { + "value": "BooleanObjectVariable" + }, + "parameters": [ + "AllObjects", + "Controlled", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Marker", + "" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Reached walls", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "When the marker has finished moving and the cell contains a stop object, it means that there is actually no room to move.\nWe have to go back and tell objects they can't move. ReturnMarker is used for this." + }, + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "Marker", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "Marker", + "AllObjects", + "", + "", + "" + ] + }, + { + "type": { + "value": "BooleanObjectVariable" + }, + "parameters": [ + "AllObjects", + "Stop", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "ReturnMarker", + "Marker.X() - XMove", + "Marker.Y() - YMove", + "\"\"" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Marker", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "ReturnMarker", + "conditions": [], + "actions": [], + "events": [ + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "ReturnMarker", + "AllObjects", + "", + "", + "" + ] + }, + { + "type": { + "value": "StringObjectVariable" + }, + "parameters": [ + "AllObjects", + "Direction", + "=", + "\"Move\"" + ] + } + ], + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringObjectVariable" + }, + "parameters": [ "AllObjects", "Direction", "=", @@ -6312,197 +6206,3624 @@ ] } ], - "parameters": [] + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Move objects that can", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Blue markers that still exist are on free cells. It means that at least one block can move there." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneInstancesCount" + }, + "parameters": [ + "", + "Marker", + ">", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save all objects position before moving them.\nThese positions are used to undo moves." + }, + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "AllObjects", + "conditions": [], + "actions": [ + { + "type": { + "value": "PushNumberToObjectVariable" + }, + "parameters": [ + "AllObjects", + "XPositions", + "AllObjects.X()" + ] + }, + { + "type": { + "value": "PushNumberToObjectVariable" + }, + "parameters": [ + "AllObjects", + "YPositions", + "AllObjects.Y()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move any object that was marked to move, and set a wait timer to toggle the DidMovementTweenEnd at the time the movement tween would have ended." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringObjectVariable" + }, + "parameters": [ + "AllObjects", + "Direction", + "=", + "\"Move\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::AddObjectPositionTween" + }, + "parameters": [ + "AllObjects", + "Tween", + "\"Move\"", + "AllObjects.X() + XMove", + "AllObjects.Y() + YMove", + "\"easeOutCubic\"", + "200", + "" + ] + }, + { + "type": { + "value": "SetStringObjectVariable" + }, + "parameters": [ + "AllObjects", + "Direction", + "=", + "\"None\"" + ] + }, + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "GameState", + "=", + "\"PlayMovementAnimation\"" + ] + }, + { + "type": { + "value": "Wait" + }, + "parameters": [ + "0.2" + ] + }, + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "GameState", + "=", + "\"WaitPlayerInput\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Marker", + "" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "ReturnMarker", + "" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Go back a turn", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Use the previous positions saved for every object to move objects back to their position from the previous turn.\nThese positions are removed from the array, so doing it again will go back one step further." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsClicked" + }, + "parameters": [ + "ReverseTurnButton", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "AllObjects.VariableChildCount(YPositions)", + ">", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "AllObjects", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreX" + }, + "parameters": [ + "AllObjects", + "=", + "AllObjects.XPositions[AllObjects.VariableChildCount(XPositions) - 1]" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "AllObjects", + "=", + "AllObjects.YPositions[AllObjects.VariableChildCount(YPositions) - 1]" + ] + }, + { + "type": { + "value": "ObjectVariableRemoveAt" + }, + "parameters": [ + "AllObjects", + "XPositions", + "AllObjects.VariableChildCount(XPositions) - 1" + ] + }, + { + "type": { + "value": "ObjectVariableRemoveAt" + }, + "parameters": [ + "AllObjects", + "YPositions", + "AllObjects.VariableChildCount(YPositions) - 1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Link", + "include": { + "includeConfig": 0 + }, + "target": "FindAndUpdateRulesFromTextBlocks" + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "PlayMovementAnimation", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "GameState", + "=", + "\"PlayMovementAnimation\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Nothing is done in this state.\nThe game state is set back to the other state after the wait action above." + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Reset game", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsClicked" + }, + "parameters": [ + "ResetGameButton", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Scene" + }, + "parameters": [ + "", + "CurrentSceneName()", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "layers": [ + { + "ambientLightColorB": 0, + "ambientLightColorG": 8013136, + "ambientLightColorR": 16, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", + "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": [] + }, + { + "ambientLightColorB": 150995058, + "ambientLightColorG": 6062976, + "ambientLightColorR": 17605944, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "UI", + "renderingType": "", + "visibility": true, + "cameras": [], + "effects": [] + }, + { + "ambientLightColorB": 19559488, + "ambientLightColorG": 6062976, + "ambientLightColorR": 19255888, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "WinGame", + "renderingType": "", + "visibility": false, + "cameras": [], + "effects": [] + } + ], + "behaviorsSharedData": [ + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM" + }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + } + ], + "externalEvents": [ + { + "associatedLayout": "SokobanWithBooleans", + "name": "FindAndUpdateRulesFromTextBlocks", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Search rules", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Find rules defined by text blocks.\n\nSubjects are:\n- Man\n- Box\n- Rock\n- Star\n\nActions are:\n- You\n- Push\n- Stop\n- Win\n\nThey form sentenses like: \"Box is Push\"." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringObjectVariable" + }, + "parameters": [ + "TextIs", + "HorizontalSubject", + "=", + "\"\"" + ] + }, + { + "type": { + "value": "SetStringObjectVariable" + }, + "parameters": [ + "TextIs", + "HorizontalAction", + "=", + "\"\"" + ] + }, + { + "type": { + "value": "SetStringObjectVariable" + }, + "parameters": [ + "TextIs", + "VerticalSubject", + "=", + "\"\"" + ] + }, + { + "type": { + "value": "SetStringObjectVariable" + }, + "parameters": [ + "TextIs", + "VerticalAction", + "=", + "\"\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Look around IS blocks." + }, + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "TextIs", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Look up vertically." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Text", + "TextIs.PointX(\"TopCheck\")", + "TextIs.PointY(\"TopCheck\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringObjectVariable" + }, + "parameters": [ + "TextIs", + "HorizontalSubject", + "=", + "Text.Text" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Text", + "TextIs.PointX(\"BottomCheck\")", + "TextIs.PointY(\"BottomCheck\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringObjectVariable" + }, + "parameters": [ + "TextIs", + "HorizontalAction", + "=", + "Text.Text" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Look up horizontally." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Text", + "TextIs.PointX(\"LeftCheck\")", + "TextIs.PointY(\"RightCheck\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringObjectVariable" + }, + "parameters": [ + "TextIs", + "VerticalSubject", + "=", + "Text.Text" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Text", + "TextIs.PointX(\"RightCheck\")", + "TextIs.PointY(\"RightCheck\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringObjectVariable" + }, + "parameters": [ + "TextIs", + "VerticalAction", + "+", + "Text.Text" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Set rules", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reset any rules previously given to objects." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanObjectVariable" + }, + "parameters": [ + "ObjectsWithoutText", + "Stop", + "False", + "" + ] + }, + { + "type": { + "value": "SetBooleanObjectVariable" + }, + "parameters": [ + "ObjectsWithoutText", + "Push", + "False" + ] + }, + { + "type": { + "value": "SetBooleanObjectVariable" + }, + "parameters": [ + "ObjectsWithoutText", + "Controlled", + "False" + ] + }, + { + "type": { + "value": "SetBooleanObjectVariable" + }, + "parameters": [ + "ObjectsWithoutText", + "Win", + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Set new rules on objects." + }, + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "TextIs", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringObjectVariable" + }, + "parameters": [ + "TextIs", + "HorizontalSubject", + "=", + "\"Man\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PapaIsYou::EnableAction" + }, + "parameters": [ + "", + "Player", + "TextIs.HorizontalAction", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringObjectVariable" + }, + "parameters": [ + "TextIs", + "VerticalSubject", + "=", + "\"Man\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PapaIsYou::EnableAction" + }, + "parameters": [ + "", + "Player", + "TextIs.VerticalAction", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringObjectVariable" + }, + "parameters": [ + "TextIs", + "HorizontalSubject", + "=", + "\"Box\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PapaIsYou::EnableAction" + }, + "parameters": [ + "", + "Box", + "TextIs.HorizontalAction", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringObjectVariable" + }, + "parameters": [ + "TextIs", + "VerticalSubject", + "=", + "\"Box\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PapaIsYou::EnableAction" + }, + "parameters": [ + "", + "Box", + "TextIs.VerticalAction", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringObjectVariable" + }, + "parameters": [ + "TextIs", + "HorizontalSubject", + "=", + "\"Rock\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PapaIsYou::EnableAction" + }, + "parameters": [ + "", + "WallBlock", + "TextIs.HorizontalAction", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringObjectVariable" + }, + "parameters": [ + "TextIs", + "VerticalSubject", + "=", + "\"Rock\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PapaIsYou::EnableAction" + }, + "parameters": [ + "", + "WallBlock", + "TextIs.VerticalAction", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringObjectVariable" + }, + "parameters": [ + "TextIs", + "HorizontalSubject", + "=", + "\"Star\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PapaIsYou::EnableAction" + }, + "parameters": [ + "", + "Star", + "TextIs.HorizontalAction", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringObjectVariable" + }, + "parameters": [ + "TextIs", + "VerticalSubject", + "=", + "\"Star\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PapaIsYou::EnableAction" + }, + "parameters": [ + "", + "Star", + "TextIs.VerticalAction", + "" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "eventsFunctionsExtensions": [ + { + "author": "", + "category": "", + "extensionNamespace": "", + "fullName": "", + "gdevelopVersion": "", + "helpPath": "", + "iconUrl": "", + "name": "PapaIsYou", + "previewIconUrl": "", + "shortDescription": "", + "version": "", + "description": "", + "tags": [], + "authorIds": [], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Enable an action for the object", + "fullName": "Enable action", + "functionType": "Action", + "name": "EnableAction", + "sentence": "Enable the _PARAM2_ action for _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsString" + }, + "parameters": [ + "\"Action\"", + "=", + "\"Win\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "Win", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsString" + }, + "parameters": [ + "\"Action\"", + "=", + "\"Stop\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "Stop", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsString" + }, + "parameters": [ + "\"Action\"", + "=", + "\"Push\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "Push", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsString" + }, + "parameters": [ + "\"Action\"", + "=", + "\"You\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "Controlled", + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "", + "name": "Object", + "type": "objectList" + }, + { + "description": "Action", + "name": "Action", + "type": "string" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "User interface", + "extensionNamespace": "", + "fullName": "Button states and effects", + "gdevelopVersion": ">=5.5.222", + "helpPath": "/objects/button", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtdGFwLWJ1dHRvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMyA1QzE1LjIxIDUgMTcgNi43OSAxNyA5QzE3IDEwLjUgMTYuMiAxMS43NyAxNSAxMi40NlYxMS4yNEMxNS42MSAxMC42OSAxNiA5Ljg5IDE2IDlDMTYgNy4zNCAxNC42NiA2IDEzIDZTMTAgNy4zNCAxMCA5QzEwIDkuODkgMTAuMzkgMTAuNjkgMTEgMTEuMjRWMTIuNDZDOS44IDExLjc3IDkgMTAuNSA5IDlDOSA2Ljc5IDEwLjc5IDUgMTMgNU0yMCAyMC41QzE5Ljk3IDIxLjMyIDE5LjMyIDIxLjk3IDE4LjUgMjJIMTNDMTIuNjIgMjIgMTIuMjYgMjEuODUgMTIgMjEuNTdMOCAxNy4zN0w4Ljc0IDE2LjZDOC45MyAxNi4zOSA5LjIgMTYuMjggOS41IDE2LjI4SDkuN0wxMiAxOFY5QzEyIDguNDUgMTIuNDUgOCAxMyA4UzE0IDguNDUgMTQgOVYxMy40N0wxNS4yMSAxMy42TDE5LjE1IDE1Ljc5QzE5LjY4IDE2LjAzIDIwIDE2LjU2IDIwIDE3LjE0VjIwLjVNMjAgMkg0QzIuOSAyIDIgMi45IDIgNFYxMkMyIDEzLjExIDIuOSAxNCA0IDE0SDhWMTJMNCAxMkw0IDRIMjBMMjAgMTJIMThWMTRIMjBWMTMuOTZMMjAuMDQgMTRDMjEuMTMgMTQgMjIgMTMuMDkgMjIgMTJWNEMyMiAyLjkgMjEuMTEgMiAyMCAyWiIgLz48L3N2Zz4=", + "name": "ButtonStates", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", + "shortDescription": "Use any object as a button and change appearance according to user interactions.", + "version": "1.3.1", + "description": [ + "Use the \"Button states\" behavior to track user interactions with an object, including:", + "", + "- Hovered", + "- Pressed", + "- Clicked", + "- Idle", + "", + "Add additional behaviors to make juicy buttons with animated responses to user input:", + "", + "- Size", + "- Color", + "- Animation", + "- Object effects" + ], + "origin": { + "identifier": "ButtonStates", + "name": "gdevelop-extension-store" + }, + "tags": [ + "ui", + "button" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Use objects as buttons.", + "fullName": "Button states", + "name": "ButtonFSM", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Finite state machine", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The \"Validated\" state only last one frame." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure the cursor position is only checked once per frame." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "+", + "1" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reset the state of the button.", + "fullName": "Reset state", + "functionType": "Action", + "name": "ResetState", + "private": true, + "sentence": "Reset the button state of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", + "functionType": "Condition", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed outside with mouse or touch.", + "fullName": "Is held outside", + "functionType": "Condition", + "name": "IsPressedOutside", + "sentence": "_PARAM0_ is held outside", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the touch id that is using the button or 0 if none.", + "fullName": "Touch id", + "functionType": "ExpressionAndCondition", + "name": "TouchId", + "sentence": "the touch id", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TouchId" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "Should check hovering", + "hidden": true, + "name": "ShouldCheckHovering" + }, + { + "value": "Idle", + "type": "Choice", + "label": "State", + "extraInformation": [ + "Idle", + "Hovered", + "PressedInside", + "PressedOutside", + "Validated" + ], + "hidden": true, + "name": "State" + }, + { + "value": "0", + "type": "Number", + "label": "Touch id", + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Boolean", + "label": "Touch is inside", + "hidden": true, + "name": "TouchIsInside" + }, + { + "value": "", + "type": "Boolean", + "label": "Mouse is inside", + "hidden": true, + "name": "MouseIsInside" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "Index" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Enable effects on buttons based on their state.", + "fullName": "Button object effects", + "name": "ButtonObjectEffects", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "IdleEffect", + "yes" + ] + }, + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "FocusedEffect", + "no" + ] + }, + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "PressedEffect", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "States", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "IdleEffect", + "no" + ] + }, + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "FocusedEffect", + "no" + ] + }, + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "PressedEffect", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "IdleEffect", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "IdleEffect", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "FocusedEffect", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "FocusedEffect", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PressedEffect", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "PressedEffect", + "yes" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the idle state effect of the object.", + "fullName": "Idle state effect", + "functionType": "ExpressionAndCondition", + "group": "Button object effects configuration", + "name": "IdleEffect", + "sentence": "the idle state effect", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "IdleEffect" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleEffect", + "name": "SetIdleEffect", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleEffect", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the focused state effect of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state effect", + "functionType": "ExpressionAndCondition", + "group": "Button object effects configuration", + "name": "FocusedEffect", + "sentence": "the focused state effect", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "FocusedEffect" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedEffect", + "name": "SetFocusedEffect", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "FocusedEffect", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed state effect of the object.", + "fullName": "Pressed state effect", + "functionType": "ExpressionAndCondition", + "group": "Button object effects configuration", + "name": "PressedEffect", + "sentence": "the pressed state effect", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "PressedEffect" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedEffect", + "name": "SetPressedEffect", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PressedEffect", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Button states", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "name": "ButtonFSM" + }, + { + "value": "", + "type": "Behavior", + "label": "Effect capability", + "extraInformation": [ + "EffectCapability::EffectBehavior" + ], + "name": "Effect" + }, + { + "value": "", + "type": "String", + "label": "Idle state effect", + "group": "Effects", + "name": "IdleEffect" + }, + { + "value": "", + "type": "String", + "label": "Focused state effect", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Effects", + "name": "FocusedEffect" + }, + { + "value": "", + "type": "String", + "label": "Pressed state effect", + "group": "Effects", + "name": "PressedEffect" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Change the animation of buttons according to their state.", + "fullName": "Button animation", + "name": "ButtonAnimationName", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "IdleAnimationName" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Change based on state", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "IdleAnimationName" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "FocusedAnimationName" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "PressedAnimationName" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the idle state animation name of the object.", + "fullName": "Idle state animation name", + "functionType": "ExpressionAndCondition", + "group": "Button animation configuration", + "name": "IdleAnimationName", + "sentence": "the idle state animation name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "IdleAnimationName" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleAnimationName", + "name": "SetIdleAnimationName", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleAnimationName", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the focused state animation name of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state animation name", + "functionType": "ExpressionAndCondition", + "group": "Button animation configuration", + "name": "FocusedAnimationName", + "sentence": "the focused state animation name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "FocusedAnimationName" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedAnimationName", + "name": "SetFocusedAnimationName", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "FocusedAnimationName", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed state animation name of the object.", + "fullName": "Pressed state animation name", + "functionType": "ExpressionAndCondition", + "group": "Button animation configuration", + "name": "PressedAnimationName", + "sentence": "the pressed state animation name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "PressedAnimationName" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedAnimationName", + "name": "SetPressedAnimationName", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PressedAnimationName", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Animatable capability", + "extraInformation": [ + "AnimatableCapability::AnimatableBehavior" + ], + "name": "Animation" + }, + { + "value": "", + "type": "Behavior", + "label": "Button states", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "name": "ButtonFSM" + }, + { + "value": "Idle", + "type": "String", + "label": "Idle state animation name", + "group": "Animation", + "name": "IdleAnimationName" + }, + { + "value": "Focused", + "type": "String", + "label": "Focused state animation name", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Animation", + "name": "FocusedAnimationName" + }, + { + "value": "Pressed", + "type": "String", + "label": "Pressed state animation name", + "group": "Animation", + "name": "PressedAnimationName" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Smoothly change an effect on buttons according to their state.", + "fullName": "Button object effect tween", + "name": "ButtonObjectEffectTween", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "EffectValue", + "=", + "IdleValue" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "States", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "IdleValue", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "FocusedValue", + "" + ] + } + ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Move objects that can", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "StringVariable" }, - "comment": "Blue markers that still exist are on free cells. It means that at least one block can move there." - }, + "parameters": [ + "PreviousState", + "=", + "\"Pressed\"" + ] + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SceneInstancesCount" - }, - "parameters": [ - "", - "Marker", - ">", - "0" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Save all objects position before moving them.\nThese positions are used to undo moves." - }, - { - "type": "BuiltinCommonInstructions::ForEach", - "object": "AllObjects", - "conditions": [], - "actions": [ - { - "type": { - "value": "PushNumberToObjectVariable" - }, - "parameters": [ - "AllObjects", - "XPositions", - "AllObjects.X()" - ] - }, - { - "type": { - "value": "PushNumberToObjectVariable" - }, - "parameters": [ - "AllObjects", - "YPositions", - "AllObjects.Y()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Move any object that was marked to move, and set a wait timer to toggle the DidMovementTweenEnd at the time the movement tween would have ended." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringObjectVariable" - }, - "parameters": [ - "AllObjects", - "Direction", - "=", - "\"Move\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Tween::AddObjectPositionTween" - }, - "parameters": [ - "AllObjects", - "Tween", - "\"Move\"", - "AllObjects.X() + XMove", - "AllObjects.Y() + YMove", - "\"easeOutCubic\"", - "200", - "" - ] - }, - { - "type": { - "value": "SetStringObjectVariable" - }, - "parameters": [ - "AllObjects", - "Direction", - "=", - "\"None\"" - ] - }, - { - "type": { - "value": "SetStringVariable" - }, - "parameters": [ - "GameState", - "=", - "\"PlayMovementAnimation\"" - ] - }, - { - "type": { - "value": "Wait" - }, - "parameters": [ - "0.2" - ] - }, - { - "type": { - "value": "SetStringVariable" - }, - "parameters": [ - "GameState", - "=", - "\"WaitPlayerInput\"" - ] - } - ] - } + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Focused\"" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "Marker", - "" - ] - }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "ReturnMarker", - "" - ] - } + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "FocusedValue", + "" ] } - ], - "parameters": [] + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Pressed\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "PressedValue", + "" + ] } ] } @@ -6514,898 +9835,1367 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Go back a turn", + "name": "Tween", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Use the previous positions saved for every object to move objects back to their position from the previous turn.\nThese positions are removed from the array, so doing it again will go back one step further." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + "value": "StringVariable" }, "parameters": [ - "ReverseTurnButton", - "" + "TweenState", + "=", + "\"FadeIn\"" ] - }, + } + ], + "actions": [ { "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" + "value": "ButtonStates::ButtonObjectEffectTween::PlayTween" }, "parameters": [ - "AllObjects.VariableChildCount(YPositions)", - ">", - "0" + "Object", + "Behavior", + "FadeInDuration", + "FadeInEasing", + "" ] } - ], - "actions": [], - "events": [ + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::ForEach", - "object": "AllObjects", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreX" - }, - "parameters": [ - "AllObjects", - "=", - "AllObjects.XPositions[AllObjects.VariableChildCount(XPositions) - 1]" - ] - }, - { - "type": { - "value": "MettreY" - }, - "parameters": [ - "AllObjects", - "=", - "AllObjects.YPositions[AllObjects.VariableChildCount(YPositions) - 1]" - ] - }, - { - "type": { - "value": "ObjectVariableRemoveAt" - }, - "parameters": [ - "AllObjects", - "XPositions", - "AllObjects.VariableChildCount(XPositions) - 1" - ] - }, - { - "type": { - "value": "ObjectVariableRemoveAt" - }, - "parameters": [ - "AllObjects", - "YPositions", - "AllObjects.VariableChildCount(YPositions) - 1" - ] - } + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"FadeOut\"" ] - }, + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Link", - "include": { - "includeConfig": 0 + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::PlayTween" }, - "target": "FindAndUpdateRulesFromTextBlocks" + "parameters": [ + "Object", + "Behavior", + "FadeOutDuration", + "FadeOutEasing", + "" + ] } ] } ], "parameters": [] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "PlayMovementAnimation", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "fullName": "Time delta", + "functionType": "Expression", + "name": "TimeDelta", + "private": true, + "sentence": "", + "events": [ { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "GameState", - "=", - "\"PlayMovementAnimation\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TimeDelta() * LayerTimeScale(Object.Layer())" + ] + } ] } ], - "actions": [], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade in", + "functionType": "Action", + "name": "FadeIn", + "private": true, + "sentence": "_PARAM0_ fade in to _PARAM2_", "events": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Nothing is done in this state.\nThe game state is set back to the other state after the wait action above." + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTime", + "=", + "0" + ] + }, + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"FadeIn\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenInitialValue", + "=", + "EffectValue" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTargetedValue", + "=", + "Value" + ] + } + ] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Reset game", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "fullName": "Fade out", + "functionType": "Action", + "name": "FadeOut", + "private": true, + "sentence": "_PARAM0_ fade out to _PARAM2_", + "events": [ { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" - }, - "parameters": [ - "ResetGameButton", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTime", + "=", + "0" + ] + }, + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"FadeOut\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenInitialValue", + "=", + "EffectValue" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTargetedValue", + "=", + "Value" + ] + } ] } ], - "actions": [ + "parameters": [ { - "type": { - "value": "Scene" - }, - "parameters": [ - "", - "CurrentSceneName()", - "" - ] + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" } - ] - } - ], - "parameters": [] - } - ], - "layers": [ - { - "ambientLightColorB": 0, - "ambientLightColorG": 8013136, - "ambientLightColorR": 16, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 0.1, - "cameraType": "perspective", - "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": [] - }, - { - "ambientLightColorB": 150995058, - "ambientLightColorG": 6062976, - "ambientLightColorR": 17605944, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 0.1, - "cameraType": "perspective", - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "UI", - "renderingType": "", - "visibility": true, - "cameras": [], - "effects": [] - }, - { - "ambientLightColorB": 19559488, - "ambientLightColorG": 6062976, - "ambientLightColorR": 19255888, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 0.1, - "cameraType": "perspective", - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "WinGame", - "renderingType": "", - "visibility": false, - "cameras": [], - "effects": [] - } - ], - "behaviorsSharedData": [ - { - "name": "Animation", - "type": "AnimatableCapability::AnimatableBehavior" - }, - { - "name": "Effect", - "type": "EffectCapability::EffectBehavior" - }, - { - "name": "Flippable", - "type": "FlippableCapability::FlippableBehavior" - }, - { - "name": "Opacity", - "type": "OpacityCapability::OpacityBehavior" - }, - { - "name": "Resizable", - "type": "ResizableCapability::ResizableBehavior" - }, - { - "name": "Scale", - "type": "ScalableCapability::ScalableBehavior" - }, - { - "name": "Text", - "type": "TextContainerCapability::TextContainerBehavior" - }, - { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ] - } - ], - "externalEvents": [ - { - "associatedLayout": "SokobanWithBooleans", - "lastChangeTimeStamp": 0, - "name": "FindAndUpdateRulesFromTextBlocks", - "events": [ - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Search rules", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Find rules defined by text blocks.\n\nSubjects are:\n- Man\n- Box\n- Rock\n- Star\n\nActions are:\n- You\n- Push\n- Stop\n- Win\n\nThey form sentenses like: \"Box is Push\"." + ], + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "fullName": "Play tween", + "functionType": "Action", + "name": "PlayTween", + "private": true, + "sentence": "Tween the effect property of object _PARAM0_ over _PARAM2_ seconds with _PARAM3_ easing", + "events": [ { - "type": { - "value": "SetStringObjectVariable" - }, - "parameters": [ - "TextIs", - "HorizontalSubject", - "=", - "\"\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TweenTime", + "<", + "Duration" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTime", + "+", + "Object.Behavior::TimeDelta()" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "EffectValue", + "=", + "Tween::Ease(Easing, TweenInitialValue, TweenTargetedValue, TweenTime / Duration)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TweenTime", + ">=", + "Duration" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "EffectValue", + "=", + "TweenTargetedValue" + ] + } ] }, { - "type": { - "value": "SetStringObjectVariable" - }, - "parameters": [ - "TextIs", - "HorizontalAction", - "=", - "\"\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::SetEffectDoubleParameter" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "EffectProperty", + "EffectValue" + ] + } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, { - "type": { - "value": "SetStringObjectVariable" - }, - "parameters": [ - "TextIs", - "VerticalSubject", - "=", - "\"\"" - ] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" }, { - "type": { - "value": "SetStringObjectVariable" - }, - "parameters": [ - "TextIs", - "VerticalAction", - "=", - "\"\"" - ] + "description": "Duration (in seconds)", + "name": "Duration", + "type": "expression" + }, + { + "description": "Easing", + "name": "Easing", + "supplementaryInformation": "[]", + "type": "string" } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Look around IS blocks." + ], + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::ForEach", - "object": "TextIs", - "conditions": [], - "actions": [], + "description": "the effect name of the object.", + "fullName": "Effect name", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "EffectName", + "sentence": "the effect name", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Look up vertically." - }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "CollisionPoint" + "value": "SetReturnString" }, "parameters": [ - "Text", - "TextIs.PointX(\"TopCheck\")", - "TextIs.PointY(\"TopCheck\")" + "EffectName" ] } - ], + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the effect parameter of the object. The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", + "fullName": "Effect parameter", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "EffectProperty", + "sentence": "the effect parameter", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetStringObjectVariable" + "value": "SetReturnString" }, "parameters": [ - "TextIs", - "HorizontalSubject", - "=", - "Text.Text" + "EffectProperty" ] } ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the effect parameter of the object. The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", + "fullName": "Effect parameter", + "functionType": "Action", + "getterName": "EffectName", + "group": "Button effect tween configuration", + "name": "SetEffectProperty", + "sentence": "Change the tweened effect of _PARAM0_ to _PARAM2_ with parameter _PARAM3_", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "CollisionPoint" + "value": "SetStringVariable" }, "parameters": [ - "Text", - "TextIs.PointX(\"BottomCheck\")", - "TextIs.PointY(\"BottomCheck\")" + "EffectName", + "=", + "NewEffectName" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetStringObjectVariable" + "value": "SetStringVariable" }, "parameters": [ - "TextIs", - "HorizontalAction", + "EffectProperty", "=", - "Text.Text" + "NewPropertyName" ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Look up horizontally." + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + }, + { + "description": "Effect name", + "name": "NewEffectName", + "type": "string" + }, + { + "description": "Parameter name", + "name": "NewPropertyName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "the idle effect parameter value of the object.", + "fullName": "Idle effect parameter value", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "IdleValue", + "sentence": "the idle effect parameter value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "IdleValue" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleValue", + "name": "SetIdleValue", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "CollisionPoint" + "value": "SetNumberVariable" }, "parameters": [ - "Text", - "TextIs.PointX(\"LeftCheck\")", - "TextIs.PointY(\"RightCheck\")" + "IdleValue", + "=", + "Value" ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the focused effect parameter value of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused effect parameter value", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FocusedValue", + "sentence": "the focused effect parameter value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetStringObjectVariable" + "value": "SetReturnNumber" }, "parameters": [ - "TextIs", - "VerticalSubject", - "=", - "Text.Text" + "FocusedValue" ] } ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedValue", + "name": "SetFocusedValue", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "CollisionPoint" + "value": "SetNumberVariable" }, "parameters": [ - "Text", - "TextIs.PointX(\"RightCheck\")", - "TextIs.PointY(\"RightCheck\")" + "FocusedValue", + "=", + "Value" ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed effect parameter value of the object.", + "fullName": "Pressed effect parameter value", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "PressedValue", + "sentence": "the pressed effect parameter value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetStringObjectVariable" + "value": "SetReturnNumber" }, "parameters": [ - "TextIs", - "VerticalAction", - "+", - "Text.Text" + "PressedValue" ] } ] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Set rules", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + ], + "expressionType": { + "type": "expression" }, - "comment": "Reset any rules previously given to objects." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetBooleanObjectVariable" - }, - "parameters": [ - "ObjectsWithoutText", - "Stop", - "False", - "" - ] - }, - { - "type": { - "value": "SetBooleanObjectVariable" - }, - "parameters": [ - "ObjectsWithoutText", - "Push", - "False" - ] - }, + "parameters": [ { - "type": { - "value": "SetBooleanObjectVariable" - }, - "parameters": [ - "ObjectsWithoutText", - "Controlled", - "False" - ] + "description": "Object", + "name": "Object", + "type": "object" }, { - "type": { - "value": "SetBooleanObjectVariable" - }, - "parameters": [ - "ObjectsWithoutText", - "Win", - "False" - ] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Set new rules on objects." + ], + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::ForEach", - "object": "TextIs", - "conditions": [], - "actions": [], + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedValue", + "name": "SetPressedValue", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "StringObjectVariable" + "value": "SetNumberVariable" }, "parameters": [ - "TextIs", - "HorizontalSubject", + "PressedValue", "=", - "\"Man\"" + "Value" ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in easing of the object.", + "fullName": "Fade-in easing", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FadeInEasing", + "sentence": "the fade-in easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PapaIsYou::EnableAction" + "value": "SetReturnString" }, "parameters": [ - "", - "Player", - "TextIs.HorizontalAction", - "" + "FadeInEasing" ] } ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInEasing", + "name": "SetFadeInEasing", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "StringObjectVariable" + "value": "SetStringVariable" }, "parameters": [ - "TextIs", - "VerticalSubject", + "FadeInEasing", "=", - "\"Man\"" + "Value" ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out easing of the object.", + "fullName": "Fade-out easing", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FadeOutEasing", + "sentence": "the fade-out easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PapaIsYou::EnableAction" + "value": "SetReturnString" }, "parameters": [ - "", - "Player", - "TextIs.VerticalAction", - "" + "FadeOutEasing" ] } ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutEasing", + "name": "SetFadeOutEasing", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "StringObjectVariable" + "value": "SetStringVariable" }, "parameters": [ - "TextIs", - "HorizontalSubject", + "FadeOutEasing", "=", - "\"Box\"" + "Value" ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in duration of the object.", + "fullName": "Fade-in duration", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FadeInDuration", + "sentence": "the fade-in duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PapaIsYou::EnableAction" + "value": "SetReturnNumber" }, "parameters": [ - "", - "Box", - "TextIs.HorizontalAction", - "" + "FadeInDuration" ] } ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInDuration", + "name": "SetFadeInDuration", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "StringObjectVariable" + "value": "SetNumberVariable" }, "parameters": [ - "TextIs", - "VerticalSubject", + "FadeInDuration", "=", - "\"Box\"" + "Value" ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out duration of the object.", + "fullName": "Fade-out duration", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FadeOutDuration", + "sentence": "the fade-out duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PapaIsYou::EnableAction" + "value": "SetReturnNumber" }, "parameters": [ - "", - "Box", - "TextIs.VerticalAction", - "" + "FadeOutDuration" ] } ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutDuration", + "name": "SetFadeOutDuration", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringObjectVariable" - }, - "parameters": [ - "TextIs", - "HorizontalSubject", - "=", - "\"Rock\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "PapaIsYou::EnableAction" + "value": "SetNumberVariable" }, "parameters": [ - "", - "WallBlock", - "TextIs.HorizontalAction", - "" + "FadeOutDuration", + "=", + "Value" ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Button states", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "name": "ButtonFSM" + }, + { + "value": "", + "type": "Behavior", + "label": "Effect capability", + "extraInformation": [ + "EffectCapability::EffectBehavior" + ], + "name": "Effect" + }, + { + "value": "Effect", + "type": "String", + "label": "Effect name", + "group": "Effect", + "name": "EffectName" + }, + { + "value": "", + "type": "String", + "label": "Effect parameter", + "description": "The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", + "group": "Effect", + "name": "EffectProperty" + }, + { + "value": "0", + "type": "Number", + "label": "Idle effect parameter value", + "group": "Value", + "name": "IdleValue" + }, + { + "value": "0", + "type": "Number", + "label": "Focused effect parameter value", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Value", + "name": "FocusedValue" + }, + { + "value": "0", + "type": "Number", + "label": "Pressed effect parameter value", + "group": "Value", + "name": "PressedValue" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-in easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeInEasing" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeOutEasing" + }, + { + "value": "0.125", + "type": "Number", + "unit": "Second", + "label": "Fade-in duration", + "group": "Speed", + "name": "FadeInDuration" + }, + { + "value": "0.5", + "type": "Number", + "unit": "Second", + "label": "Fade-out duration", + "group": "Speed", + "name": "FadeOutDuration" + }, + { + "value": "Idle", + "type": "Choice", + "label": "", + "extraInformation": [ + "Idle", + "Focused", + "Pressed" + ], + "hidden": true, + "name": "PreviousState" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "TweenInitialValue" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "TweenTargetedValue" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "TweenTime" + }, + { + "value": "NoTween", + "type": "Choice", + "label": "", + "extraInformation": [ + "NoTween", + "FadeIn", + "FadeOut" + ], + "hidden": true, + "name": "TweenState" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "EffectValue" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Smoothly resize buttons according to their state.", + "fullName": "Button scale tween", + "name": "ButtonScaleTween", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringObjectVariable" - }, - "parameters": [ - "TextIs", - "VerticalSubject", - "=", - "\"Rock\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "PapaIsYou::EnableAction" - }, - "parameters": [ - "", - "WallBlock", - "TextIs.VerticalAction", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringObjectVariable" + "value": "ScalableCapability::ScalableBehavior::SetValue" }, "parameters": [ - "TextIs", - "HorizontalSubject", + "Object", + "Scale", "=", - "\"Star\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PapaIsYou::EnableAction" - }, - "parameters": [ - "", - "Star", - "TextIs.HorizontalAction", - "" + "IdleScale" ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringObjectVariable" - }, - "parameters": [ - "TextIs", - "VerticalSubject", - "=", - "\"Star\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PapaIsYou::EnableAction" - }, - "parameters": [ - "", - "Star", - "TextIs.VerticalAction", - "" - ] - } - ] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" } - ] - } - ], - "parameters": [] - } - ] - } - ], - "eventsFunctionsExtensions": [ - { - "author": "", - "category": "User interface", - "extensionNamespace": "", - "fullName": "Panel sprite button", - "helpPath": "", - "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.4.2", - "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.", - "", - "There are ready-to-use buttons in the asset-store [menu buttons pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=menu-buttons-menu-buttons)." - ], - "origin": { - "identifier": "PanelSpriteButton", - "name": "gdevelop-extension-store" - }, - "tags": [ - "button", - "ui" - ], - "authorIds": [ - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" - ], - "dependencies": [], - "globalVariables": [], - "sceneVariables": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [ - { - "description": "The finite state machine used internally by the button object.", - "fullName": "Button finite state machine", - "name": "ButtonFSM", - "objectType": "", - "private": true, - "eventsFunctions": [ + ], + "objectGroups": [] + }, { "fullName": "", "functionType": "Action", - "name": "doStepPostEvents", + "name": "doStepPreEvents", "sentence": "", "events": [ { @@ -7413,413 +11203,83 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Finite state machine", + "name": "Change based on state", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The \"Validated\" state only last one frame." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Check position", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Make sure the cursor position is only checked once per frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "value": "ButtonStates::ButtonFSM::IsIdle" }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + "parameters": [ + "Object", + "ButtonFSM", + "" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Idle\"" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } + "type": { + "value": "ButtonStates::ButtonScaleTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "IdleScale", + "" ] } - ], - "parameters": [] + ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [ - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] - } - ] - } + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" ] } ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply position changes", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -7828,52 +11288,23 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "\"Focused\"" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "ButtonStates::ButtonScaleTween::FadeIn" }, "parameters": [ "Object", "Behavior", - "=", - "\"PressedOutside\"" + "FocusedScale", + "" ] } ] @@ -7883,158 +11314,234 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior" + "PreviousState", + "=", + "\"Pressed\"" ] - }, + } + ], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", - "\"PressedOutside\"" + "\"Focused\"" ] - } - ], - "actions": [ + }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "ButtonStates::ButtonScaleTween::FadeOut" }, "parameters": [ "Object", "Behavior", - "=", - "\"PressedInside\"" + "FocusedScale", + "" ] } ] } - ], - "parameters": [] + ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - }, - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - } + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Pressed\"" ] } ], - "parameters": [] + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Pressed\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonScaleTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "PressedScale", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade in", + "functionType": "Action", + "name": "FadeIn", + "private": true, + "sentence": "_PARAM0_ fade in to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween::AddObjectScaleTween" + }, + "parameters": [ + "Object", + "Tween", + "\"__ButtonScaleTween.Fade\"", + "Value", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", + "no", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade out", + "functionType": "Action", + "name": "FadeOut", + "private": true, + "sentence": "_PARAM0_ fade out to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween::AddObjectScaleTween" + }, + "parameters": [ + "Object", + "Tween", + "\"__ButtonScaleTween.Fade\"", + "Value", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", + "no", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the idle state size scale of the object.", + "fullName": "Idle state size scale", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "IdleScale", + "sentence": "the idle state size scale", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "IdleScale" + ] } - ], - "parameters": [] + ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -8044,7 +11551,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], @@ -8052,8 +11559,9 @@ }, { "fullName": "", - "functionType": "Action", - "name": "onDeActivate", + "functionType": "ActionWithOperator", + "getterName": "IdleScale", + "name": "SetIdleScale", "sentence": "", "events": [ { @@ -8062,24 +11570,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleScale", "=", - "0" + "Value" ] } ] @@ -8094,46 +11590,38 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is not used.", - "fullName": "Is idle", - "functionType": "Condition", - "name": "IsIdle", - "sentence": "_PARAM0_ is idle", + "description": "the focused state size scale of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state size scale", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FocusedScale", + "sentence": "the focused state size scale", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "FocusedScale" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -8143,46 +11631,77 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button was just clicked.", - "fullName": "Is clicked", - "functionType": "Condition", - "name": "IsClicked", - "sentence": "_PARAM0_ is clicked", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedScale", + "name": "SetFocusedScale", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedScale", "=", - "\"Validated\"" + "Value" ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed state size scale of the object.", + "fullName": "Pressed state size scale", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "PressedScale", + "sentence": "the pressed state size scale", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "PressedScale" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -8192,46 +11711,77 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the cursor is hovered over the button.", - "fullName": "Is hovered", - "functionType": "Condition", - "name": "IsHovered", - "sentence": "_PARAM0_ is hovered", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedScale", + "name": "SetPressedScale", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedScale", "=", - "\"Hovered\"" + "Value" ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in duration of the object.", + "fullName": "Fade-in duration", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FadeInDuration", + "sentence": "the fade-in duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "FadeInDuration" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -8241,72 +11791,158 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is either hovered or pressed but not hovered.", - "fullName": "Is focused", - "functionType": "Condition", - "name": "IsFocused", - "sentence": "_PARAM0_ is focused", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInDuration", + "name": "SetFadeInDuration", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "\"Hovered\"" + "Value" ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out duration of the object.", + "fullName": "Fade-out duration", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FadeOutDuration", + "sentence": "the fade-out duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "FadeOutDuration" ] } ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutDuration", + "name": "SetFadeOutDuration", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "\"PressedOutside\"" + "Value" ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in easing of the object.", + "fullName": "Fade-in easing", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FadeInEasing", + "sentence": "the fade-in easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnString" }, "parameters": [ - "True" + "FadeInEasing" ] } ] } ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, "parameters": [ { "description": "Object", @@ -8316,41 +11952,31 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is currently being pressed with mouse or touch.", - "fullName": "Is pressed", - "functionType": "Condition", - "name": "IsPressed", - "sentence": "_PARAM0_ is pressed", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInEasing", + "name": "SetFadeInEasing", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetStringVariable" }, "parameters": [ - "True" + "FadeInEasing", + "=", + "Value" ] } ] @@ -8365,46 +11991,39 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is currently being pressed outside with mouse or touch.", - "fullName": "Is held outside", - "functionType": "Condition", - "name": "IsPressedOutside", - "sentence": "_PARAM0_ is held outside", + "description": "the fade-out easing of the object.", + "fullName": "Fade-out easing", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FadeOutEasing", + "sentence": "the fade-out easing", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnString" }, "parameters": [ - "True" + "FadeOutEasing" ] } ] } ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, "parameters": [ { "description": "Object", @@ -8414,18 +12033,18 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "the touch id that is using the button or 0 if none.", - "fullName": "Touch id", - "functionType": "ExpressionAndCondition", - "name": "TouchId", - "sentence": "the touch id", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutEasing", + "name": "SetFadeOutEasing", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -8433,18 +12052,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetStringVariable" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "FadeOutEasing", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", @@ -8454,7 +12072,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], @@ -8463,256 +12081,182 @@ ], "propertyDescriptors": [ { - "value": "true", - "type": "Boolean", - "label": "", - "description": "Should check hovering", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "ShouldCheckHovering" + "value": "", + "type": "Behavior", + "label": "Scalable capability", + "extraInformation": [ + "ScalableCapability::ScalableBehavior" + ], + "name": "Scale" }, { - "value": "Idle", - "type": "Choice", - "label": "State", - "description": "", - "group": "", + "value": "", + "type": "Behavior", + "label": "Button states behavior (required)", "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "ButtonStates::ButtonFSM" ], - "hidden": true, - "name": "State" + "name": "ButtonFSM" }, { - "value": "0", + "value": "", + "type": "Behavior", + "label": "Tween behavior (required)", + "extraInformation": [ + "Tween::TweenBehavior" + ], + "name": "Tween" + }, + { + "value": "1", "type": "Number", - "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchId" + "unit": "Dimensionless", + "label": "Idle state size scale", + "group": "Size", + "name": "IdleScale" }, { - "value": "", - "type": "Boolean", - "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchIsInside" + "value": "1", + "type": "Number", + "unit": "Dimensionless", + "label": "Focused state size scale", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Size", + "name": "FocusedScale" }, { - "value": "", - "type": "Boolean", - "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "MouseIsInside" + "value": "0.1", + "type": "Number", + "unit": "Second", + "label": "Fade-in duration", + "group": "Speed", + "name": "FadeInDuration" }, { - "value": "", + "value": "0.2", + "type": "Number", + "unit": "Second", + "label": "Fade-out duration", + "group": "Speed", + "name": "FadeOutDuration" + }, + { + "value": "0.95", "type": "Number", + "unit": "Dimensionless", + "label": "Pressed state size scale", + "group": "Size", + "name": "PressedScale" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-in easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeInEasing" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeOutEasing" + }, + { + "value": "Idle", + "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [], + "extraInformation": [ + "Idle", + "Focused", + "Pressed" + ], "hidden": true, - "name": "Index" + "name": "PreviousState" } ], "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [ + }, { - "defaultName": "Button", - "description": "A button that can be customized.", - "fullName": "Button (panel sprite)", - "name": "PanelSpriteButton", - "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": "Create one background instance for of each state.\nOnly the instance for the current state is shown." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Idle", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Hovered", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Pressed", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Hovered" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Pressed" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Hovered", - "=", - "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", - "=", - "2" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "yes" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] - }, + "description": "Smoothly change the color tint of buttons according to their state.", + "fullName": "Button color tint tween", + "name": "ButtonColorTintTween", + "objectType": "Sprite", + "eventsFunctions": [ { "fullName": "", "functionType": "Action", - "name": "onHotReloading", + "name": "onCreated", "sentence": "", "events": [ { @@ -8721,11 +12265,11 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "ChangeColor" }, "parameters": [ "Object", - "" + "IdleColorTint" ] } ] @@ -8735,495 +12279,218 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", - "sentence": "", - "events": [ + }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply states", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Show the right background accordingly to the new state." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsIdle" - }, - "parameters": [ - "Object", - "ButtonFSM" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "Idle", - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Pressed" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Visible" - }, - "parameters": [ - "Hovered" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" - }, - "parameters": [ - "Object", - ">", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Tween::AddObjectOpacityTween" - }, - "parameters": [ - "Hovered", - "Tween", - "\"Fadeout\"", - "0", - "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" - }, - "parameters": [ - "Object", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Hovered" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteObject::Opacity" - }, - "parameters": [ - "Hovered", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Hovered" - ] - }, - { - "type": { - "value": "PanelSpriteObject::SetOpacity" - }, - "parameters": [ - "Hovered", - "=", - "255" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" - }, - "parameters": [ - "Object", - "ButtonFSM" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Idle" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "Hovered", - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Pressed" - ] - }, - { - "type": { - "value": "Tween::RemoveTween" - }, - "parameters": [ - "Hovered", - "Tween", - "\"Fadeout\"" - ] - }, - { - "type": { - "value": "PanelSpriteObject::SetOpacity" - }, - "parameters": [ - "Hovered", - "=", - "255" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": [ - "Object", - "ButtonFSM" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Idle" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Hovered" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "Pressed", - "" - ] - } - ] - }, + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "States", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsFocused" + "value": "ButtonStates::ButtonFSM::IsIdle" }, "parameters": [ "Object", - "ButtonFSM" + "ButtonFSM", + "" ] }, { "type": { - "value": "BuiltinCommonInstructions::Once" + "value": "StringVariable" }, - "parameters": [] + "parameters": [ + "PreviousState", + "!=", + "\"Idle\"" + ] } ], "actions": [ { "type": { - "value": "SetCenterY" + "value": "SetStringVariable" }, "parameters": [ - "Label", + "PreviousState", "=", - "Object.CenterWithPaddingY()" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Idle" + "\"Idle\"" ] }, { "type": { - "value": "Montre" + "value": "ButtonStates::ButtonColorTintTween::FadeOut" }, "parameters": [ - "Hovered", + "Object", + "Behavior", + "IdleColorTint", "" ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Pressed" - ] } ] - } - ], - "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" + "value": "ButtonStates::ButtonFSM::IsFocused" }, - "parameters": [], - "subInstructions": [ + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" + "value": "StringVariable" }, "parameters": [ - "Object.Width()", - "!=", - "max(Idle.BoundingBoxRight(), Label.BoundingBoxRight()) - min(Idle.BoundingBoxLeft(), Label.BoundingBoxLeft())" + "PreviousState", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Focused\"" ] }, { "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" + "value": "ButtonStates::ButtonColorTintTween::FadeIn" }, "parameters": [ - "Object.Height()", - "!=", - "max(Idle.BoundingBoxBottom(), Label.BoundingBoxBottom()) - min(Idle.BoundingBoxTop(), Label.BoundingBoxTop())" + "Object", + "Behavior", + "FocusedColorTint", + "" ] } ] - } - ], - "actions": [ - { - "type": { - "value": "SetNumberObjectVariable" - }, - "parameters": [ - "Idle", - "Width", - "=", - "Object.Width()" - ] }, { - "type": { - "value": "SetNumberObjectVariable" - }, - "parameters": [ - "Idle", - "Height", - "=", - "Object.Height()" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "FocusedColorTint", + "" + ] + } ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteButton::Scale" + "value": "ButtonStates::ButtonFSM::IsPressed" }, "parameters": [ "Object", - "=", - "1" + "ButtonFSM", + "" ] }, { "type": { - "value": "PanelSpriteObject::Width" + "value": "StringVariable" }, "parameters": [ - "Background", - "=", - "Idle.Variable(Width)" + "PreviousState", + "!=", + "\"Pressed\"" ] - }, + } + ], + "actions": [ { "type": { - "value": "PanelSpriteObject::Height" + "value": "SetStringVariable" }, "parameters": [ - "Background", + "PreviousState", "=", - "Idle.Variable(Height)" + "\"Pressed\"" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "ButtonStates::ButtonColorTintTween::FadeIn" }, "parameters": [ "Object", + "Behavior", + "PressedColorTint", "" ] } @@ -9237,55 +12504,179 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" } ], - "objectGroups": [ + "objectGroups": [] + }, + { + "fullName": "Fade in", + "functionType": "Action", + "name": "FadeIn", + "private": true, + "sentence": "_PARAM0_ fade in to _PARAM2_", + "events": [ { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "name": "Hovered" - }, + "type": { + "value": "Tween::AddObjectColorTween" + }, + "parameters": [ + "Object", + "Tween", + "\"__ButtonColorTintTween.Fade\"", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", + "no", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "color" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade out", + "functionType": "Action", + "name": "FadeOut", + "private": true, + "sentence": "_PARAM0_ fade out to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "name": "Pressed" + "type": { + "value": "Tween::AddObjectColorTween" + }, + "parameters": [ + "Object", + "Tween", + "\"__ButtonColorTintTween.Fade\"", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", + "no", + "yes" + ] } ] } - ] + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "color" + } + ], + "objectGroups": [] }, { - "description": "Check if the button is not used.", - "fullName": "Is idle", - "functionType": "Condition", - "name": "IsIdle", - "sentence": "_PARAM0_ is idle", + "description": "the idle state color tint of the object.", + "fullName": "Idle state color tint", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "IdleColorTint", + "sentence": "the idle state color tint", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::IsIdle" + "value": "SetReturnString" }, "parameters": [ - "Idle", - "ButtonFSM", - "" + "IdleColorTint" ] } - ], + ] + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleColorTint", + "name": "SetIdleColorTint", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetStringVariable" }, "parameters": [ - "True" + "IdleColorTint", + "=", + "Value" ] } ] @@ -9295,83 +12686,79 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button was just clicked.", - "fullName": "Is clicked", - "functionType": "Condition", - "name": "IsClicked", - "sentence": "_PARAM0_ is clicked", + "description": "the focused state color tint of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state color tint", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FocusedColorTint", + "sentence": "the focused state color tint", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsClicked" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnString" }, "parameters": [ - "True" + "FocusedColorTint" ] } ] } ], + "expressionType": { + "type": "color" + }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the cursor is hovered over the button.", - "fullName": "Is hovered", - "functionType": "Condition", - "name": "IsHovered", - "sentence": "_PARAM0_ is hovered", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedColorTint", + "name": "SetFocusedColorTint", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsHovered" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetStringVariable" }, "parameters": [ - "True" + "FocusedColorTint", + "=", + "Value" ] } ] @@ -9381,83 +12768,79 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is either hovered or pressed but not hovered.", - "fullName": "Is focused", - "functionType": "Condition", - "name": "IsFocused", - "sentence": "_PARAM0_ is focused", + "description": "the pressed state color tint of the object.", + "fullName": "Pressed state color tint", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "PressedColorTint", + "sentence": "the pressed state color tint", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsFocused" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnString" }, "parameters": [ - "True" + "PressedColorTint" ] } ] } ], + "expressionType": { + "type": "color" + }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is currently being pressed with mouse or touch.", - "fullName": "Is pressed", - "functionType": "Condition", - "name": "IsPressed", - "sentence": "_PARAM0_ is pressed", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedColorTint", + "name": "SetPressedColorTint", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsPressed" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetStringVariable" }, "parameters": [ - "True" + "PressedColorTint", + "=", + "Value" ] } ] @@ -9467,18 +12850,25 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Change the text of the button label.", - "fullName": "Label text", - "functionType": "Action", - "name": "SetLabelText", - "sentence": "Change the text of _PARAM0_ to _PARAM1_", + "description": "the fade-in duration of the object.", + "fullName": "Fade-in duration", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeInDuration", + "sentence": "the fade-in duration", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -9486,47 +12876,39 @@ "actions": [ { "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "Label", - "Text", - "=", - "GetArgumentAsString(\"LabelText\")" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "" + "FadeInDuration" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" }, { - "description": "", - "name": "LabelText", - "type": "string" + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInDuration", + "name": "SetFadeInDuration", "sentence": "", "events": [ { @@ -9535,35 +12917,40 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "SetNumberVariable" }, "parameters": [ - "Label.String()" + "FadeInDuration", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" } ], "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 fade-out duration of the object.", + "fullName": "Fade-out duration", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeOutDuration", + "sentence": "the fade-out duration", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -9574,7 +12961,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "FadeOutDuration" ] } ] @@ -9587,19 +12974,24 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" } ], "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_", + "functionType": "ActionWithOperator", + "getterName": "FadeOutDuration", + "name": "SetFadeOutDuration", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -9607,209 +12999,178 @@ "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" + "value": "SetNumberVariable" }, "parameters": [ - "Label", + "FadeOutDuration", "=", - "Object.CenterWithPaddingY()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } + "Value" ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in easing of the object.", + "fullName": "Fade-in easing", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeInEasing", + "sentence": "the fade-in easing", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": [ - "Object", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "MettreY" + "value": "SetReturnString" }, "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" + "FadeInEasing" ] } ] } ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" - } - ], - "objectGroups": [ + }, { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" } - ] + ], + "objectGroups": [] }, { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInEasing", + "name": "SetFadeInEasing", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"ShouldActivate\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetStringVariable" }, "parameters": [ - "Idle", - "ButtonFSM", - "yes" + "FadeInEasing", + "=", + "Value" ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out easing of the object.", + "fullName": "Fade-out easing", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeOutEasing", + "sentence": "the fade-out easing", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"ShouldActivate\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnString" }, "parameters": [ - "Idle", - "ButtonFSM", - "no" + "FadeOutEasing" ] } ] } ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" }, { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutEasing", + "name": "SetFadeOutEasing", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": [ - "Idle", - "ButtonFSM" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetStringVariable" }, "parameters": [ - "True" + "FadeOutEasing", + "=", + "Value" ] } ] @@ -9819,8 +13180,14 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" } ], "objectGroups": [] @@ -9828,350 +13195,163 @@ ], "propertyDescriptors": [ { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "name": "PressedLabelOffsetY" - }, - { - "value": "0", - "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "LeftPadding" - }, - { - "value": "0", - "type": "Number", - "label": "Right padding", - "description": "", - "group": "Padding", + "value": "", + "type": "Behavior", + "label": "Button states", "extraInformation": [ - "Label" + "ButtonStates::ButtonFSM" ], - "name": "RightPadding" + "name": "ButtonFSM" }, { - "value": "0", - "type": "Number", - "label": "Top padding", - "description": "", - "group": "Padding", + "value": "", + "type": "Behavior", + "label": "Tween", "extraInformation": [ - "Label" + "Tween::TweenBehavior" ], - "name": "TopPadding" + "name": "Tween" }, { - "value": "0", - "type": "Number", - "label": "Bottom padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "BottomPadding" + "value": "255;255;255", + "type": "Color", + "label": "Idle state color tint", + "group": "Color", + "name": "IdleColorTint" }, { - "value": "0.25", - "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], - "name": "HoveredFadeOutDuration" - } - ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 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": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": "0;0;0" - } + "value": "192;192;192", + "type": "Color", + "label": "Focused state color tint", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Color", + "name": "FocusedColorTint" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ - { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" - } - ], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true - } - ] + "value": "64;64;64", + "type": "Color", + "label": "Pressed state color tint", + "group": "Color", + "name": "PressedColorTint" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ] + "value": "0.1", + "type": "Number", + "unit": "Second", + "label": "Fade-in duration", + "group": "Speed", + "name": "FadeInDuration" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Idle" - }, - { - "objectName": "Hovered" - }, - { - "objectName": "Pressed" - } - ] - } - } - ] - }, - { - "author": "", - "category": "", - "extensionNamespace": "", - "fullName": "", - "helpPath": "", - "iconUrl": "", - "name": "PapaIsYou", - "previewIconUrl": "", - "shortDescription": "", - "version": "", - "description": "", - "tags": [], - "authorIds": [], - "dependencies": [], - "globalVariables": [], - "sceneVariables": [], - "eventsFunctions": [ - { - "description": "Enable an action for the object", - "fullName": "Enable action", - "functionType": "Action", - "name": "EnableAction", - "sentence": "Enable the _PARAM2_ action for _PARAM1_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareArgumentAsString" - }, - "parameters": [ - "\"Action\"", - "=", - "\"Win\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetObjectVariableAsBoolean" - }, - "parameters": [ - "Object", - "Win", - "True" - ] - } - ] + "value": "0.2", + "type": "Number", + "unit": "Second", + "label": "Fade-out duration", + "group": "Speed", + "name": "FadeOutDuration" }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareArgumentAsString" - }, - "parameters": [ - "\"Action\"", - "=", - "\"Stop\"" - ] - } + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-in easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" ], - "actions": [ - { - "type": { - "value": "SetObjectVariableAsBoolean" - }, - "parameters": [ - "Object", - "Stop", - "True" - ] - } - ] + "name": "FadeInEasing" }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareArgumentAsString" - }, - "parameters": [ - "\"Action\"", - "=", - "\"Push\"" - ] - } + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" ], - "actions": [ - { - "type": { - "value": "SetObjectVariableAsBoolean" - }, - "parameters": [ - "Object", - "Push", - "True" - ] - } - ] + "name": "FadeOutEasing" }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareArgumentAsString" - }, - "parameters": [ - "\"Action\"", - "=", - "\"You\"" - ] - } + "value": "Idle", + "type": "Choice", + "label": "", + "extraInformation": [ + "Idle", + "Focused", + "Pressed" ], - "actions": [ - { - "type": { - "value": "SetObjectVariableAsBoolean" - }, - "parameters": [ - "Object", - "Controlled", - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "", - "name": "Object", - "type": "objectList" - }, - { - "description": "Action", - "name": "Action", - "type": "string" + "hidden": true, + "name": "PreviousState" } ], - "objectGroups": [] + "sharedPropertyDescriptors": [] } ], - "eventsBasedBehaviors": [], "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/parking-jam/parking-jam.json b/examples/parking-jam/parking-jam.json index 8a58e3ac1..428ae2c3f 100644 --- a/examples/parking-jam/parking-jam.json +++ b/examples/parking-jam/parking-jam.json @@ -1,9 +1,9 @@ { "firstLayout": "Title Screen", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 237, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.1.0", "name": "Parking Jam", "description": "Swipe cars into the road to clear the parking lot. \nRelieve stress by crashing the cars into each other.\nEnable speedrun mode to compete on the leaderboard!\n\nThis is a game template for GDevelop, a no-code, open-source, free, and easy game-making app", @@ -89,6 +88,7 @@ ], "playableDevices": [ "keyboard", + "mobile", "mobile" ], "extensionProperties": [], @@ -109,7 +109,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/images/White_line.png", "kind": "image", "metadata": "", @@ -122,7 +121,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/images/Audi-1-1.png", "kind": "image", "metadata": "", @@ -131,7 +129,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/images/Audi-2-1.png", "kind": "image", "metadata": "", @@ -140,7 +137,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/images/Audi-3-1.png", "kind": "image", "metadata": "", @@ -149,7 +145,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/images/Audi-4-1.png", "kind": "image", "metadata": "", @@ -158,7 +153,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/images/Audi-5-1.png", "kind": "image", "metadata": "", @@ -167,7 +161,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/images/Audi-7-1.png", "kind": "image", "metadata": "", @@ -176,7 +169,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/images/Audi-8-1.png", "kind": "image", "metadata": "", @@ -185,7 +177,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/images/Audi-9-1.png", "kind": "image", "metadata": "", @@ -194,7 +185,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/images/Audi-2-1.png", "kind": "image", "metadata": "", @@ -203,7 +193,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/images/BlackOverlay-1.png", "kind": "image", "metadata": "", @@ -212,7 +201,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/images/Greenarrow-1.png", "kind": "image", "metadata": "", @@ -221,7 +209,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/images/Greenarrow-1-1.png", "kind": "image", "metadata": "", @@ -230,7 +217,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/images/Greenarrow-1-2.png", "kind": "image", "metadata": "", @@ -239,7 +225,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/images/Greenarrow-1-0.png", "kind": "image", "metadata": "", @@ -248,7 +233,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/images/BlueBlankButton-1.png", "kind": "image", "metadata": "", @@ -327,7 +311,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/images/Asphalt003_2K_Color-9x16.jpg", "kind": "image", "metadata": "", @@ -336,7 +319,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "thumbnail.png", "kind": "image", "metadata": "", @@ -345,7 +327,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/images/Grass_022.png", "kind": "image", "metadata": "", @@ -354,7 +335,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/images/Brick_03.png", "kind": "image", "metadata": "", @@ -363,7 +343,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/images/logo_game.png", "kind": "image", "metadata": "", @@ -372,7 +351,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/images/Asphalt003_2K_Color-9x16.jpg", "kind": "image", "metadata": "", @@ -381,7 +359,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/images/Pause button.png", "kind": "image", "metadata": "", @@ -394,7 +371,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/images/gold_1.png", "kind": "image", "metadata": "", @@ -403,7 +379,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/images/gold_2.png", "kind": "image", "metadata": "", @@ -412,7 +387,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/images/gold_3.png", "kind": "image", "metadata": "", @@ -421,7 +395,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/images/gold_4.png", "kind": "image", "metadata": "", @@ -430,7 +403,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/images/gold_5.png", "kind": "image", "metadata": "", @@ -439,7 +411,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/images/gold_6.png", "kind": "image", "metadata": "", @@ -448,7 +419,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "desktop-icon-512.png", "kind": "image", "metadata": "", @@ -457,7 +427,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "android-icon-192.png", "kind": "image", "metadata": "", @@ -466,7 +435,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "android-icon-144.png", "kind": "image", "metadata": "", @@ -475,7 +443,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "android-icon-96.png", "kind": "image", "metadata": "", @@ -484,7 +451,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "android-icon-72.png", "kind": "image", "metadata": "", @@ -493,7 +459,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "android-icon-48.png", "kind": "image", "metadata": "", @@ -502,7 +467,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "android-icon-36.png", "kind": "image", "metadata": "", @@ -511,7 +475,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-1024.png", "kind": "image", "metadata": "", @@ -520,7 +483,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-180.png", "kind": "image", "metadata": "", @@ -529,7 +491,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-167.png", "kind": "image", "metadata": "", @@ -538,7 +499,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-152.png", "kind": "image", "metadata": "", @@ -547,7 +507,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-144.png", "kind": "image", "metadata": "", @@ -556,7 +515,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-120.png", "kind": "image", "metadata": "", @@ -565,7 +523,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-114.png", "kind": "image", "metadata": "", @@ -574,7 +531,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-100.png", "kind": "image", "metadata": "", @@ -583,7 +539,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-87.png", "kind": "image", "metadata": "", @@ -592,7 +547,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-80.png", "kind": "image", "metadata": "", @@ -601,7 +555,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-76.png", "kind": "image", "metadata": "", @@ -610,7 +563,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-72.png", "kind": "image", "metadata": "", @@ -619,7 +571,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-60.png", "kind": "image", "metadata": "", @@ -628,7 +579,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-58.png", "kind": "image", "metadata": "", @@ -637,7 +587,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-57.png", "kind": "image", "metadata": "", @@ -646,7 +595,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-50.png", "kind": "image", "metadata": "", @@ -655,7 +603,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-40.png", "kind": "image", "metadata": "", @@ -664,7 +611,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-29.png", "kind": "image", "metadata": "", @@ -673,7 +619,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "ios-icon-20.png", "kind": "image", "metadata": "", @@ -682,7 +627,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/GDevelop G logo (white).png", "kind": "image", "metadata": "", @@ -695,81 +639,75 @@ } }, { - "alwaysLoaded": false, - "file": "assets/Blue Button With Shadow_Hovered.png", + "file": "assets/Red Button With Shadow_Hovered.png", "kind": "image", "metadata": "", - "name": "Blue Button With Shadow_Hovered.png", + "name": "Red Button With Shadow_Hovered.png", "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/37288d30c2e013a34e415fb35fffd2f7267ebd031c4380927485d7461708f810_Blue Button With Shadow_Hovered.png", - "name": "Blue Button With Shadow_Hovered.png" + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/71ee2c8d8b72808c7f084252cd36c80c44bc07655a3729e5fe7459c634007e8a_Red Button With Shadow_Hovered.png", + "name": "Red Button With Shadow_Hovered.png" } }, { - "alwaysLoaded": false, - "file": "assets/Blue Button With Shadow_Idle.png", + "file": "assets/Red Button With Shadow_Idle.png", "kind": "image", "metadata": "", - "name": "Blue Button With Shadow_Idle.png", + "name": "Red Button With Shadow_Idle.png", "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/22930cdc6b25260eef3817f1687842974261b68c84ec2a13d7f32b1a2985240f_Blue Button With Shadow_Idle.png", - "name": "Blue Button With Shadow_Idle.png" + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/6c6bf020fb86d99a9ecc993f8b90064d73d757bc2408050cf353c84bc36f6be2_Red Button With Shadow_Idle.png", + "name": "Red Button With Shadow_Idle.png" } }, { - "alwaysLoaded": false, - "file": "assets/Blue Button With Shadow_Pressed.png", + "file": "assets/Red Button With Shadow_Pressed.png", "kind": "image", "metadata": "", - "name": "Blue Button With Shadow_Pressed.png", + "name": "Red Button With Shadow_Pressed.png", "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/26efbc7581c47b884f5335aa7581999a75b3062aa24062a1a91955e334826d21_Blue Button With Shadow_Pressed.png", - "name": "Blue Button With Shadow_Pressed.png" + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/b9ce526450d48adedb6875043465ae168fff1f6b01dd1ff7f43b7e7c1568cc21_Red Button With Shadow_Pressed.png", + "name": "Red Button With Shadow_Pressed.png" } }, { - "alwaysLoaded": false, - "file": "assets/Red Button With Shadow_Hovered.png", + "file": "assets/Blue Button With Shadow_Hovered.png", "kind": "image", "metadata": "", - "name": "Red Button With Shadow_Hovered.png", + "name": "Blue Button With Shadow_Hovered.png", "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/71ee2c8d8b72808c7f084252cd36c80c44bc07655a3729e5fe7459c634007e8a_Red Button With Shadow_Hovered.png", - "name": "Red Button With Shadow_Hovered.png" + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/37288d30c2e013a34e415fb35fffd2f7267ebd031c4380927485d7461708f810_Blue Button With Shadow_Hovered.png", + "name": "Blue Button With Shadow_Hovered.png" } }, { - "alwaysLoaded": false, - "file": "assets/Red Button With Shadow_Idle.png", + "file": "assets/Blue Button With Shadow_Idle.png", "kind": "image", "metadata": "", - "name": "Red Button With Shadow_Idle.png", + "name": "Blue Button With Shadow_Idle.png", "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/6c6bf020fb86d99a9ecc993f8b90064d73d757bc2408050cf353c84bc36f6be2_Red Button With Shadow_Idle.png", - "name": "Red Button With Shadow_Idle.png" + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/22930cdc6b25260eef3817f1687842974261b68c84ec2a13d7f32b1a2985240f_Blue Button With Shadow_Idle.png", + "name": "Blue Button With Shadow_Idle.png" } }, { - "alwaysLoaded": false, - "file": "assets/Red Button With Shadow_Pressed.png", + "file": "assets/Blue Button With Shadow_Pressed.png", "kind": "image", "metadata": "", - "name": "Red Button With Shadow_Pressed.png", + "name": "Blue Button With Shadow_Pressed.png", "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/b9ce526450d48adedb6875043465ae168fff1f6b01dd1ff7f43b7e7c1568cc21_Red Button With Shadow_Pressed.png", - "name": "Red Button With Shadow_Pressed.png" + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/26efbc7581c47b884f5335aa7581999a75b3062aa24062a1a91955e334826d21_Blue Button With Shadow_Pressed.png", + "name": "Blue Button With Shadow_Pressed.png" } } ], @@ -1401,6 +1339,7 @@ "text": "123", "font": "LuckiestGuy-Regular.ttf", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 60, "color": "255;255;255" } @@ -1508,6 +1447,7 @@ "text": "Level 12", "font": "LuckiestGuy-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 100, "color": "189;16;224" } @@ -1534,6 +1474,8 @@ "particleAngleRandomness2": 0, "particleBlue1": 155, "particleBlue2": 255, + "particleColor1": "155;155;155", + "particleColor2": "255;255;255", "particleGravityX": 0, "particleGravityY": 0, "particleGreen1": 155, @@ -1777,6 +1719,7 @@ "text": "000.0 seconds", "font": "LuckiestGuy-Regular.ttf", "textAlignment": "right", + "verticalTextAlignment": "top", "characterSize": 75, "color": "255;255;255" } @@ -1900,6 +1843,7 @@ "assetStoreId": "5faf2b0415c271fa6e747283ed36297a95f04d2b6c477a7b011775fa6fb444ee", "name": "StartOver_Button", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Red Button With Shadow 2", "variables": [], "effects": [], "behaviors": [], @@ -1909,7 +1853,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Start Over" }, "childrenContent": { "Hovered": { @@ -1963,6 +1908,7 @@ "text": "Start Over", "font": "LuckiestGuy-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 80, "color": "255;255;255" } @@ -1983,6 +1929,7 @@ "assetStoreId": "33302f0b615672a2e96316c096e13ad8d7242adba8bd5709538691894f0eae6e", "name": "NextLevel_Button", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Blue Button With Shadow 2", "variables": [], "effects": [], "behaviors": [], @@ -1992,7 +1939,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Next Level" }, "childrenContent": { "Hovered": { @@ -2046,6 +1994,7 @@ "text": "Next Level", "font": "LuckiestGuy-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 80, "color": "255;255;255" } @@ -2066,6 +2015,7 @@ "assetStoreId": "33302f0b615672a2e96316c096e13ad8d7242adba8bd5709538691894f0eae6e", "name": "Paused_Button", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Blue Button With Shadow 2", "variables": [], "effects": [], "behaviors": [], @@ -2075,7 +2025,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Paused" }, "childrenContent": { "Hovered": { @@ -2129,6 +2080,7 @@ "text": "Paused", "font": "LuckiestGuy-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 80, "color": "255;255;255" } @@ -2605,6 +2557,7 @@ "text": "Play", "font": "LuckiestGuy-Regular.ttf", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 80, "color": "0;0;0" } @@ -2646,6 +2599,7 @@ "text": "Speedrun\nMode", "font": "LuckiestGuy-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 50, "color": "255;255;255" } @@ -2698,6 +2652,7 @@ "text": "View\nLeaderboard", "font": "LuckiestGuy-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 40, "color": "255;255;255" } @@ -2741,19 +2696,19 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" + "b": 0 + } }, { "adaptCollisionMaskAutomatically": false, @@ -2836,6 +2791,7 @@ "assetStoreId": "33302f0b615672a2e96316c096e13ad8d7242adba8bd5709538691894f0eae6e", "name": "PlayButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Big Blue Button With Shadow 2", "variables": [], "effects": [], "behaviors": [], @@ -2845,7 +2801,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Play" }, "childrenContent": { "Hovered": { @@ -2899,6 +2856,7 @@ "text": "Play", "font": "LuckiestGuy-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 100, "color": "255;255;255" } @@ -4541,6 +4499,7 @@ "text": "Drag cars into the road \nto clear the parking lot", "font": "LuckiestGuy-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 50, "color": "255;255;255" } @@ -5279,6 +5238,7 @@ "text": "You did it!\n\nThe cars are now free\n\nto roam the streets", "font": "LuckiestGuy-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 80, "color": "255;255;255" } @@ -5335,6 +5295,7 @@ "text": "Edit this game in GDevelop", "font": "LuckiestGuy-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 60, "color": "255;255;255" } @@ -5376,6 +5337,7 @@ "text": "Time: 0.00 seconds", "font": "LuckiestGuy-Regular.ttf", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 80, "color": "74;144;226" } @@ -5407,6 +5369,7 @@ "assetStoreId": "33302f0b615672a2e96316c096e13ad8d7242adba8bd5709538691894f0eae6e", "name": "SubmitScoreButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Blue Button With Shadow 2", "variables": [], "effects": [], "behaviors": [], @@ -5416,7 +5379,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Submit Score" }, "childrenContent": { "Hovered": { @@ -5470,6 +5434,7 @@ "text": "Submit Score", "font": "LuckiestGuy-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 80, "color": "255;255;255" } @@ -6728,7 +6693,6 @@ "externalEvents": [ { "associatedLayout": "Game", - "lastChangeTimeStamp": 0, "name": "GameLogic", "events": [ { @@ -9179,7 +9143,6 @@ }, { "associatedLayout": "Title Screen", - "lastChangeTimeStamp": 0, "name": "AnimateButtons", "events": [ { @@ -9380,6 +9343,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Button states and effects", + "gdevelopVersion": "", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtdGFwLWJ1dHRvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMyA1QzE1LjIxIDUgMTcgNi43OSAxNyA5QzE3IDEwLjUgMTYuMiAxMS43NyAxNSAxMi40NlYxMS4yNEMxNS42MSAxMC42OSAxNiA5Ljg5IDE2IDlDMTYgNy4zNCAxNC42NiA2IDEzIDZTMTAgNy4zNCAxMCA5QzEwIDkuODkgMTAuMzkgMTAuNjkgMTEgMTEuMjRWMTIuNDZDOS44IDExLjc3IDkgMTAuNSA5IDlDOSA2Ljc5IDEwLjc5IDUgMTMgNU0yMCAyMC41QzE5Ljk3IDIxLjMyIDE5LjMyIDIxLjk3IDE4LjUgMjJIMTNDMTIuNjIgMjIgMTIuMjYgMjEuODUgMTIgMjEuNTdMOCAxNy4zN0w4Ljc0IDE2LjZDOC45MyAxNi4zOSA5LjIgMTYuMjggOS41IDE2LjI4SDkuN0wxMiAxOFY5QzEyIDguNDUgMTIuNDUgOCAxMyA4UzE0IDguNDUgMTQgOVYxMy40N0wxNS4yMSAxMy42TDE5LjE1IDE1Ljc5QzE5LjY4IDE2LjAzIDIwIDE2LjU2IDIwIDE3LjE0VjIwLjVNMjAgMkg0QzIuOSAyIDIgMi45IDIgNFYxMkMyIDEzLjExIDIuOSAxNCA0IDE0SDhWMTJMNCAxMkw0IDRIMjBMMjAgMTJIMThWMTRIMjBWMTMuOTZMMjAuMDQgMTRDMjEuMTMgMTQgMjIgMTMuMDkgMjIgMTJWNEMyMiAyLjkgMjEuMTEgMiAyMCAyWiIgLz48L3N2Zz4=", "name": "ButtonStates", @@ -10529,8 +10493,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -10538,8 +10500,6 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", "extraInformation": [ "Idle", "Hovered", @@ -10554,9 +10514,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -10564,9 +10521,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -10574,9 +10528,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -10584,9 +10535,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -11099,8 +11047,6 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -11110,8 +11056,6 @@ "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], @@ -11121,9 +11065,7 @@ "value": "", "type": "String", "label": "Idle state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "IdleEffect" }, { @@ -11132,16 +11074,13 @@ "label": "Focused state effect", "description": "The state is Focused when the button is hovered or held outside.", "group": "Effects", - "extraInformation": [], "name": "FocusedEffect" }, { "value": "", "type": "String", "label": "Pressed state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "PressedEffect" } ], @@ -11567,8 +11506,6 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -11578,9 +11515,7 @@ "value": "Idle", "type": "String", "label": "Idle state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "IdleAnimationName" }, { @@ -11589,16 +11524,13 @@ "label": "Focused state animation name", "description": "The state is Focused when the button is hovered or held outside.", "group": "Animation", - "extraInformation": [], "name": "FocusedAnimationName" }, { "value": "Pressed", "type": "String", "label": "Pressed state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "PressedAnimationName" } ], @@ -13001,8 +12933,6 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -13012,8 +12942,6 @@ "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], @@ -13023,9 +12951,7 @@ "value": "Effect", "type": "String", "label": "Effect name", - "description": "", "group": "Effect", - "extraInformation": [], "name": "EffectName" }, { @@ -13034,16 +12960,13 @@ "label": "Effect parameter", "description": "The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", "group": "Effect", - "extraInformation": [], "name": "EffectProperty" }, { "value": "0", "type": "Number", "label": "Idle effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], "name": "IdleValue" }, { @@ -13052,23 +12975,19 @@ "label": "Focused effect parameter value", "description": "The state is Focused when the button is hovered or held outside.", "group": "Value", - "extraInformation": [], "name": "FocusedValue" }, { "value": "0", "type": "Number", "label": "Pressed effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], "name": "PressedValue" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -13111,7 +13030,6 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -13155,9 +13073,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -13165,17 +13081,13 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "Idle", "Focused", @@ -13188,9 +13100,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenInitialValue" }, @@ -13198,9 +13107,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTargetedValue" }, @@ -13208,9 +13114,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTime" }, @@ -13218,8 +13121,6 @@ "value": "NoTween", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "NoTween", "FadeIn", @@ -13232,9 +13133,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "EffectValue" } @@ -14211,8 +14109,6 @@ "value": "", "type": "Behavior", "label": "Button states behavior (required)", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -14222,8 +14118,6 @@ "value": "", "type": "Behavior", "label": "Tween behavior (required)", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], @@ -14234,9 +14128,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Idle state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "IdleScale" }, { @@ -14246,7 +14138,6 @@ "label": "Focused state size scale", "description": "The state is Focused when the button is hovered or held outside.", "group": "Size", - "extraInformation": [], "name": "FocusedScale" }, { @@ -14254,9 +14145,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -14264,9 +14153,7 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { @@ -14274,16 +14161,13 @@ "type": "Number", "unit": "Dimensionless", "label": "Pressed state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "PressedScale" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -14326,7 +14210,6 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -14369,8 +14252,6 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "Idle", "Focused", @@ -15348,8 +15229,6 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], @@ -15359,8 +15238,6 @@ "value": "", "type": "Behavior", "label": "Tween", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], @@ -15370,9 +15247,7 @@ "value": "255;255;255", "type": "Color", "label": "Idle state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "IdleColorTint" }, { @@ -15381,16 +15256,13 @@ "label": "Focused state color tint", "description": "The state is Focused when the button is hovered or held outside.", "group": "Color", - "extraInformation": [], "name": "FocusedColorTint" }, { "value": "64;64;64", "type": "Color", "label": "Pressed state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "PressedColorTint" }, { @@ -15398,9 +15270,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -15408,16 +15278,13 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -15460,7 +15327,6 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -15503,8 +15369,6 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "Idle", "Focused", @@ -15524,12 +15388,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", + "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.4.4", + "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.", "", @@ -15546,6 +15411,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": [], @@ -15590,11 +15461,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -15603,11 +15473,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -15641,12 +15510,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -15656,11 +15525,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -15677,12 +15547,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -15705,12 +15575,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -15720,11 +15590,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -15735,20 +15604,20 @@ }, "parameters": [ "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -15780,11 +15649,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -15806,31 +15674,30 @@ }, "parameters": [ "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -15872,11 +15739,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -15891,11 +15757,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -15924,20 +15789,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -15946,11 +15811,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -15962,20 +15826,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -15984,11 +15848,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -16001,20 +15864,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -16023,11 +15886,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -16039,20 +15901,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -16061,11 +15923,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -16093,18 +15954,17 @@ }, "parameters": [ "", - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -16116,11 +15976,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -16129,11 +15988,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -16146,11 +16004,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -16158,11 +16015,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -16171,11 +16027,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -16258,22 +16113,20 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -16308,11 +16161,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -16357,11 +16209,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -16406,11 +16257,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -16455,11 +16305,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -16481,11 +16330,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -16530,11 +16378,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -16579,11 +16426,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -16632,7 +16478,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -16663,8 +16509,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -16672,8 +16516,6 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", "extraInformation": [ "Idle", "Hovered", @@ -16688,9 +16530,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -16698,9 +16537,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -16708,9 +16544,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -16718,9 +16551,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -16730,10 +16560,267 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 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": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": 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": "", @@ -16763,7 +16850,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -16775,7 +16862,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -16783,14 +16870,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()" ] }, { @@ -16818,63 +16915,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" ] } ] @@ -16913,18 +16973,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": [ @@ -16986,12 +17075,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -17026,10 +17116,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -17038,7 +17128,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -17046,7 +17136,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -17057,10 +17147,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -17084,10 +17174,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -17104,10 +17195,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -17136,12 +17228,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -17181,10 +17274,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -17213,12 +17307,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -17270,12 +17365,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -17307,126 +17403,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": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteButton::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" - ] - } - ] - } - ], - "parameters": [] } ], "parameters": [ @@ -17437,79 +17413,64 @@ "type": "object" } ], - "objectGroups": [ + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "name": "Hovered" - }, + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsIdle" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ { - "name": "Pressed" + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] } ] } - ] + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] }, { - "description": "Check if the button is not used.", - "fullName": "Is idle", + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", "functionType": "Condition", - "name": "IsIdle", - "sentence": "_PARAM0_ is idle", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::IsIdle" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the button was just clicked.", - "fullName": "Is clicked", - "functionType": "Condition", - "name": "IsClicked", - "sentence": "_PARAM0_ is clicked", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsClicked" + "value": "PanelSpriteButton::ButtonFSM::IsClicked" }, "parameters": [ "Idle", @@ -17674,6 +17635,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -17682,21 +17644,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", - "GetArgumentAsString(\"LabelText\")" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -17711,17 +17665,17 @@ }, { "description": "Text", - "name": "LabelText", + "name": "Value", "type": "string" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", "sentence": "", "events": [ { @@ -17730,18 +17684,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Label", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -17753,12 +17707,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", @@ -17766,17 +17719,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Label.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -17789,65 +17742,35 @@ "objectGroups": [] }, { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" - ] - }, + "conditions": [ { "type": { - "value": "TextObject::WrappingWidth" + "value": "BooleanVariable" }, "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" + "ShouldActivate", + "True", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "SetCenterY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } + "Idle", + "ButtonFSM", + "yes" ] } ] @@ -17857,10 +17780,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", + "ShouldActivate", + "True", "" ] } @@ -17868,12 +17793,12 @@ "actions": [ { "type": { - "value": "MettreY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" + "Idle", + "ButtonFSM", + "no" ] } ] @@ -17885,126 +17810,123 @@ "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - } - ], - "objectGroups": [ + }, { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" } - ] + ], + "objectGroups": [] }, { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BehaviorActivated" }, "parameters": [ - "\"ShouldActivate\"" + "Idle", + "ButtonFSM" ] } ], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnBoolean" }, "parameters": [ - "Idle", - "ButtonFSM", - "yes" + "True" ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"ShouldActivate\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnNumber" }, "parameters": [ - "Idle", - "ButtonFSM", - "no" + "LabelOffset" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - }, - { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "BehaviorActivated" + "value": "SetCenterY" }, "parameters": [ - "Idle", - "ButtonFSM" + "Label", + "+", + "Value - LabelOffset" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "LabelOffset", + "=", + "Value" ] } ] @@ -18023,194 +17945,1387 @@ ], "propertyDescriptors": [ { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "name": "PressedLabelOffsetY" + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" }, { - "value": "0", + "value": "0.25", "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "LeftPadding" + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" }, { "value": "0", "type": "Number", - "label": "Right padding", - "description": "", - "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", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "TopPadding" + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" }, { - "value": "0", - "type": "Number", - "label": "Bottom padding", - "description": "", - "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)", - "description": "", - "group": "", - "extraInformation": [], - "name": "HoveredFadeOutDuration" + "hidden": true, + "name": "_PropertyMapping" } ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 + "variants": [ + { + "areaMaxX": 192, + "areaMaxY": 69, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Big Blue Button With Shadow 2", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "BUTTON", + "font": "LuckiestGuy-Regular.ttf", + "textAlignment": "center", + "characterSize": 100, + "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": "BUTTON", + "font": "LuckiestGuy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 100, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Blue Button With Shadow_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Blue Button With Shadow_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Blue Button With Shadow_Pressed.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] }, - "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": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": "0;0;0" - } + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 61, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "ac76ffd4-0cc6-4581-b73c-f840b4eda2c1", + "width": 188, + "x": 2, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "areaMaxX": 192, + "areaMaxY": 69, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Blue Button With Shadow 2", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "BUTTON", + "font": "LuckiestGuy-Regular.ttf", + "textAlignment": "center", + "characterSize": 80, + "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": "BUTTON", + "font": "LuckiestGuy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 80, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Blue Button With Shadow_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Blue Button With Shadow_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Blue Button With Shadow_Pressed.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] } ], - "effects": [], - "behaviors": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 61, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "ac76ffd4-0cc6-4581-b73c-f840b4eda2c1", + "width": 188, + "x": 2, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ] }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + "areaMaxX": 192, + "areaMaxY": 69, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Red Button With Shadow 2", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "BUTTON", + "font": "LuckiestGuy-Regular.ttf", + "textAlignment": "center", + "characterSize": 80, + "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": "BUTTON", + "font": "LuckiestGuy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 80, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Red Button With Shadow_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, { - "name": "Tween", - "type": "Tween::TweenBehavior" + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Red Button With Shadow_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Red Button With Shadow_Pressed.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 60, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "1a9eba11-e70c-4a1a-88b8-ed6f52e3d4dc", + "width": 188, + "x": 2, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ] }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Idle" + "areaMaxX": 192, + "areaMaxY": 69, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "5faf2b0415c271fa6e747283ed36297a95f04d2b6c477a7b011775fa6fb444ee", + "assetStoreOriginalName": "Red Button With Shadow", + "name": "Red Button With Shadow", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "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": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Red Button With Shadow_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Red Button With Shadow_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Red Button With Shadow_Pressed.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] }, - { - "objectName": "Hovered" + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 60, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "1a9eba11-e70c-4a1a-88b8-ed6f52e3d4dc", + "width": 188, + "x": 2, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] + }, + { + "areaMaxX": 192, + "areaMaxY": 69, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "33302f0b615672a2e96316c096e13ad8d7242adba8bd5709538691894f0eae6e", + "assetStoreOriginalName": "Blue Button With Shadow", + "name": "Blue Button With Shadow", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "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": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Blue Button With Shadow_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Blue Button With Shadow_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Blue Button With Shadow_Pressed.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] }, - { - "objectName": "Pressed" - } - ] - } + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 61, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "ac76ffd4-0cc6-4581-b73c-f840b4eda2c1", + "width": 188, + "x": 2, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] + } + ] } ] }, @@ -18219,6 +19334,7 @@ "category": "Game mechanic", "extensionNamespace": "", "fullName": "Object \"Is On Screen\" Detection", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLW1vbml0b3Itc2NyZWVuc2hvdCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik05LDZINVYxMEg3VjhIOU0xOSwxMEgxN1YxMkgxNVYxNEgxOU0yMSwxNkgzVjRIMjFNMjEsMkgzQzEuODksMiAxLDIuODkgMSw0VjE2QTIsMiAwIDAsMCAzLDE4SDEwVjIwSDhWMjJIMTZWMjBIMTRWMThIMjFBMiwyIDAgMCwwIDIzLDE2VjRDMjMsMi44OSAyMi4xLDIgMjEsMiIgLz48L3N2Zz4=", "name": "IsOnScreen", @@ -18350,6 +19466,7 @@ "category": "Advanced", "extensionNamespace": "", "fullName": "Extended math support", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZ1bmN0aW9uLXZhcmlhbnQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNDIsNS4yOUMxMS4zMiw1LjE5IDEwLjM1LDYgMTAuMjUsNy4xMUwxMCwxMEgxMi44MlYxMkg5LjgyTDkuMzgsMTcuMDdDOS4xOCwxOS4yNyA3LjI0LDIwLjkgNS4wNCwyMC43QzMuNzksMjAuNTkgMi42NiwxOS45IDIsMTguODNMMy41LDE3LjMzQzMuODMsMTguMzggNC45NiwxOC45NyA2LDE4LjYzQzYuNzgsMTguMzkgNy4zMywxNy43IDcuNCwxNi44OUw3LjgyLDEySDQuODJWMTBIOEw4LjI3LDYuOTNDOC40Niw0LjczIDEwLjM5LDMuMSAxMi42LDMuMjhDMTMuODYsMy4zOSAxNSw0LjA5IDE1LjY2LDUuMTdMMTQuMTYsNi42N0MxMy45MSw1LjkgMTMuMjMsNS4zNiAxMi40Miw1LjI5TTIyLDEzLjY1TDIwLjU5LDEyLjI0TDE3Ljc2LDE1LjA3TDE0LjkzLDEyLjI0TDEzLjUsMTMuNjVMMTYuMzUsMTYuNUwxMy41LDE5LjMxTDE0LjkzLDIwLjcyTDE3Ljc2LDE3Ljg5TDIwLjU5LDIwLjcyTDIyLDE5LjMxTDE5LjE3LDE2LjVMMjIsMTMuNjVaIiAvPjwvc3ZnPg==", "name": "ExtendedMath", @@ -19271,6 +20388,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Toggle switch (for Shape Painter)", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMjIsMUgxMEM2LjEsMSwzLDQuMSwzLDhzMy4xLDcsNyw3aDEyYzMuOSwwLDctMy4xLDctN1MyNS45LDEsMjIsMXogTTIyLDEyYy0yLjIsMC00LTEuOC00LTRzMS44LTQsNC00czQsMS44LDQsNA0KCVMyNC4yLDEyLDIyLDEyeiIvPg0KPHBhdGggZD0iTTIyLDE3SDEwYy0zLjksMC03LDMuMS03LDdzMy4xLDcsNyw3aDEyYzMuOSwwLDctMy4xLDctN1MyNS45LDE3LDIyLDE3eiBNMTAsMjhjLTIuMiwwLTQtMS44LTQtNHMxLjgtNCw0LTRzNCwxLjgsNCw0DQoJUzEyLjIsMjgsMTAsMjh6Ii8+DQo8L3N2Zz4NCg==", "name": "ToggleSwitch", @@ -22891,117 +24009,78 @@ "value": "10", "type": "Number", "label": "Radius of the thumb (px) Example: 10", - "description": "", - "group": "", - "extraInformation": [], "name": "ThumbRadius" }, { "value": "24;119;211", "type": "String", "label": "Active thumb color string. Example: 24;119;211", - "description": "", - "group": "", - "extraInformation": [], "name": "ActiveThumbColor" }, { "value": "255", "type": "Number", "label": "Opacity of the thumb. Example: 255", - "description": "", - "group": "", - "extraInformation": [], "name": "ThumbOpacity" }, { "value": "20", "type": "Number", "label": "Width of the track (pixels) Example: 20", - "description": "", - "group": "", - "extraInformation": [], "name": "TrackWidth" }, { "value": "14", "type": "Number", "label": "Height of the track (pixels) Example: 14", - "description": "", - "group": "", - "extraInformation": [], "name": "TrackHeight" }, { "value": "150;150;150", "type": "String", "label": "Color string for the track that is RIGHT of the thumb. Example: 150;150;150 (Leave blank to use thumb color)", - "description": "", - "group": "", - "extraInformation": [], "name": "InactiveTrackColor" }, { "value": "255", "type": "Number", "label": "Opacity of the track that is RIGHT of the thumb. Example: 255", - "description": "", - "group": "", - "extraInformation": [], "name": "InactiveTrackOpacity" }, { "value": "", "type": "String", "label": "Color string for the track that is LEFT of the thumb. Example: 24;119;211 (Leave blank to use thumb color)", - "description": "", - "group": "", - "extraInformation": [], "name": "ActiveTrackColor" }, { "value": "128", "type": "Number", "label": "Opacity of the track that is LEFT of the thumb. Example: 128", - "description": "", - "group": "", - "extraInformation": [], "name": "ActiveTrackOpacity" }, { "value": "24", "type": "Number", "label": "Size of halo when the mouse hovers and clicks on the thumb. Example: 24", - "description": "", - "group": "", - "extraInformation": [], "name": "HaloRadius" }, { "value": "32", "type": "Number", "label": "Opacity of halo when the mouse hovers on the thumb. Example: 32", - "description": "", - "group": "", - "extraInformation": [], "name": "HaloOpacityHover" }, { "value": "64", "type": "Number", "label": "Opacity of the halo that appears when the toggle switch is pressed. Example: 64", - "description": "", - "group": "", - "extraInformation": [], "name": "HaloOpacityPressed" }, { "value": "0", "type": "Number", "label": "Number of pixels the thumb is from the left side of the track.", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ThumbOffset" }, @@ -23009,27 +24088,18 @@ "value": "", "type": "Boolean", "label": "Checked", - "description": "", - "group": "", - "extraInformation": [], "name": "Checked" }, { "value": "", "type": "Boolean", "label": "Disabled", - "description": "", - "group": "", - "extraInformation": [], "name": "Disabled" }, { "value": "", "type": "Boolean", "label": "State has been changed (used in ToggleChecked function)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ToggleChanged" }, @@ -23037,18 +24107,12 @@ "value": "255;255;255", "type": "String", "label": "Inactive thumb color string. Example: 255;255;255", - "description": "", - "group": "", - "extraInformation": [], "name": "InactiveThumbColor" }, { "value": "", "type": "Boolean", "label": "Click or press has started on toggle switch", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsPressed" }, @@ -23056,36 +24120,24 @@ "value": "4", "type": "Number", "label": "Offset (Y) of shadow on thumb. Positive numbers move shadow down, negative numbers move shadow up. Example: 4", - "description": "", - "group": "", - "extraInformation": [], "name": "ThumbShadowOffsetY" }, { "value": "0", "type": "Number", "label": "Offset (X) of shadow on thumb. Positive numbers move shadow right, negative numbers move shadow left. Example: 0", - "description": "", - "group": "", - "extraInformation": [], "name": "ThumbShadowOffsetX" }, { "value": "32", "type": "Number", "label": "Opacity of shadow on thumb. Example: 32", - "description": "", - "group": "", - "extraInformation": [], "name": "ThumbShadowOpacity" }, { "value": "true", "type": "Boolean", "label": "Need redraw", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "NeedRedaw" }, @@ -23093,9 +24145,6 @@ "value": "", "type": "Boolean", "label": "Is hovered", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsHovered" }, @@ -23103,9 +24152,6 @@ "value": "", "type": "Boolean", "label": "Was hovered", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WasHovered" } @@ -23120,6 +24166,7 @@ "category": "General", "extensionNamespace": "", "fullName": "Repeat every X seconds", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXJlcGVhdCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNywxN0g3VjE0TDMsMThMNywyMlYxOUgxOVYxM0gxN003LDdIMTdWMTBMMjEsNkwxNywyVjVINVYxMUg3VjdaIiAvPjwvc3ZnPg==", "name": "RepeatEveryXSeconds", @@ -24019,9 +25066,6 @@ "value": "MyTimer", "type": "String", "label": "The name of the timer to repeat", - "description": "", - "group": "", - "extraInformation": [], "deprecated": true, "name": "TimerName" }, @@ -24029,9 +25073,6 @@ "value": "1", "type": "Number", "label": "The time between each trigger (in seconds)", - "description": "", - "group": "", - "extraInformation": [], "deprecated": true, "name": "TimerLength" }, @@ -24039,9 +25080,6 @@ "value": "-1", "type": "Number", "label": "How many times should the timer trigger? -1 for forever.", - "description": "", - "group": "", - "extraInformation": [], "deprecated": true, "name": "Limit" }, @@ -24049,9 +25087,6 @@ "value": "0", "type": "Number", "label": "An internal counter", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Counter" } @@ -24066,6 +25101,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Auto typing animation for text (\"typewriter\" effect)", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXR5cGV3cml0ZXIiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMjAgMTNIMTZDMTYgMTQuMSAxNS4xIDE1IDE0IDE1SDEwQzguOSAxNSA4IDE0LjEgOCAxM0g0TDIgMThWMjBDMiAyMS4xIDIuOSAyMiA0IDIySDIwQzIxLjEgMjIgMjIgMjEuMSAyMiAyMFYxOE02IDIwQzUuMTEgMjAgNC42NiAxOC45MiA1LjI5IDE4LjI5QzUuOTIgMTcuNjYgNyAxOC4xMSA3IDE5QzcgMTkuNTUgNi41NSAyMCA2IDIwTTEwIDIwQzkuMTEgMjAgOC42NiAxOC45MiA5LjI5IDE4LjI5QzkuOTIgMTcuNjYgMTEgMTguMTEgMTEgMTlDMTEgMTkuNTUgMTAuNTUgMjAgMTAgMjBNMTQgMjBDMTMuMTEgMjAgMTIuNjYgMTguOTIgMTMuMjkgMTguMjlDMTMuOTIgMTcuNjYgMTUgMTguMTEgMTUgMTlDMTUgMTkuNTUgMTQuNTUgMjAgMTQgMjBNMTggMjBDMTcuMTEgMjAgMTYuNjYgMTguOTIgMTcuMjkgMTguMjlDMTcuOTIgMTcuNjYgMTkgMTguMTEgMTkgMTlDMTkgMTkuNTUgMTguNTUgMjAgMTggMjBNMTggMTBWM0g2VjEwSDNWMTJIMjFWMTBNOCA1SDE2VjZIOE04IDdIMTRWOEg4IiAvPjwvc3ZnPg==", "name": "AutoTyping", @@ -24931,18 +25967,12 @@ "type": "Number", "unit": "Second", "label": "Interval between characters", - "description": "", - "group": "", - "extraInformation": [], "name": "Interval" }, { "value": "", "type": "Boolean", "label": "Detect if a new text character was just displayed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CharacterJustAdded" }, @@ -24950,9 +25980,6 @@ "value": "", "type": "String", "label": "Text character that was most recently displayed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentCharacter" } @@ -25790,18 +26817,12 @@ "type": "Number", "unit": "Second", "label": "Interval between characters", - "description": "", - "group": "", - "extraInformation": [], "name": "Interval" }, { "value": "", "type": "Boolean", "label": "Detect if a new text character was just displayed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CharacterJustAdded" }, @@ -25809,9 +26830,6 @@ "value": "", "type": "String", "label": "Text character that was most recently displayed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentCharacter" } @@ -26649,18 +27667,12 @@ "type": "Number", "unit": "Second", "label": "Interval between characters", - "description": "", - "group": "", - "extraInformation": [], "name": "Interval" }, { "value": "", "type": "Boolean", "label": "Detect if a new text character was just displayed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CharacterJustAdded" }, @@ -26668,9 +27680,6 @@ "value": "", "type": "String", "label": "Text character that was most recently displayed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentCharacter" } @@ -26685,6 +27694,7 @@ "category": "Game mechanic", "extensionNamespace": "", "fullName": "Values of multiple objects", + "gdevelopVersion": "", "helpPath": "https://victrisgames.itch.io/values-of-multiple-objects", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWRvdHMtaGV4YWdvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNiAxMkMxNiAxMC45IDE2LjkgMTAgMTggMTBTMjAgMTAuOSAyMCAxMiAxOS4xIDE0IDE4IDE0IDE2IDEzLjEgMTYgMTJNMTAgMTJDMTAgMTAuOSAxMC45IDEwIDEyIDEwUzE0IDEwLjkgMTQgMTIgMTMuMSAxNCAxMiAxNCAxMCAxMy4xIDEwIDEyTTQgMTJDNCAxMC45IDQuOSAxMCA2IDEwUzggMTAuOSA4IDEyIDcuMSAxNCA2IDE0IDQgMTMuMSA0IDEyTTEzIDE4QzEzIDE2LjkgMTMuOSAxNiAxNSAxNlMxNyAxNi45IDE3IDE4IDE2LjEgMjAgMTUgMjAgMTMgMTkuMSAxMyAxOE03IDE4QzcgMTYuOSA3LjkgMTYgOSAxNlMxMSAxNi45IDExIDE4IDEwLjEgMjAgOSAyMCA3IDE5LjEgNyAxOE0xMyA2QzEzIDQuOSAxMy45IDQgMTUgNFMxNyA0LjkgMTcgNiAxNi4xIDggMTUgOCAxMyA3LjEgMTMgNk03IDZDNyA0LjkgNy45IDQgOSA0UzExIDQuOSAxMSA2IDEwLjEgOCA5IDggNyA3LjEgNyA2IiAvPjwvc3ZnPg==", "name": "ValuesOfMultipleObjects", @@ -29171,6 +30181,7 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Rectangular Movement (deprecated)", + "gdevelopVersion": "", "helpPath": "https://victrisgames.itch.io/extension-rectangular-movement", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNoYXBlLXJlY3RhbmdsZS1wbHVzIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE5LDZIMjJWOEgxOVYxMUgxN1Y4SDE0VjZIMTdWM0gxOVY2TTE3LDE3VjE0SDE5VjE5SDNWNkgxMVY4SDVWMTdIMTdaIiAvPjwvc3ZnPg==", "name": "RectangularMovement", @@ -31868,63 +32879,42 @@ "value": "300", "type": "Number", "label": "Horizontal speed", - "description": "", - "group": "", - "extraInformation": [], "name": "HorizontalSpeed" }, { "value": "300", "type": "Number", "label": "Vertical speed", - "description": "", - "group": "", - "extraInformation": [], "name": "VerticalSpeed" }, { "value": "100", "type": "Number", "label": "Horizontal Distance: Amplitude of the movement on X axis (0 to deactivate)", - "description": "", - "group": "", - "extraInformation": [], "name": "HorizontalDistance" }, { "value": "100", "type": "Number", "label": "Vertical Distance: Amplitude of the movement on Y axis (0 to deactivate)", - "description": "", - "group": "", - "extraInformation": [], "name": "VerticalDistance" }, { "value": "0", "type": "Number", "label": "Center of movement, X position", - "description": "", - "group": "", - "extraInformation": [], "name": "CenterPointX" }, { "value": "0", "type": "Number", "label": "Center of movement, Y position", - "description": "", - "group": "", - "extraInformation": [], "name": "CenterPointY" }, { "value": "0", "type": "Number", "label": "Counter used to change X position", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProgressX" }, @@ -31932,9 +32922,6 @@ "value": "0", "type": "Number", "label": "Counter used to change Y position", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProgressY" }, @@ -31942,9 +32929,6 @@ "value": "0", "type": "Number", "label": "Counter used for rectangular movement", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RectangularCounter" }, @@ -31952,26 +32936,18 @@ "value": "", "type": "Boolean", "label": "Use a constant speed for movement", - "description": "", - "group": "", - "extraInformation": [], "name": "ConstantSpeed" }, { "value": "", "type": "Boolean", "label": "Use counter-clockwise direction", - "description": "", - "group": "", - "extraInformation": [], "name": "CounterClockwise" }, { "value": "", "type": "Choice", "label": "Current direction the object is moving", - "description": "", - "group": "", "extraInformation": [ "Left", "Right", @@ -31992,6 +32968,7 @@ "category": "Visual effect", "extensionNamespace": "", "fullName": "Shake object", + "gdevelopVersion": "", "helpPath": "https://victrisgames.itch.io/gdevelop-camera-shake-example", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFycm93LWFsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMywxMUgxOEwxNi41LDkuNUwxNy45Miw4LjA4TDIxLjg0LDEyTDE3LjkyLDE1LjkyTDE2LjUsMTQuNUwxOCwxM0gxM1YxOEwxNC41LDE2LjVMMTUuOTIsMTcuOTJMMTIsMjEuODRMOC4wOCwxNy45Mkw5LjUsMTYuNUwxMSwxOFYxM0g2TDcuNSwxNC41TDYuMDgsMTUuOTJMMi4xNiwxMkw2LjA4LDguMDhMNy41LDkuNUw2LDExSDExVjZMOS41LDcuNUw4LjA4LDYuMDhMMTIsMi4xNkwxNS45Miw2LjA4TDE0LjUsNy41TDEzLDZWMTFaIiAvPjwvc3ZnPg==", "name": "ShakeObject", @@ -36396,6 +37373,7 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Draggable (for physics objects)", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMjcsMTFjMC0yLTIuMi0zLjYtNS42LTQuNEMyMC42LDMuMiwxOSwxLDE3LDFzLTMuNiwyLjItNC40LDUuNkM5LjIsNy40LDcsOSw3LDExYzAsMiwyLjIsMy42LDUuNiw0LjQNCgljMC4zLDEuMiwwLjYsMi4yLDEuMSwzLjFjMC4zLDAuNSwwLjksMC43LDEuNCwwLjRjMC41LTAuMywwLjctMC45LDAuNC0xLjRjLTAuMy0wLjUtMC41LTEuMS0wLjctMS44YzAuNywwLjEsMS41LDAuMSwyLjIsMC4xDQoJYzAuOCwwLDEuNSwwLDIuMi0wLjFjLTAuMywxLTAuNywxLjktMS4xLDIuNWMtMC4zLDAuNC0wLjIsMS4xLDAuMiwxLjRjMC4yLDAuMSwwLjQsMC4yLDAuNiwwLjJjMC4zLDAsMC42LTAuMSwwLjgtMC40DQoJYzAuNy0xLDEuMy0yLjQsMS43LTRDMjQuOCwxNC42LDI3LDEzLDI3LDExeiBNMTcsM2MwLjcsMCwxLjYsMS4yLDIuMiwzLjNjLTAuNy0wLjEtMS41LTAuMS0yLjItMC4xcy0xLjUsMC0yLjIsMC4xDQoJQzE1LjQsNC4yLDE2LjMsMywxNywzeiBNOSwxMWMwLTAuNywxLjItMS42LDMuMy0yLjJjLTAuMSwwLjctMC4xLDEuNS0wLjEsMi4yYzAsMC44LDAsMS41LDAuMSwyLjJDMTAuMiwxMi42LDksMTEuNyw5LDExeiBNMTcsMTMuOQ0KCWMtMSwwLTEuOS0wLjEtMi43LTAuMmMtMC4xLTAuOC0wLjItMS43LTAuMi0yLjdjMC0xLDAuMS0xLjksMC4yLTIuN0MxNS4xLDguMiwxNiw4LjEsMTcsOC4xczEuOSwwLjEsMi43LDAuMg0KCWMwLjEsMC44LDAuMiwxLjcsMC4yLDIuN2MwLDAuOS0wLjEsMS44LTAuMiwyLjdDMTguOSwxMy44LDE4LDEzLjksMTcsMTMuOXogTTIxLjcsMTMuMmMwLjEtMC43LDAuMS0xLjUsMC4xLTIuMg0KCWMwLTAuOCwwLTEuNS0wLjEtMi4yQzIzLjgsOS40LDI1LDEwLjMsMjUsMTFDMjUsMTEuNywyMy44LDEyLjYsMjEuNywxMy4yeiIvPg0KPHBhdGggZD0iTTI5LjksMTcuNUMyOS43LDE3LjIsMjkuNCwxNywyOSwxN2MtMi4yLDAtNC4zLDEtNS42LDIuOEwyMi41LDIxYy0xLjEsMS4zLTIuOCwyLTQuNSwyaC0zYy0wLjYsMC0xLTAuNC0xLTFzMC40LTEsMS0xaDEuOQ0KCWMxLjYsMCwzLjEtMS4zLDMuMS0yLjljMCwwLDAtMC4xLDAtMC4xYzAtMC41LTAuNS0xLTEtMWwtNi4xLDBjLTMuNiwwLTYuNSwxLjYtOC4xLDQuMmwtMi43LDQuMmMtMC4yLDAuMy0wLjIsMC43LDAsMWwzLDUNCgljMC4xLDAuMiwwLjQsMC40LDAuNiwwLjVjMC4xLDAsMC4xLDAsMC4yLDBjMC4yLDAsMC40LTAuMSwwLjYtMC4yYzMuOC0yLjUsOC4yLTMuOCwxMi43LTMuOGMzLjMsMCw2LjMtMS44LDcuOS00LjdsMi43LTQuOA0KCUMzMCwxOC4yLDMwLDE3LjgsMjkuOSwxNy41eiIvPg0KPC9zdmc+DQo=", "name": "DraggablePhysics", @@ -37384,8 +38362,6 @@ "value": "", "type": "Behavior", "label": "Physics behavior", - "description": "", - "group": "", "extraInformation": [ "Physics2::Physics2Behavior" ], @@ -37395,8 +38371,6 @@ "value": "Left", "type": "Choice", "label": "Mouse button", - "description": "", - "group": "", "extraInformation": [ "Left", "Right", @@ -37409,36 +38383,24 @@ "type": "Number", "unit": "Newton", "label": "Maximum force", - "description": "", - "group": "", - "extraInformation": [], "name": "MaxForce" }, { "value": "10", "type": "Number", "label": "Frequency (Hz) ", - "description": "", - "group": "", - "extraInformation": [], "name": "Frequency" }, { "value": "1", "type": "Number", "label": "Damping ratio (Range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], "name": "Damping" }, { "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseJointID" }, @@ -37447,8 +38409,6 @@ "type": "Boolean", "label": "Enable automatic dragging", "description": "If automatic dragging is disabled, use the \"Start drag\" and \"Release drag\" actions.", - "group": "", - "extraInformation": [], "name": "EnableAutomaticDragging" } ], @@ -37612,7 +38572,7 @@ "gridColor": 4868682, "gridAlpha": 0.2, "snap": true, - "zoomFactor": 0.34421591388751493, + "zoomFactor": 0.3329874666011419, "windowMask": false } }, @@ -39525,6 +40485,5 @@ "windowMask": false } } - ], - "externalSourceFiles": [] + ] } \ No newline at end of file diff --git a/examples/platformer/platformer.json b/examples/platformer/platformer.json index 08030f4f9..974f34298 100644 --- a/examples/platformer/platformer.json +++ b/examples/platformer/platformer.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 221, + "build": 237, "major": 5, "minor": 5, "revision": 0 @@ -57,6 +57,7 @@ "playableDevices": [ "keyboard", "gamepad", + "mobile", "mobile" ], "extensionProperties": [], @@ -754,6 +755,42 @@ "smoothed": true, "userAdded": true }, + { + "file": "assets/gui/Thumbstick_Dark.png", + "kind": "image", + "metadata": "", + "name": "assets\\gui\\Thumbstick_Dark.png", + "smoothed": true, + "userAdded": true + }, + { + "file": "assets/gui/Thumbstick Boundary_Dark160.png", + "kind": "image", + "metadata": "", + "name": "assets\\gui\\Thumbstick Boundary_Dark160.png", + "smoothed": true, + "userAdded": true + }, + { + "file": "assets/gui/black.png", + "kind": "image", + "metadata": "", + "name": "assets\\gui\\black.png", + "smoothed": true, + "userAdded": true + }, + { + "file": "assets/rotate-screen-icon.png", + "kind": "image", + "metadata": "", + "name": "rotate-screen-icon.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Mobile Layouts/assets/6a8102ce3340bf9f62300ee1a81ef0b2327b2c6e8d62d7dda68d547f5e2b5969_rotate-screen-icon.png", + "name": "rotate-screen-icon.png" + } + }, { "file": "assets/Purple Button With Shadow_Hovered.png", "kind": "image", @@ -762,7 +799,7 @@ "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/4a64488d212c7a69721b3ac48319e64bc830f5663535fdafb18e2fc907e8d10a_Purple Button With Shadow_Hovered.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/4a64488d212c7a69721b3ac48319e64bc830f5663535fdafb18e2fc907e8d10a_Purple Button With Shadow_Hovered.png", "name": "Purple Button With Shadow_Hovered.png" } }, @@ -774,7 +811,7 @@ "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/e44a40d67427b4e53751fc82b5ad4d87b2daf311558dcf0151cd1b173b7e5dcf_Purple Button With Shadow_Idle.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/e44a40d67427b4e53751fc82b5ad4d87b2daf311558dcf0151cd1b173b7e5dcf_Purple Button With Shadow_Idle.png", "name": "Purple Button With Shadow_Idle.png" } }, @@ -786,7 +823,7 @@ "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/04a69986487fb427759132f3807a28db0f3b845623d5ba34d063f46a9ee22f63_Purple Button With Shadow_Pressed.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/04a69986487fb427759132f3807a28db0f3b845623d5ba34d063f46a9ee22f63_Purple Button With Shadow_Pressed.png", "name": "Purple Button With Shadow_Pressed.png" } }, @@ -797,45 +834,9 @@ "name": "CantoraOne-Regular.ttf", "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/05b0c1364a92b436b86ca819e66b63480d1bc2fb399f6c0cf8bffbf8199ccc2a_CantoraOne-Regular.ttf", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/05b0c1364a92b436b86ca819e66b63480d1bc2fb399f6c0cf8bffbf8199ccc2a_CantoraOne-Regular.ttf", "name": "CantoraOne-Regular.ttf" } - }, - { - "file": "assets/gui/Thumbstick_Dark.png", - "kind": "image", - "metadata": "", - "name": "assets\\gui\\Thumbstick_Dark.png", - "smoothed": true, - "userAdded": true - }, - { - "file": "assets/gui/Thumbstick Boundary_Dark160.png", - "kind": "image", - "metadata": "", - "name": "assets\\gui\\Thumbstick Boundary_Dark160.png", - "smoothed": true, - "userAdded": true - }, - { - "file": "assets/gui/black.png", - "kind": "image", - "metadata": "", - "name": "assets\\gui\\black.png", - "smoothed": true, - "userAdded": true - }, - { - "file": "assets/rotate-screen-icon.png", - "kind": "image", - "metadata": "", - "name": "rotate-screen-icon.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Mobile Layouts/assets/6a8102ce3340bf9f62300ee1a81ef0b2327b2c6e8d62d7dda68d547f5e2b5969_rotate-screen-icon.png", - "name": "rotate-screen-icon.png" - } } ], "resourceFolders": [] @@ -1534,6 +1535,7 @@ "assetStoreId": "", "name": "GameOverDialog", "type": "GameOverDialog::GameOverDialog", + "variant": "", "variables": [], "effects": [], "behaviors": [ @@ -5521,6 +5523,7 @@ "assetStoreId": "", "name": "Joystick", "type": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "variant": "", "variables": [], "effects": [], "behaviors": [], @@ -5698,17 +5701,18 @@ "assetStoreId": "e5919fb86a559b00001678c710efe55f4e9f2e032a9ff9610087370f998d57de", "name": "ScreenOrientationChecker", "type": "ScreenOrientationChecker::ScreenOrientationChecker", + "variant": "", "variables": [], "effects": [], "behaviors": [ { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", "bottomEdgeAnchor": 2, "leftEdgeAnchor": 1, - "name": "Anchor", "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "topEdgeAnchor": 1, - "type": "AnchorBehavior::AnchorBehavior", "useLegacyBottomAndRightAnchors": false } ], @@ -7558,6 +7562,7 @@ "category": "", "extensionNamespace": "", "fullName": "", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "", "name": "GameOverDialog", @@ -7586,168 +7591,6 @@ "isInnerAreaFollowingParentSize": true, "isUsingLegacyInstancesRenderer": false, "name": "GameOverDialog", - "eventsFunctions": [ - { - "fullName": "Score", - "functionType": "Action", - "name": "SetScore", - "sentence": "Change the score of _PARAM0_ to _PARAM1_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "EndScreenSubHeader", - "Text", - "=", - "\"You got \" + Score + \" points!\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Display appropriate text based on player score" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareArgumentAsNumber" - }, - "parameters": [ - "\"Score\"", - "<", - "MaxScore" - ] - } - ], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "EndScreenChallengeText", - "Text", - "=", - "\"Can you get \" + MaxScore + \" points?\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareArgumentAsNumber" - }, - "parameters": [ - "\"Score\"", - ">=", - "MaxScore" - ] - } - ], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "EndScreenChallengeText", - "Text", - "=", - "\"You got the highest number of points!\"" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "GameOverDialog::GameOverDialog", - "type": "object" - }, - { - "description": "Score", - "name": "Score", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "fullName": "Retry button clicked", - "functionType": "Condition", - "name": "IsRetryClicked", - "sentence": "Retry button of _PARAM0_ is clicked", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" - }, - "parameters": [ - "RetryButton", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "GameOverDialog::GameOverDialog", - "type": "object" - } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "950", - "type": "Number", - "unit": "Dimensionless", - "label": "Maximum score", - "description": "", - "group": "", - "extraInformation": [], - "name": "MaxScore" - } - ], "objects": [ { "adaptCollisionMaskAutomatically": true, @@ -7824,6 +7667,7 @@ "assetStoreId": "a48315b9a9c655af87118d7bb8f6be03b4dbb14e066387849b2d2d4c3600573c", "name": "RetryButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Purple Button With Shadow", "variables": [], "effects": [], "behaviors": [ @@ -7844,7 +7688,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 24, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Retry" }, "childrenContent": { "Hovered": { @@ -8204,7 +8049,167 @@ "stringProperties": [], "initialVariables": [] } - ] + ], + "eventsFunctions": [ + { + "fullName": "Score", + "functionType": "Action", + "name": "SetScore", + "sentence": "Change the score of _PARAM0_ to _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "EndScreenSubHeader", + "Text", + "=", + "\"You got \" + Score + \" points!\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Display appropriate text based on player score" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsNumber" + }, + "parameters": [ + "\"Score\"", + "<", + "MaxScore" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "EndScreenChallengeText", + "Text", + "=", + "\"Can you get \" + MaxScore + \" points?\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsNumber" + }, + "parameters": [ + "\"Score\"", + ">=", + "MaxScore" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "EndScreenChallengeText", + "Text", + "=", + "\"You got the highest number of points!\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "GameOverDialog::GameOverDialog", + "type": "object" + }, + { + "description": "Score", + "name": "Score", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "Retry button clicked", + "functionType": "Condition", + "name": "IsRetryClicked", + "sentence": "Retry button of _PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "RetryButton", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "GameOverDialog::GameOverDialog", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "950", + "type": "Number", + "unit": "Dimensionless", + "label": "Maximum score", + "name": "MaxScore" + } + ], + "variants": [] } ] }, @@ -8213,6 +8218,7 @@ "category": "Camera", "extensionNamespace": "", "fullName": "Parallax for Tiled Sprite", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWltYWdlLW1vdmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUsM0gxOVYwTDI0LDVMMTksMTBWN0gxNVYzTTIxLDExLjk0VjE5QTIsMiAwIDAsMSAxOSwyMUg1QTIsMiAwIDAsMSAzLDE5VjVBMiwyIDAgMCwxIDUsM0gxMi4wNkMxMiwzLjMzIDEyLDMuNjcgMTIsNEE4LDggMCAwLDAgMjAsMTJDMjAuMzMsMTIgMjAuNjcsMTIgMjEsMTEuOTRNMTksMThMMTQuNSwxMkwxMSwxNi41TDguNSwxMy41TDUsMThIMTlaIiAvPjwvc3ZnPg==", "name": "Parallax", @@ -8328,18 +8334,12 @@ "value": "0.5", "type": "Number", "label": "Parallax factor (speed for the parallax, usually between 0 and 1)", - "description": "", - "group": "", - "extraInformation": [], "name": "ParallaxFactor" }, { "value": "", "type": "String", "label": "Layer to be followed (leave empty for the base layer)", - "description": "", - "group": "", - "extraInformation": [], "name": "FollowedLayer" } ], @@ -8429,18 +8429,12 @@ "value": "0.5", "type": "Number", "label": "Parallax factor (speed for the parallax, usually between 0 and 1)", - "description": "", - "group": "", - "extraInformation": [], "name": "ParallaxFactor" }, { "value": "", "type": "String", "label": "Layer to be followed (leave empty for the base layer)", - "description": "", - "group": "", - "extraInformation": [], "name": "FollowedLayer" }, { @@ -8448,9 +8442,6 @@ "type": "Number", "unit": "Pixel", "label": "Offset on Y axis", - "description": "", - "group": "", - "extraInformation": [], "name": "OffsetY" } ], @@ -8464,12 +8455,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", + "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.4.6", + "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.", "", @@ -8486,6 +8478,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": [], @@ -8530,11 +8528,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -8543,11 +8540,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -8581,12 +8577,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -8596,11 +8592,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -8617,12 +8614,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -8645,12 +8642,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -8660,11 +8657,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -8683,12 +8679,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -8720,11 +8716,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -8754,23 +8749,22 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -8812,11 +8806,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -8831,11 +8824,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -8864,20 +8856,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -8886,11 +8878,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -8902,20 +8893,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -8924,11 +8915,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -8941,20 +8931,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -8963,11 +8953,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -8979,20 +8968,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -9001,11 +8990,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -9040,11 +9028,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -9056,11 +9043,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -9069,11 +9055,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -9086,11 +9071,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -9098,11 +9082,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -9111,11 +9094,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -9198,22 +9180,20 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -9248,11 +9228,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -9297,11 +9276,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -9346,11 +9324,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -9395,11 +9372,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -9421,11 +9397,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -9470,11 +9445,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -9519,11 +9493,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -9603,8 +9576,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -9612,8 +9583,6 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", "extraInformation": [ "Idle", "Hovered", @@ -9628,9 +9597,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -9638,9 +9604,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -9648,9 +9611,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -9658,9 +9618,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -9670,7 +9627,7 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 64, + "areaMaxX": 256, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, @@ -9679,8 +9636,258 @@ "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", - "isUsingLegacyInstancesRenderer": true, + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 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": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": 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": "", @@ -9710,7 +9917,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -9722,7 +9929,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -9730,14 +9937,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()" ] }, { @@ -9765,63 +9982,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" ] } ] @@ -9860,18 +10040,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": [ @@ -9933,12 +10142,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -9973,10 +10183,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -9985,7 +10195,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -9993,7 +10203,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -10004,10 +10214,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -10031,10 +10241,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -10051,10 +10262,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -10083,12 +10295,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -10128,10 +10341,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -10160,12 +10374,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -10217,12 +10432,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -10254,143 +10470,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": [ @@ -10401,79 +10480,64 @@ "type": "object" } ], - "objectGroups": [ + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "name": "Hovered" - }, + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsIdle" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ { - "name": "Pressed" + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] } ] } - ] + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] }, { - "description": "Check if the button is not used.", - "fullName": "Is idle", + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", "functionType": "Condition", - "name": "IsIdle", - "sentence": "_PARAM0_ is idle", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::IsIdle" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the button was just clicked.", - "fullName": "Is clicked", - "functionType": "Condition", - "name": "IsClicked", - "sentence": "_PARAM0_ is clicked", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsClicked" + "value": "PanelSpriteButton::ButtonFSM::IsClicked" }, "parameters": [ "Idle", @@ -10638,6 +10702,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -10646,21 +10711,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", - "LabelText" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -10675,17 +10732,17 @@ }, { "description": "Text", - "name": "LabelText", + "name": "Value", "type": "string" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", "sentence": "", "events": [ { @@ -10694,18 +10751,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Label", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -10717,12 +10774,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", @@ -10730,17 +10786,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Label.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -10753,65 +10809,35 @@ "objectGroups": [] }, { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" - ] - }, + "conditions": [ { "type": { - "value": "TextObject::WrappingWidth" + "value": "BooleanVariable" }, "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" + "ShouldActivate", + "True", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "SetCenterY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } + "Idle", + "ButtonFSM", + "yes" ] } ] @@ -10821,10 +10847,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", + "ShouldActivate", + "True", "" ] } @@ -10832,12 +10860,12 @@ "actions": [ { "type": { - "value": "MettreY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" + "Idle", + "ButtonFSM", + "no" ] } ] @@ -10849,126 +10877,123 @@ "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - } - ], - "objectGroups": [ + }, { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" } - ] + ], + "objectGroups": [] }, { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BehaviorActivated" }, "parameters": [ - "\"ShouldActivate\"" + "Idle", + "ButtonFSM" ] } ], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnBoolean" }, "parameters": [ - "Idle", - "ButtonFSM", - "yes" + "True" ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"ShouldActivate\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnNumber" }, "parameters": [ - "Idle", - "ButtonFSM", - "no" + "LabelOffset" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - }, - { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "BehaviorActivated" + "value": "SetCenterY" }, "parameters": [ - "Idle", - "ButtonFSM" + "Label", + "+", + "Value - LabelOffset" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "LabelOffset", + "=", + "Value" ] } ] @@ -10987,227 +11012,317 @@ ], "propertyDescriptors": [ { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "name": "PressedLabelOffsetY" + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" }, { - "value": "0", + "value": "0.25", "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "LeftPadding" + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" }, { "value": "0", "type": "Number", - "label": "Right padding", - "description": "", - "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", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "TopPadding" + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" }, { - "value": "0", - "type": "Number", - "label": "Bottom padding", - "description": "", - "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)", - "description": "", - "group": "", - "extraInformation": [], - "name": "HoveredFadeOutDuration" + "hidden": true, + "name": "_PropertyMapping" } ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 + "variants": [ + { + "areaMaxX": 192, + "areaMaxY": 69, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "a48315b9a9c655af87118d7bb8f6be03b4dbb14e066387849b2d2d4c3600573c", + "assetStoreOriginalName": "Purple Button With Shadow", + "name": "Purple Button With Shadow", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "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": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Purple Button With Shadow_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Purple Button With Shadow_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Purple Button With Shadow_Pressed.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] }, - "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": "Text", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "0;0;0" - } - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "objectsGroups": [ { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] } ], - "effects": [], - "behaviors": [ + "layers": [ { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "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": [] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + ], + "instances": [ { - "name": "Tween", - "type": "Tween::TweenBehavior" + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 60, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "0e01d24f-cdb7-49dc-887c-3aa618d13841", + "width": 188, + "x": 2, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Idle" - }, - { - "objectName": "Hovered" - }, - { - "objectName": "Pressed" - } - ] - }, - "objectsGroups": [], - "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": [] + ] } ] }, @@ -11216,12 +11331,13 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Platformer character animator", + "gdevelopVersion": ">=5.5.222", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGc+DQoJPHBhdGggZD0iTTIzLDExYzIuMiwwLDQtMS44LDQtNHMtMS44LTQtNC00cy00LDEuOC00LDRTMjAuOCwxMSwyMywxMXoiLz4NCgk8cGF0aCBkPSJNMzAuOCwxMi40Yy0wLjMtMC40LTEtMC41LTEuNC0wLjJsLTIuOSwyLjNjLTAuOCwwLjctMiwwLjYtMi43LTAuMmwtNy45LTcuOWMtMS42LTEuNi00LjEtMS42LTUuNywwTDcuMyw5LjMNCgkJYy0wLjQsMC40LTAuNCwxLDAsMS40czEsMC40LDEuNCwwbDIuOC0yLjhjMC44LTAuOCwyLjEtMC44LDIuOSwwbDEuNiwxLjZMMTEuNiwxNGMtMSwxLTEuNCwyLjMtMS4xLDMuN2MwLjIsMS4xLDAuOSwyLDEuOCwyLjYNCgkJbC0xLjYsMS42Yy0wLjQsMC40LTEsMC40LTEuNCwwbC0zLjYtMy42Yy0wLjQtMC40LTEtMC40LTEuNCwwcy0wLjQsMSwwLDEuNGwzLjYsMy42YzAuNiwwLjYsMS4zLDAuOSwyLjEsMC45czEuNi0wLjMsMi4xLTAuOQ0KCQlsMi4xLTIuMWwyLjUsMWMwLjcsMC4zLDEuMiwxLDEuMiwxLjh2NmMwLDAuNiwwLjQsMSwxLDFzMS0wLjQsMS0xdi02YzAtMS42LTEtMy4xLTIuNS0zLjdsLTEuNy0wLjdsNS4yLTUuMmwxLjQsMS40DQoJCWMwLjgsMC44LDEuOCwxLjIsMi45LDEuMmMwLjksMCwxLjgtMC4zLDIuNS0wLjlsMi45LTIuM0MzMS4xLDEzLjQsMzEuMSwxMi44LDMwLjgsMTIuNHoiLz4NCjwvZz4NCjwvc3ZnPg0K", "name": "PlatformerCharacterAnimator", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Glyphster Pack/Master/SVG/Sports and Fitness/Sports and Fitness_training_running_run.svg", "shortDescription": "Change animations and horizontal flipping of a platformer character automatically.", - "version": "1.1.2", + "version": "1.2.0", "description": [ "Automatically change the animations and horizontal flipping of a platformer character based on movement and interaction with platform objects.", "", @@ -11271,11 +11387,12 @@ "conditions": [ { "type": { - "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::PropertyEnableHorizontalFlipping" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "EnableHorizontalFlipping", + "True", + "" ] } ], @@ -11388,11 +11505,12 @@ "conditions": [ { "type": { - "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::PropertyEnableAnimationChanges" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "EnableAnimationChanges", + "True", + "" ] } ], @@ -11725,11 +11843,12 @@ "conditions": [ { "type": { - "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::PropertyEnableHorizontalFlipping" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "EnableHorizontalFlipping", + "True", + "" ] } ], @@ -11830,11 +11949,12 @@ "conditions": [ { "type": { - "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::PropertyEnableAnimationChanges" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "EnableAnimationChanges", + "True", + "" ] } ], @@ -12111,11 +12231,11 @@ "actions": [ { "type": { - "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyEnableAnimationChanges" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "EnableAnimationChanges", + "False", "" ] } @@ -12126,22 +12246,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyEnableAnimationChanges" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "EnableAnimationChanges", + "True", + "" ] } ] @@ -12182,11 +12304,11 @@ "actions": [ { "type": { - "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyEnableHorizontalFlipping" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "EnableHorizontalFlipping", + "False", "" ] } @@ -12197,22 +12319,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyEnableHorizontalFlipping" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "EnableHorizontalFlipping", + "True", + "" ] } ] @@ -12254,11 +12378,10 @@ "actions": [ { "type": { - "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyIdleAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleAnimationName", "=", "Value" ] @@ -12300,11 +12423,10 @@ "actions": [ { "type": { - "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyRunAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "RunAnimationName", "=", "Value" ] @@ -12346,11 +12468,10 @@ "actions": [ { "type": { - "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyJumpAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "JumpAnimationName", "=", "Value" ] @@ -12392,11 +12513,10 @@ "actions": [ { "type": { - "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyFallAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FallAnimationName", "=", "Value" ] @@ -12438,11 +12558,10 @@ "actions": [ { "type": { - "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyClimbAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "ClimbAnimationName", "=", "Value" ] @@ -12476,71 +12595,53 @@ "value": "true", "type": "Boolean", "label": "Enable animation changes", - "description": "", - "group": "", - "extraInformation": [], "name": "EnableAnimationChanges" }, { "value": "true", "type": "Boolean", "label": "Enable horizontal flipping", - "description": "", - "group": "", - "extraInformation": [], "name": "EnableHorizontalFlipping" }, { "value": "Idle", "type": "String", "label": "\"Idle\" animation name ", - "description": "", "group": "Animation names", - "extraInformation": [], "name": "IdleAnimationName" }, { "value": "Run", "type": "String", "label": "\"Run\" animation name", - "description": "", "group": "Animation names", - "extraInformation": [], "name": "RunAnimationName" }, { "value": "Jump", "type": "String", "label": "\"Jump\" animation name", - "description": "", "group": "Animation names", - "extraInformation": [], "name": "JumpAnimationName" }, { "value": "Fall", "type": "String", "label": "\"Fall\" animation name", - "description": "", "group": "Animation names", - "extraInformation": [], "name": "FallAnimationName" }, { "value": "Climb", "type": "String", "label": "\"Climb\" animation name", - "description": "", "group": "Animation names", - "extraInformation": [], "name": "ClimbAnimationName" }, { "value": "", "type": "Behavior", "label": "Platformer character", - "description": "", - "group": "", "extraInformation": [ "PlatformBehavior::PlatformerObjectBehavior" ], @@ -12550,8 +12651,6 @@ "value": "", "type": "Behavior", "label": "Animatable capacity", - "description": "", - "group": "", "extraInformation": [ "AnimatableCapability::AnimatableBehavior" ], @@ -12561,8 +12660,6 @@ "value": "", "type": "Behavior", "label": "Flippable capacity", - "description": "", - "group": "", "extraInformation": [ "FlippableCapability::FlippableBehavior" ], @@ -12579,12 +12676,13 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Rectangular movement", + "gdevelopVersion": ">=5.5.222", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNoYXBlLXJlY3RhbmdsZS1wbHVzIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE5LDZIMjJWOEgxOVYxMUgxN1Y4SDE0VjZIMTdWM0gxOVY2TTE3LDE3VjE0SDE5VjE5SDNWNkgxMVY4SDVWMTdIMTdaIiAvPjwvc3ZnPg==", "name": "RectangleMovement", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/shape-rectangle-plus.svg", "shortDescription": "Move objects in a rectangular pattern.", - "version": "1.2.2", + "version": "1.3.0", "description": [ "Move objects in a rectangular pattern with easing functions from the Tween extension.", "", @@ -13117,10 +13215,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsString" + "value": "StringVariable" }, "parameters": [ - "\"PositionOnBorder\"", + "PositionOnBorder", "=", "\"Center\"" ] @@ -13190,10 +13288,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsString" + "value": "StringVariable" }, "parameters": [ - "\"PositionOnBorder\"", + "PositionOnBorder", "=", "\"Outside\"" ] @@ -13604,22 +13702,20 @@ "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyOldX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldX", "=", "Object.X()" ] }, { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyOldY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldY", "=", "Object.Y()" ] @@ -13643,11 +13739,10 @@ "conditions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::PropertyInitialPosition" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "InitialPosition", "=", "\"Top-right corner\"" ] @@ -13656,11 +13751,10 @@ "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Progress", "=", "Object.Behavior::TopRightDuration() / Object.Behavior::LoopDuration()" ] @@ -13672,11 +13766,10 @@ "conditions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::PropertyInitialPosition" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "InitialPosition", "=", "\"Bottom-right corner\"" ] @@ -13685,11 +13778,10 @@ "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Progress", "=", "Object.Behavior::BottomRightDuration() / Object.Behavior::LoopDuration()" ] @@ -13701,11 +13793,10 @@ "conditions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::PropertyInitialPosition" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "InitialPosition", "=", "\"Bottom-left corner\"" ] @@ -13714,11 +13805,10 @@ "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Progress", "=", "Object.Behavior::BottomLeftDuration() / Object.Behavior::LoopDuration()" ] @@ -13731,22 +13821,20 @@ "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyLeft" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Left", "=", "Object.X() - Object.Behavior::DeltaX()" ] }, { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Top", "=", "Object.Y() - Object.Behavior::DeltaY()" ] @@ -13793,22 +13881,20 @@ "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyLeft" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Left", "+", "Object.X() - OldX" ] }, { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Top", "+", "Object.Y() - OldY" ] @@ -13863,22 +13949,20 @@ "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyOldX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldX", "=", "Object.X()" ] }, { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyOldY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldY", "=", "Object.Y()" ] @@ -13924,22 +14008,22 @@ "conditions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "Clockwise", + "True", + "" ] } ], "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Progress", "=", "mod(Progress + TimeDelta() / Object.Behavior::LoopDuration(), 1)" ] @@ -13952,22 +14036,22 @@ { "type": { "inverted": true, - "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "Clockwise", + "True", + "" ] } ], "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Progress", "=", "mod(Progress - TimeDelta() / Object.Behavior::LoopDuration(), 1)" ] @@ -14014,11 +14098,10 @@ "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Progress", "=", "0" ] @@ -14042,11 +14125,10 @@ "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Progress", "=", "Object.Behavior::TopRightDuration() / Object.Behavior::LoopDuration()" ] @@ -14070,11 +14152,10 @@ "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Progress", "=", "Object.Behavior::BottomRightDuration() / Object.Behavior::LoopDuration()" ] @@ -14098,11 +14179,10 @@ "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Progress", "=", "Object.Behavior::BottomLeftDuration() / Object.Behavior::LoopDuration()" ] @@ -14552,22 +14632,20 @@ "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyWidth" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Width", "+", "Left - Value" ] }, { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyLeft" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Left", "=", "Value" ] @@ -14609,22 +14687,20 @@ "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyHeight" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Height", "+", "Top - Value" ] }, { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Top", "=", "Value" ] @@ -14666,11 +14742,10 @@ "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyWidth" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Width", "=", "Value - Left" ] @@ -14712,11 +14787,10 @@ "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyHeight" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Height", "=", "Value - Top" ] @@ -14758,11 +14832,10 @@ "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyHorizontalEdgeDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HorizontalEdgeDuration", "=", "Value" ] @@ -14804,11 +14877,10 @@ "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyVerticalEdgeDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalEdgeDuration", "=", "Value" ] @@ -14849,22 +14921,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyClockwise" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "Clockwise", + "True", + "" ] } ] @@ -14875,22 +14949,24 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyClockwise" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "Clockwise", + "False", + "" ] } ] @@ -14930,11 +15006,10 @@ "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "Easing", "=", "Value" ] @@ -14975,23 +15050,24 @@ "conditions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "Clockwise", + "True", + "" ] } ], "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyToogleClockwise" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "ToogleClockwise", + "True", + "" ] } ] @@ -15002,23 +15078,24 @@ { "type": { "inverted": true, - "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "Clockwise", + "True", + "" ] } ], "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyToogleClockwise" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=" + "ToogleClockwise", + "False", + "" ] } ] @@ -15028,23 +15105,24 @@ "conditions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::PropertyToogleClockwise" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ToogleClockwise", + "True", + "" ] } ], "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyClockwise" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "Clockwise", + "False", + "" ] } ] @@ -15055,23 +15133,24 @@ { "type": { "inverted": true, - "value": "RectangleMovement::RectangleMovement::PropertyToogleClockwise" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ToogleClockwise", + "True", + "" ] } ], "actions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::SetPropertyClockwise" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "Clockwise", + "True", + "" ] } ] @@ -15104,11 +15183,12 @@ "conditions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "Clockwise", + "True", + "" ] } ], @@ -15152,11 +15232,12 @@ { "type": { "inverted": true, - "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "Clockwise", + "True", + "" ] }, { @@ -15186,11 +15267,12 @@ "conditions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "Clockwise", + "True", + "" ] }, { @@ -15243,11 +15325,12 @@ "conditions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "Clockwise", + "True", + "" ] }, { @@ -15278,11 +15361,12 @@ { "type": { "inverted": true, - "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "Clockwise", + "True", + "" ] }, { @@ -15335,11 +15419,12 @@ "conditions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "Clockwise", + "True", + "" ] }, { @@ -15370,11 +15455,12 @@ { "type": { "inverted": true, - "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "Clockwise", + "True", + "" ] }, { @@ -15427,11 +15513,12 @@ "conditions": [ { "type": { - "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "Clockwise", + "True", + "" ] }, { @@ -15462,11 +15549,12 @@ { "type": { "inverted": true, - "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "Clockwise", + "True", + "" ] }, { @@ -16317,9 +16405,7 @@ "type": "Number", "unit": "Pixel", "label": "Width", - "description": "", "group": "Dimension", - "extraInformation": [], "name": "Width" }, { @@ -16327,18 +16413,14 @@ "type": "Number", "unit": "Pixel", "label": "Height", - "description": "", "group": "Dimension", - "extraInformation": [], "name": "Height" }, { "value": "true", "type": "Boolean", "label": "Clockwise", - "description": "", "group": "Speed", - "extraInformation": [], "name": "Clockwise" }, { @@ -16346,9 +16428,7 @@ "type": "Number", "unit": "Second", "label": "Horizontal edge duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "HorizontalEdgeDuration" }, { @@ -16356,18 +16436,13 @@ "type": "Number", "unit": "Second", "label": "Vertical edge duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "VerticalEdgeDuration" }, { "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Left" }, @@ -16375,9 +16450,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Top" }, @@ -16385,9 +16457,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Progress" }, @@ -16395,9 +16464,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldX" }, @@ -16405,9 +16471,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldY" }, @@ -16415,7 +16478,6 @@ "value": "easeInOutSine", "type": "Choice", "label": "Easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -16458,8 +16520,6 @@ "value": "Top-left corner", "type": "Choice", "label": "Initial position", - "description": "", - "group": "", "extraInformation": [ "Top-left corner", "Top-right corner", @@ -16472,9 +16532,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ToogleClockwise" } @@ -16489,12 +16546,13 @@ "category": "Camera", "extensionNamespace": "", "fullName": "Smooth Camera", + "gdevelopVersion": ">=5.5.222", "helpPath": "/tutorials/follow-player-with-camera/", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjQsMTNoLTZjLTEuMSwwLTItMC45LTItMlY1YzAtMS4xLDAuOS0yLDItMmg2YzEuMSwwLDIsMC45LDIsMnY2QzI2LDEyLjEsMjUuMSwxMywyNCwxM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNiw4djEwYzAsMS4xLTAuOSwyLTIsMkg4Yy0xLjEsMC0yLTAuOS0yLTJWOGMwLTEuMSwwLjktMiwyLTJoOCIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjEiIGN5PSI4IiByPSIyIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxMSIgY3k9IjE2IiByPSIxIi8+DQo8cmVjdCB4PSI5IiB5PSI5IiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMSwyOSAyMSwyOSAxMSwyOSAxMSwyOSAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE4LDIwIDE4LDI5IDE0LDI5IDE0LDIwICIvPg0KPHJlY3QgeD0iNyIgeT0iMyIgY2xhc3M9InN0MCIgd2lkdGg9IjQiIGhlaWdodD0iMyIvPg0KPC9zdmc+DQo=", "name": "SmoothCamera", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Computers and Hardware/Computers and Hardware_camcoder_gopro_go_pro_camera.svg", "shortDescription": "Smoothly scroll to follow an object.", - "version": "0.3.3", + "version": "0.4.4", "description": [ "The camera follows an object according to:", "- a frame rate independent catch-up speed to make the scrolling from smooth to strong", @@ -16531,6 +16589,7 @@ "fullName": "Smooth Camera", "name": "SmoothCamera", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -16688,11 +16747,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", "CameraDelay" ] @@ -16727,11 +16785,12 @@ { "type": { "inverted": true, - "value": "SmoothCamera::SmoothCamera::PropertyIsCalledManually" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsCalledManually", + "True", + "" ] } ], @@ -16789,12 +16848,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIsCalledManually" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "IsCalledManually", + "True", + "" ] }, { @@ -16888,22 +16947,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnX" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnX", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldX", "=", "CameraX(Object.Layer(), 0)" ] @@ -17045,22 +17104,22 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowOnY" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FollowOnY", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyOldY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OldY", "=", "CameraY(Object.Layer(), 0)" ] @@ -17238,44 +17297,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingEnd" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", "=", "TimeFromStart() + NewWaitingDuration" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedXMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedXMax", "=", "NewWaitingSpeedXMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedYMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingSpeedYMax", "=", "NewWaitingSpeedYMax" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpDuration", "=", "NewCatchUpDuration" ] @@ -17384,11 +17439,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -17431,11 +17485,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -17481,44 +17534,40 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaLeft" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaRight" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaTop" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaBottom" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "!=", "0" ] @@ -17684,11 +17733,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnX", + "False", "" ] } @@ -17699,22 +17748,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnX", + "True", + "" ] } ] @@ -17754,11 +17805,11 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowOnY", + "False", "" ] } @@ -17769,22 +17820,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FollowOnY", + "True", + "" ] } ] @@ -17824,11 +17877,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "=", "max(0, Value)" ] @@ -17870,11 +17922,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "=", "max(0, Value)" ] @@ -17916,11 +17967,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "=", "max(0, Value)" ] @@ -17962,11 +18012,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaBottom" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "=", "max(0, Value)" ] @@ -18008,11 +18057,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeedMax", "=", "max(0, Value)" ] @@ -18033,7 +18081,7 @@ "type": "behavior" }, { - "description": "Leftward maximum speed (in ratio per second)", + "description": "Leftward maximum speed (in pixels per second)", "name": "Value", "type": "expression" } @@ -18054,11 +18102,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeedMax", "=", "max(0, Value)" ] @@ -18100,11 +18147,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeedMax", "=", "max(0, Value)" ] @@ -18146,11 +18192,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeedMax", "=", "max(0, Value)" ] @@ -18192,22 +18237,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LeftwardSpeed", "=", "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogLeftwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogLeftwardSpeed", "=", "log(1 - Value)" ] @@ -18249,22 +18292,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RightwardSpeed", "=", "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogRightwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogRightwardSpeed", "=", "log(1 - Value)" ] @@ -18306,22 +18347,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DownwardSpeed", "=", "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogDownwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogDownwardSpeed", "=", "log(1 - Value)" ] @@ -18363,22 +18402,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "UpwardSpeed", "=", "clamp(0, 1, Value)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyLogUpwardSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LogUpwardSpeed", "=", "log(1 - Value)" ] @@ -18460,11 +18497,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetX", "=", "Value" ] @@ -18595,29 +18631,16 @@ "name": "SetOffsetYOp", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Deprecated use SetOffsetYOp instead." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraOffsetY", "=", "Value" ] @@ -18649,6 +18672,18 @@ "private": true, "sentence": "Change the camera offset on Y axis of _PARAM0_: _PARAM2_", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Deprecated use SetOffsetYOp instead." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -18702,11 +18737,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", "=", "min(0, Value)" ] @@ -18748,13 +18782,12 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelay", "=", - "min(0, Value)" + "max(0, Value)" ] } ] @@ -19044,22 +19077,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.CenterX()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.CenterY()" ] @@ -19265,22 +19296,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "Object.Variable(__SmoothCamera.ObjectX[0])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "Object.Variable(__SmoothCamera.ObjectY[0])" ] @@ -19343,11 +19372,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "+", "max(0, TimeDelta() * (1 - min(WaitingSpeedXMax * abs(Object.Variable(__SmoothCamera.ObjectX[1]) - Object.Variable(__SmoothCamera.ObjectX[0])), WaitingSpeedYMax * abs(Object.Variable(__SmoothCamera.ObjectY[1]) - Object.Variable(__SmoothCamera.ObjectY[0]))) / (Object.Variable(__SmoothCamera.ObjectTime[1]) - Object.Variable(__SmoothCamera.ObjectTime[0]))))" ] @@ -19391,22 +19419,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterX", "=", "lerp(Object.Variable(__SmoothCamera.ObjectX[1]), Object.Variable(__SmoothCamera.ObjectX[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DelayedCenterY", "=", "lerp(Object.Variable(__SmoothCamera.ObjectY[1]), Object.Variable(__SmoothCamera.ObjectY[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" ] @@ -19497,11 +19523,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraDelayCatchUpSpeed", "=", "CameraExtraDelay / CameraDelayCatchUpDuration" ] @@ -19543,11 +19568,10 @@ }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyCameraExtraDelay" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", ">", "0" ] @@ -19556,11 +19580,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CameraExtraDelay", "=", "max(0, CameraExtraDelay -CameraDelayCatchUpSpeed * TimeDelta())" ] @@ -19705,11 +19728,10 @@ "conditions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyWaitingEnd" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "WaitingEnd", ">", "TimeFromStart()" ] @@ -19762,22 +19784,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -19938,22 +19958,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -19993,22 +20011,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -20033,22 +20049,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -20062,22 +20076,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "+", "Object.Variable(__SmoothCamera.ForecastHistoryX[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -20090,11 +20102,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanX", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)" ] @@ -20119,22 +20130,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -20148,22 +20157,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "+", "Object.Variable(__SmoothCamera.ForecastHistoryY[Index])" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -20176,11 +20183,10 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryMeanY", "/", "Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)" ] @@ -20234,44 +20240,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -20285,44 +20287,40 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceX", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryVarianceY", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY, 2)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryCovariance", "+", "(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX)\n*\n(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY)" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -20373,22 +20371,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "DelayedCenterX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "DelayedCenterY" ] @@ -20467,22 +20463,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanY - ForecastHistoryLinearA * ForecastHistoryMeanX" ] @@ -20569,22 +20563,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearA", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryLinearB", "=", "ForecastHistoryMeanX - ForecastHistoryLinearA * ForecastHistoryMeanY" ] @@ -20655,33 +20647,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedOldestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "ProjectedOldestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "Index" ] @@ -20694,33 +20683,30 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "ProjectedNewestX" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "ProjectedNewestY" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "Index" ] @@ -20781,22 +20767,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedX", "=", "ProjectedNewestX + ( ProjectedNewestX - ProjectedOldestX) * Object.Behavior::ForecastTimeRatio()" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastedY", "=", "ProjectedNewestY + ( ProjectedNewestY - ProjectedOldestY) * Object.Behavior::ForecastTimeRatio()" ] @@ -20876,22 +20860,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestX", "=", "(NewestX + (NewestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedNewestY", "=", "NewestY + (NewestX * ForecastHistoryLinearA - NewestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -20904,22 +20886,20 @@ "actions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestX", "=", "(OldestX + (OldestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ProjectedOldestY", "=", "OldestY + (OldestX * ForecastHistoryLinearA - OldestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] @@ -21010,54 +20990,40 @@ "value": "0.9", "type": "Number", "label": "Leftward catch-up speed (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "LeftwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Rightward catch-up speed (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "RightwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Upward catch-up speed (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "UpwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Downward catch-up speed (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "DownwardSpeed" }, { "value": "true", "type": "Boolean", "label": "Follow on X axis", - "description": "", - "group": "", - "extraInformation": [], "name": "FollowOnX" }, { "value": "true", "type": "Boolean", "label": "Follow on Y axis", - "description": "", - "group": "", - "extraInformation": [], "name": "FollowOnY" }, { @@ -21065,9 +21031,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area left border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaLeft" }, @@ -21076,9 +21040,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area right border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaRight" }, @@ -21087,9 +21049,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area top border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaTop" }, @@ -21098,9 +21058,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area bottom border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaBottom" }, @@ -21109,9 +21067,7 @@ "type": "Number", "unit": "Pixel", "label": "Camera offset X", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "CameraOffsetX" }, @@ -21120,9 +21076,7 @@ "type": "Number", "unit": "Pixel", "label": "Camera offset Y", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "CameraOffsetY" }, @@ -21131,9 +21085,7 @@ "type": "Number", "unit": "Second", "label": "Camera delay", - "description": "", "group": "Timing", - "extraInformation": [], "deprecated": true, "name": "CameraDelay" }, @@ -21142,9 +21094,7 @@ "type": "Number", "unit": "Second", "label": "Forecast time", - "description": "", "group": "Timing", - "extraInformation": [], "deprecated": true, "name": "ForecastTime" }, @@ -21153,9 +21103,7 @@ "type": "Number", "unit": "Second", "label": "Forecast history duration", - "description": "", "group": "Timing", - "extraInformation": [], "deprecated": true, "name": "ForecastHistoryDuration" }, @@ -21163,9 +21111,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogLeftwardSpeed" }, @@ -21173,9 +21118,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogRightwardSpeed" }, @@ -21183,9 +21125,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogDownwardSpeed" }, @@ -21193,9 +21132,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogUpwardSpeed" }, @@ -21203,9 +21139,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DelayedCenterX" }, @@ -21213,9 +21146,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DelayedCenterY" }, @@ -21223,9 +21153,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryMeanX" }, @@ -21233,9 +21160,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryMeanY" }, @@ -21243,9 +21167,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryVarianceX" }, @@ -21253,9 +21174,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryCovariance" }, @@ -21263,9 +21181,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryLinearA" }, @@ -21273,9 +21188,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryLinearB" }, @@ -21283,9 +21195,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastedX" }, @@ -21293,9 +21202,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastedY" }, @@ -21303,9 +21209,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedNewestX" }, @@ -21313,9 +21216,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedNewestY" }, @@ -21323,9 +21223,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedOldestX" }, @@ -21333,9 +21230,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedOldestY" }, @@ -21343,9 +21237,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryVarianceY" }, @@ -21353,9 +21244,6 @@ "value": "", "type": "Number", "label": "Index (local variable)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" }, @@ -21363,9 +21251,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CameraDelayCatchUpSpeed" }, @@ -21373,9 +21258,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CameraExtraDelay" }, @@ -21383,9 +21265,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WaitingSpeedXMax" }, @@ -21393,9 +21272,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WaitingSpeedYMax" }, @@ -21403,9 +21279,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WaitingEnd" }, @@ -21413,9 +21286,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CameraDelayCatchUpDuration" }, @@ -21424,9 +21294,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Leftward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "LeftwardSpeedMax" }, @@ -21435,9 +21303,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Rightward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "RightwardSpeedMax" }, @@ -21446,9 +21312,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Upward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "UpwardSpeedMax" }, @@ -21457,9 +21321,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Downward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "DownwardSpeedMax" }, @@ -21467,9 +21329,6 @@ "value": "", "type": "Number", "label": "OldX (local variable)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldX" }, @@ -21477,9 +21336,6 @@ "value": "", "type": "Number", "label": "OldY (local variable)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldY" }, @@ -21487,9 +21343,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsCalledManually" } @@ -21501,6 +21354,7 @@ "fullName": "Smooth platformer camera", "name": "SmoothPlatformerCamera", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -21722,8 +21576,6 @@ "value": "", "type": "Behavior", "label": "Platformer character behavior", - "description": "", - "group": "", "extraInformation": [ "PlatformBehavior::PlatformerObjectBehavior" ], @@ -21733,8 +21585,6 @@ "value": "", "type": "Behavior", "label": "Smooth camera behavior", - "description": "", - "group": "", "extraInformation": [ "SmoothCamera::SmoothCamera" ], @@ -21744,9 +21594,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "JumpOriginY" }, @@ -21755,9 +21602,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area top in the air", - "description": "", "group": "Position", - "extraInformation": [], "name": "AirFollowFreeAreaTop" }, { @@ -21765,9 +21610,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area bottom in the air", - "description": "", "group": "Position", - "extraInformation": [], "name": "AirFollowFreeAreaBottom" }, { @@ -21775,9 +21618,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area top on the floor", - "description": "", "group": "Position", - "extraInformation": [], "name": "FloorFollowFreeAreaTop" }, { @@ -21785,45 +21626,35 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area bottom on the floor", - "description": "", "group": "Position", - "extraInformation": [], "name": "FloorFollowFreeAreaBottom" }, { "value": "0.95", "type": "Number", "label": "Upward speed in the air (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "AirUpwardSpeed" }, { "value": "0.95", "type": "Number", "label": "Downward speed in the air (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "AirDownwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Upward speed on the floor (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "FloorUpwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Downward speed on the floor (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "FloorDownwardSpeed" }, { @@ -21831,9 +21662,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Upward maximum speed in the air", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "AirUpwardSpeedMax" }, { @@ -21841,9 +21670,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Downward maximum speed in the air", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "AirDownwardSpeedMax" }, { @@ -21851,9 +21678,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Upward maximum speed on the floor", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "FloorUpwardSpeedMax" }, { @@ -21861,9 +21686,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Downward maximum speed on the floor", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "FloorDownwardSpeedMax" } ], @@ -21877,6 +21700,7 @@ "category": "Game mechanic", "extensionNamespace": "", "fullName": "Checkpoints", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZsYWctdmFyaWFudCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik02LDNBMSwxIDAgMCwxIDcsNFY0Ljg4QzguMDYsNC40NCA5LjUsNCAxMSw0QzE0LDQgMTQsNiAxNiw2QzE5LDYgMjAsNCAyMCw0VjEyQzIwLDEyIDE5LDE0IDE2LDE0QzEzLDE0IDEzLDEyIDExLDEyQzgsMTIgNywxNCA3LDE0VjIxSDVWNEExLDEgMCAwLDEgNiwzWiIgLz48L3N2Zz4=", "name": "Checkpoints", @@ -22215,12 +22039,13 @@ "category": "Input", "extensionNamespace": "", "fullName": "Gamepads (controllers)", + "gdevelopVersion": ">=5.5.222", "helpPath": "/all-features/gamepad", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdhbWVwYWQtdmFyaWFudC1vdXRsaW5lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTYsOUg4VjExSDEwVjEzSDhWMTVINlYxM0g0VjExSDZWOU0xOC41LDlBMS41LDEuNSAwIDAsMSAyMCwxMC41QTEuNSwxLjUgMCAwLDEgMTguNSwxMkExLjUsMS41IDAgMCwxIDE3LDEwLjVBMS41LDEuNSAwIDAsMSAxOC41LDlNMTUuNSwxMkExLjUsMS41IDAgMCwxIDE3LDEzLjVBMS41LDEuNSAwIDAsMSAxNS41LDE1QTEuNSwxLjUgMCAwLDEgMTQsMTMuNUExLjUsMS41IDAgMCwxIDE1LjUsMTJNMTcsNUE3LDcgMCAwLDEgMjQsMTJBNyw3IDAgMCwxIDE3LDE5QzE1LjA0LDE5IDEzLjI3LDE4LjIgMTIsMTYuOUMxMC43MywxOC4yIDguOTYsMTkgNywxOUE3LDcgMCAwLDEgMCwxMkE3LDcgMCAwLDEgNyw1SDE3TTcsN0E1LDUgMCAwLDAgMiwxMkE1LDUgMCAwLDAgNywxN0M4LjY0LDE3IDEwLjA5LDE2LjIxIDExLDE1SDEzQzEzLjkxLDE2LjIxIDE1LjM2LDE3IDE3LDE3QTUsNSAwIDAsMCAyMiwxMkE1LDUgMCAwLDAgMTcsN0g3WiIgLz48L3N2Zz4=", "name": "Gamepads", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/gamepad-variant-outline.svg", "shortDescription": "Add support for gamepads (or other controllers) to your game, giving access to information such as button presses, axis positions, trigger pressure, etc...", - "version": "0.6.3", + "version": "0.8.1", "description": [ "Add support for gamepads (or other controllers).", "", @@ -22256,7 +22081,54 @@ ], "dependencies": [], "globalVariables": [], - "sceneVariables": [], + "sceneVariables": [ + { + "name": "Buttons", + "type": "structure", + "children": [ + { + "name": "A or Cross", + "type": "string", + "value": "A" + }, + { + "name": "B or Circle", + "type": "string", + "value": "B" + }, + { + "name": "LB or L1", + "type": "string", + "value": "LB" + }, + { + "name": "LT or L2", + "type": "string", + "value": "LT" + }, + { + "name": "RB or R1", + "type": "string", + "value": "RB" + }, + { + "name": "RT or R2", + "type": "string", + "value": "RT" + }, + { + "name": "X or Square", + "type": "string", + "value": "X" + }, + { + "name": "Y or Triangle", + "type": "string", + "value": "Y" + } + ] + } + ], "eventsFunctions": [ { "fullName": "", @@ -22490,10 +22362,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"TargetedSpeed\"", + "TargetedSpeed", "<", "0" ] @@ -22518,10 +22390,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", "<", "TargetedSpeed" ] @@ -22545,20 +22417,20 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", ">", "TargetedSpeed" ] }, { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", "<", "0" ] @@ -22594,10 +22466,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", ">=", "0" ] @@ -22623,10 +22495,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"TargetedSpeed\"", + "TargetedSpeed", ">", "0" ] @@ -22651,10 +22523,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", ">", "TargetedSpeed" ] @@ -22678,20 +22550,20 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", "<", "TargetedSpeed" ] }, { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", ">", "0" ] @@ -22727,10 +22599,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", "<=", "0" ] @@ -22756,10 +22628,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"TargetedSpeed\"", + "TargetedSpeed", "=", "0" ] @@ -22772,10 +22644,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", "<", "0" ] @@ -22799,10 +22671,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", ">", "0" ] @@ -24704,6 +24576,7 @@ "fullName": "Platformer gamepad mapper", "name": "PlatformerGamepadMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -24732,11 +24605,12 @@ "conditions": [ { "type": { - "value": "Gamepads::PlatformerGamepadMapper::PropertyUseArrows" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "UseArrows", + "True", + "" ] } ], @@ -24866,11 +24740,12 @@ "conditions": [ { "type": { - "value": "Gamepads::PlatformerGamepadMapper::PropertyUseLeftStick" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "UseLeftStick", + "True", + "" ] } ], @@ -25004,11 +24879,12 @@ "conditions": [ { "type": { - "value": "Gamepads::PlatformerGamepadMapper::PropertyUseRightStick" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "UseRightStick", + "True", + "" ] } ], @@ -25140,55 +25016,6 @@ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ - { - "type": { - "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"A or Cross\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"A\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PlatformerCharacter" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"B or Circle\"" - ] - }, { "type": { "value": "Gamepads::C_Button_pressed" @@ -25196,235 +25023,7 @@ "parameters": [ "", "GamepadIdentifier", - "\"B\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PlatformerCharacter" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"X or Square\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"X\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PlatformerCharacter" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Y or Triangle\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"Y\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PlatformerCharacter" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"LB or L1\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"LB\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PlatformerCharacter" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"RB or R1\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"RB\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PlatformerCharacter" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"LT or L2\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"LT\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PlatformerCharacter" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"RT or R2\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"RT\"", + "Buttons[JumpButton]", "\"Left\"" ] } @@ -25465,8 +25064,6 @@ "value": "", "type": "Behavior", "label": "Platformer character behavior", - "description": "", - "group": "", "extraInformation": [ "PlatformBehavior::PlatformerObjectBehavior" ], @@ -25476,43 +25073,33 @@ "value": "1", "type": "Number", "label": "Gamepad identifier (1, 2, 3 or 4)", - "description": "", - "group": "", - "extraInformation": [], "name": "GamepadIdentifier" }, { "value": "true", "type": "Boolean", "label": "Use directional pad", - "description": "", "group": "Controls", - "extraInformation": [], "name": "UseArrows" }, { "value": "true", "type": "Boolean", "label": "Use left stick", - "description": "", "group": "Controls", - "extraInformation": [], "name": "UseLeftStick" }, { "value": "", "type": "Boolean", "label": "Use right stick", - "description": "", "group": "Controls", - "extraInformation": [], "name": "UseRightStick" }, { "value": "A or Cross", "type": "Choice", "label": "Jump button", - "description": "", "group": "Controls", "extraInformation": [ "A or Cross", @@ -25534,6 +25121,7 @@ "fullName": "3D platformer gamepad mapper", "name": "Platformer3DGamepadMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -25602,169 +25190,6 @@ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ - { - "type": { - "value": "Gamepads::Platformer3DGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"A or Cross\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"A\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::Platformer3DGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"B or Circle\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"B\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::Platformer3DGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"X or Square\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"X\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::Platformer3DGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Y or Triangle\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"Y\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::Platformer3DGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"LB or L1\"" - ] - }, { "type": { "value": "Gamepads::C_Button_pressed" @@ -25772,121 +25197,7 @@ "parameters": [ "", "GamepadIdentifier", - "\"LB\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::Platformer3DGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"RB or R1\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"RB\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::Platformer3DGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"LT or L2\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"LT\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::Platformer3DGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"RT or R2\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"RT\"", + "Buttons[JumpButton]", "\"Left\"" ] } @@ -25927,8 +25238,6 @@ "value": "", "type": "Behavior", "label": "3D physics character", - "description": "", - "group": "", "extraInformation": [ "Physics3D::PhysicsCharacter3D" ], @@ -25938,16 +25247,12 @@ "value": "1", "type": "Number", "label": "Gamepad identifier (1, 2, 3 or 4)", - "description": "", - "group": "", - "extraInformation": [], "name": "GamepadIdentifier" }, { "value": "Left", "type": "Choice", "label": "Walk joystick", - "description": "", "group": "Controls", "extraInformation": [ "Left", @@ -25959,7 +25264,6 @@ "value": "A or Cross", "type": "Choice", "label": "Jump button", - "description": "", "group": "Controls", "extraInformation": [ "A or Cross", @@ -25981,6 +25285,7 @@ "fullName": "3D shooter gamepad mapper", "name": "Shooter3DGamepadMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -26038,55 +25343,6 @@ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ - { - "type": { - "value": "Gamepads::Shooter3DGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"A or Cross\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"A\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::Shooter3DGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"B or Circle\"" - ] - }, { "type": { "value": "Gamepads::C_Button_pressed" @@ -26094,235 +25350,7 @@ "parameters": [ "", "GamepadIdentifier", - "\"B\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::Shooter3DGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"X or Square\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"X\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::Shooter3DGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Y or Triangle\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"Y\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::Shooter3DGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"LB or L1\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"LB\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::Shooter3DGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"RB or R1\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"RB\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::Shooter3DGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"LT or L2\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"LT\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::Shooter3DGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"RT or R2\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"RT\"", + "Buttons[JumpButton]", "\"Left\"" ] } @@ -26363,8 +25391,6 @@ "value": "", "type": "Behavior", "label": "3D physics character", - "description": "", - "group": "", "extraInformation": [ "Physics3D::PhysicsCharacter3D" ], @@ -26374,16 +25400,12 @@ "value": "1", "type": "Number", "label": "Gamepad identifier (1, 2, 3 or 4)", - "description": "", - "group": "", - "extraInformation": [], "name": "GamepadIdentifier" }, { "value": "Left", "type": "Choice", "label": "Walk joystick", - "description": "", "group": "Controls", "extraInformation": [ "Left", @@ -26395,7 +25417,6 @@ "value": "Right", "type": "Choice", "label": "Camera joystick", - "description": "", "group": "Controls", "extraInformation": [ "Left", @@ -26407,7 +25428,6 @@ "value": "A or Cross", "type": "Choice", "label": "Jump button", - "description": "", "group": "Controls", "extraInformation": [ "A or Cross", @@ -26429,6 +25449,7 @@ "fullName": "First person camera gamepad mapper", "name": "FirstPersonGamepadMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -26454,11 +25475,10 @@ "actions": [ { "type": { - "value": "Gamepads::FirstPersonGamepadMapper::SetPropertyCurrentRotationSpeedZ" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentRotationSpeedZ", "=", "Gamepads::AcceleratedSpeed(CurrentRotationSpeedZ, Gamepads::StickForceX(GamepadIdentifier, CameraStick) * HorizontalRotationSpeedMax, HorizontalRotationSpeedMax, HorizontalRotationAcceleration, HorizontalRotationDeceleration)" ] @@ -26475,11 +25495,10 @@ }, { "type": { - "value": "Gamepads::FirstPersonGamepadMapper::SetPropertyCurrentRotationSpeedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentRotationSpeedY", "=", "Gamepads::AcceleratedSpeed(CurrentRotationSpeedY, Gamepads::StickForceY(GamepadIdentifier, CameraStick) * VerticalRotationSpeedMax, VerticalRotationSpeedMax, VerticalRotationAcceleration, VerticalRotationDeceleration)" ] @@ -26679,11 +25698,10 @@ "actions": [ { "type": { - "value": "Gamepads::FirstPersonGamepadMapper::SetPropertyHorizontalRotationSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HorizontalRotationSpeedMax", "=", "Value" ] @@ -26760,11 +25778,10 @@ "actions": [ { "type": { - "value": "Gamepads::FirstPersonGamepadMapper::SetPropertyHorizontalRotationAcceleration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HorizontalRotationAcceleration", "=", "Value" ] @@ -26841,11 +25858,10 @@ "actions": [ { "type": { - "value": "Gamepads::FirstPersonGamepadMapper::SetPropertyHorizontalRotationDeceleration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HorizontalRotationDeceleration", "=", "Value" ] @@ -26922,11 +25938,10 @@ "actions": [ { "type": { - "value": "Gamepads::FirstPersonGamepadMapper::SetPropertyVerticalRotationSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalRotationSpeedMax", "=", "Value" ] @@ -27003,11 +26018,10 @@ "actions": [ { "type": { - "value": "Gamepads::FirstPersonGamepadMapper::SetPropertyVerticalRotationAcceleration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalRotationAcceleration", "=", "Value" ] @@ -27084,11 +26098,10 @@ "actions": [ { "type": { - "value": "Gamepads::FirstPersonGamepadMapper::SetPropertyVerticalRotationDeceleration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalRotationDeceleration", "=", "Value" ] @@ -27165,11 +26178,10 @@ "actions": [ { "type": { - "value": "Gamepads::FirstPersonGamepadMapper::SetPropertyVerticalAngleMin" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalAngleMin", "=", "Value" ] @@ -27246,11 +26258,10 @@ "actions": [ { "type": { - "value": "Gamepads::FirstPersonGamepadMapper::SetPropertyVerticalAngleMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalAngleMax", "=", "Value" ] @@ -27327,11 +26338,10 @@ "actions": [ { "type": { - "value": "Gamepads::FirstPersonGamepadMapper::SetPropertyOffsetZ" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OffsetZ", "=", "Value" ] @@ -27360,8 +26370,6 @@ "value": "", "type": "Behavior", "label": "3D capability", - "description": "", - "group": "", "extraInformation": [ "Scene3D::Base3DBehavior" ], @@ -27371,17 +26379,12 @@ "value": "1", "type": "Number", "label": "Gamepad identifier (1, 2, 3 or 4)", - "description": "", - "group": "", - "extraInformation": [], "name": "GamepadIdentifier" }, { "value": "Right", "type": "Choice", "label": "Camera joystick", - "description": "", - "group": "", "extraInformation": [ "Left", "Right" @@ -27393,27 +26396,21 @@ "type": "Number", "unit": "AngularSpeed", "label": "Maximum rotation speed", - "description": "", "group": "Horizontal rotation", - "extraInformation": [], "name": "HorizontalRotationSpeedMax" }, { "value": "360", "type": "Number", "label": "Rotation acceleration", - "description": "", "group": "Horizontal rotation", - "extraInformation": [], "name": "HorizontalRotationAcceleration" }, { "value": "720", "type": "Number", "label": "Rotation deceleration", - "description": "", "group": "Horizontal rotation", - "extraInformation": [], "name": "HorizontalRotationDeceleration" }, { @@ -27421,27 +26418,21 @@ "type": "Number", "unit": "AngularSpeed", "label": "Maximum rotation speed", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalRotationSpeedMax" }, { "value": "240", "type": "Number", "label": "Rotation acceleration", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalRotationAcceleration" }, { "value": "480", "type": "Number", "label": "Rotation deceleration", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalRotationDeceleration" }, { @@ -27449,9 +26440,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Minimum angle", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalAngleMin" }, { @@ -27459,9 +26448,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Maximum angle", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalAngleMax" }, { @@ -27469,9 +26456,7 @@ "type": "Number", "unit": "Pixel", "label": "Z position offset", - "description": "", "group": "Position", - "extraInformation": [], "name": "OffsetZ" }, { @@ -27479,9 +26464,6 @@ "type": "Number", "unit": "AngularSpeed", "label": "Current rotation speed Z", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentRotationSpeedZ" }, @@ -27490,9 +26472,6 @@ "type": "Number", "unit": "AngularSpeed", "label": "Current rotation speed Y", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentRotationSpeedY" } @@ -27500,10 +26479,11 @@ "sharedPropertyDescriptors": [] }, { - "description": "Control a top-down character with a gamepad.", - "fullName": "Top-down gamepad mapper", - "name": "TopDownGamepadMapper", + "description": "Control a 3D physics car with a gamepad.", + "fullName": "3D car gamepad mapper", + "name": "PhysicsCar3DGamepadMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -27532,11 +26512,357 @@ "conditions": [ { "type": { - "value": "Gamepads::TopDownGamepadMapper::PropertyUseArrows" + "value": "BooleanVariable" + }, + "parameters": [ + "UseArrows", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "GamepadIdentifier", + "\"Left\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateLeftKey" + }, + "parameters": [ + "Object", + "PhysicsCar3D" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "GamepadIdentifier", + "\"Right\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateRightKey" + }, + "parameters": [ + "Object", + "PhysicsCar3D" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "UseLeftStick", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "1", + "\"Left\"", + "\"Any\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateSteeringStick" + }, + "parameters": [ + "Object", + "PhysicsCar3D", + "Gamepads::StickForceX(GamepadIdentifier, \"Left\")" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "UseRightStick", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "1", + "\"Right\"", + "\"Any\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateSteeringStick" + }, + "parameters": [ + "Object", + "PhysicsCar3D", + "Gamepads::StickForceX(GamepadIdentifier, \"Right\")" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"LT\"", + "\"Up\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"RT\"", + "\"Up\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateAcceleratorStick" }, "parameters": [ "Object", - "Behavior" + "PhysicsCar3D", + "Gamepads::TriggerPressure(GamepadIdentifier, \"RT\") - Gamepads::TriggerPressure(GamepadIdentifier, \"LT\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "GamepadIdentifier", + "Buttons[HandBrakeButton]", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateHandBrakeKey" + }, + "parameters": [ + "Object", + "PhysicsCar3D" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Gamepads::PhysicsCar3DGamepadMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics car", + "extraInformation": [ + "Physics3D::PhysicsCar3D" + ], + "name": "PhysicsCar3D" + }, + { + "value": "1", + "type": "Number", + "label": "Gamepad identifier (1, 2, 3 or 4)", + "name": "GamepadIdentifier" + }, + { + "value": "true", + "type": "Boolean", + "label": "Use directional pad", + "group": "Controls", + "name": "UseArrows" + }, + { + "value": "true", + "type": "Boolean", + "label": "Use left stick", + "group": "Controls", + "name": "UseLeftStick" + }, + { + "value": "", + "type": "Boolean", + "label": "Use right stick", + "group": "Controls", + "name": "UseRightStick" + }, + { + "value": "B or Circle", + "type": "Choice", + "label": "Hand brake button", + "group": "Controls", + "extraInformation": [ + "A or Cross", + "B or Circle", + "X or Square", + "Y or Triangle", + "LB or L1", + "RB or R1", + "LT or L2", + "RT or R2" + ], + "name": "HandBrakeButton" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Control a top-down character with a gamepad.", + "fullName": "Top-down gamepad mapper", + "name": "TopDownGamepadMapper", + "objectType": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Controller_X_is_connected" + }, + "parameters": [ + "", + "GamepadIdentifier", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "UseArrows", + "True", + "" ] } ], @@ -27657,11 +26983,12 @@ "conditions": [ { "type": { - "value": "Gamepads::TopDownGamepadMapper::PropertyUseLeftStick" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "UseLeftStick", + "True", + "" ] } ], @@ -27672,11 +26999,10 @@ "conditions": [ { "type": { - "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "StickMode", "=", "\"Analog\"" ] @@ -27701,11 +27027,10 @@ "conditions": [ { "type": { - "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "StickMode", "=", "\"360°\"" ] @@ -27730,11 +27055,10 @@ "conditions": [ { "type": { - "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "StickMode", "=", "\"8 Directions\"" ] @@ -27863,11 +27187,12 @@ "conditions": [ { "type": { - "value": "Gamepads::TopDownGamepadMapper::PropertyUseRightStick" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "UseRightStick", + "True", + "" ] } ], @@ -27878,11 +27203,10 @@ "conditions": [ { "type": { - "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "StickMode", "=", "\"Analog\"" ] @@ -27907,11 +27231,10 @@ "conditions": [ { "type": { - "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "StickMode", "=", "\"360°\"" ] @@ -27936,11 +27259,10 @@ "conditions": [ { "type": { - "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "StickMode", "=", "\"8 Directions\"" ] @@ -28088,8 +27410,6 @@ "value": "", "type": "Behavior", "label": "Top-down movement behavior", - "description": "", - "group": "", "extraInformation": [ "TopDownMovementBehavior::TopDownMovementBehavior" ], @@ -28099,43 +27419,33 @@ "value": "1", "type": "Number", "label": "Gamepad identifier (1, 2, 3 or 4)", - "description": "", - "group": "", - "extraInformation": [], "name": "GamepadIdentifier" }, { "value": "true", "type": "Boolean", "label": "Use directional pad", - "description": "", "group": "Controls", - "extraInformation": [], "name": "UseArrows" }, { "value": "true", "type": "Boolean", "label": "Use left stick", - "description": "", "group": "Controls", - "extraInformation": [], "name": "UseLeftStick" }, { "value": "", "type": "Boolean", "label": "Use right stick", - "description": "", "group": "Controls", - "extraInformation": [], "name": "UseRightStick" }, { "value": "Analog", "type": "Choice", "label": "Stick mode", - "description": "", "group": "Controls", "extraInformation": [ "Analog", @@ -28155,12 +27465,13 @@ "category": "Input", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", + "gdevelopVersion": ">=5.5.222", "helpPath": "/objects/multitouch-joystick", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMTYiIGN5PSIxNiIgcj0iMTMiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjI4LjQsMTIgMjAsMTIgMjAsMy42ICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMjAsMjguNCAyMCwyMCAyOC40LDIwICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMy42LDIwIDEyLDIwIDEyLDI4LjQgIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIxMiwzLjYgMTIsMTIgMy42LDEyICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIxNiw2IDE2LjcsNyAxNS4zLDcgIi8+DQo8cG9seWdvbiBjbGFzcz0ic3QwIiBwb2ludHM9IjE2LDI2IDE1LjMsMjUgMTYuNywyNSAiLz4NCjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iNiwxNiA3LDE1LjMgNywxNi43ICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIyNiwxNiAyNSwxNi43IDI1LDE1LjMgIi8+DQo8L3N2Zz4NCg==", "name": "SpriteMultitouchJoystick", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Videogames/Videogames_controller_joystick_arrows_direction.svg", "shortDescription": "Joysticks or buttons for touchscreens.", - "version": "1.6.1", + "version": "1.8.3", "description": [ "Multitouch joysticks can be used the same way as physical gamepads:", "- 4 or 8 directions", @@ -28258,10 +27569,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"TargetedSpeed\"", + "TargetedSpeed", "<", "0" ] @@ -28286,10 +27597,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", "<", "TargetedSpeed" ] @@ -28313,20 +27624,20 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", ">", "TargetedSpeed" ] }, { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", "<", "0" ] @@ -28362,10 +27673,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", ">=", "0" ] @@ -28391,10 +27702,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"TargetedSpeed\"", + "TargetedSpeed", ">", "0" ] @@ -28419,10 +27730,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", ">", "TargetedSpeed" ] @@ -28446,20 +27757,20 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", "<", "TargetedSpeed" ] }, { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", ">", "0" ] @@ -28495,10 +27806,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", "<=", "0" ] @@ -28524,10 +27835,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"TargetedSpeed\"", + "TargetedSpeed", "=", "0" ] @@ -28540,10 +27851,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", "<", "0" ] @@ -28567,10 +27878,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", ">", "0" ] @@ -29957,10 +29268,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsString" + "value": "StringVariable" }, "parameters": [ - "\"Side\"", + "Side", "=", "\"Left\"" ] @@ -29995,10 +29306,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsString" + "value": "StringVariable" }, "parameters": [ - "\"Side\"", + "Side", "=", "\"Right\"" ] @@ -30199,11 +29510,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIndex", "=", "0" ] @@ -30221,11 +29531,10 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -30244,11 +29553,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "StartedTouchOrMouseId(TouchIndex)" ] @@ -30261,11 +29569,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIndex", "+", "1" ] @@ -30331,11 +29638,10 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -30440,11 +29746,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickForce" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "JoystickForce", "=", "Value" ] @@ -30538,11 +29843,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickAngle" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "JoystickAngle", "=", "Value" ] @@ -30808,11 +30112,10 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -30871,11 +30174,10 @@ }, { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -30952,11 +30254,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyControllerIdentifier" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ControllerIdentifier", "=", "Value" ] @@ -31033,11 +30334,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickIdentifier" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "JoystickIdentifier", "=", "Value" ] @@ -31114,11 +30414,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyDeadZoneRadius" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DeadZoneRadius", "=", "Value" ] @@ -31166,11 +30465,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "Value" ] @@ -31204,18 +30502,12 @@ "value": "1", "type": "Number", "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Primary", "type": "String", "label": "Joystick name", - "description": "", - "group": "", - "extraInformation": [], "name": "JoystickIdentifier" }, { @@ -31223,17 +30515,12 @@ "type": "Number", "label": "Dead zone radius (range: 0 to 1)", "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", - "group": "", - "extraInformation": [], "name": "DeadZoneRadius" }, { "value": "0", "type": "Number", "label": "Joystick angle (range: -180 to 180)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "JoystickAngle" }, @@ -31241,9 +30528,6 @@ "value": "0", "type": "Number", "label": "Joystick force (range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "JoystickForce" }, @@ -31251,9 +30535,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -31261,9 +30542,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIndex" } @@ -31299,12 +30577,12 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyIsReleased" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "IsReleased", + "False", + "" ] }, { @@ -31346,11 +30624,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIndex", "=", "0" ] @@ -31384,11 +30661,10 @@ }, { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::PropertyRadius" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Radius", ">", "DistanceBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer()), TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer()))" ] @@ -31399,11 +30675,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "StartedTouchOrMouseId(TouchIndex)" ] @@ -31427,11 +30702,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIndex", "+", "1" ] @@ -31479,21 +30753,20 @@ }, { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyIsReleased" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "IsReleased", + "True", + "" ] }, { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -31528,11 +30801,12 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::PropertyIsReleased" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsReleased", + "True", + "" ] } ], @@ -31575,11 +30849,10 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -31665,27 +30938,18 @@ "value": "1", "type": "Number", "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "A", "type": "String", "label": "Button identifier", - "description": "", - "group": "", - "extraInformation": [], "name": "ButtonIdentifier" }, { "value": "0", "type": "Number", "label": "TouchID", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -31693,9 +30957,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIndex" }, @@ -31703,9 +30964,6 @@ "value": "", "type": "Boolean", "label": "Button released", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsReleased" }, @@ -31715,8 +30973,6 @@ "unit": "Pixel", "label": "Triggering circle radius", "description": "This circle adds up to the object collision mask.", - "group": "", - "extraInformation": [], "name": "Radius" } ], @@ -31727,6 +30983,7 @@ "fullName": "Platformer multitouch controller mapper", "name": "PlatformerMultitouchMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -31904,8 +31161,6 @@ "value": "", "type": "Behavior", "label": "Platform character behavior", - "description": "", - "group": "", "extraInformation": [ "PlatformBehavior::PlatformerObjectBehavior" ], @@ -31915,16 +31170,12 @@ "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Joystick name", - "description": "", "group": "Controls", "extraInformation": [ "Primary", @@ -31936,9 +31187,7 @@ "value": "A", "type": "String", "label": "Jump button name", - "description": "", "group": "Controls", - "extraInformation": [], "name": "JumpButton" } ], @@ -31949,6 +31198,7 @@ "fullName": "3D platformer multitouch controller mapper", "name": "Platformer3DMultitouchMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -32047,8 +31297,6 @@ "value": "", "type": "Behavior", "label": "3D physics character", - "description": "", - "group": "", "extraInformation": [ "Physics3D::PhysicsCharacter3D" ], @@ -32058,16 +31306,12 @@ "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Walk joystick", - "description": "", "group": "Controls", "extraInformation": [ "Primary", @@ -32079,9 +31323,7 @@ "value": "A", "type": "String", "label": "Jump button name", - "description": "", "group": "Controls", - "extraInformation": [], "name": "JumpButton" } ], @@ -32092,6 +31334,7 @@ "fullName": "3D shooter multitouch controller mapper", "name": "Shooter3DMultitouchMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -32179,8 +31422,6 @@ "value": "", "type": "Behavior", "label": "3D physics character", - "description": "", - "group": "", "extraInformation": [ "Physics3D::PhysicsCharacter3D" ], @@ -32190,16 +31431,12 @@ "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Walk joystick", - "description": "", "group": "Controls", "extraInformation": [ "Primary", @@ -32211,9 +31448,7 @@ "value": "A", "type": "String", "label": "Jump button name", - "description": "", "group": "Controls", - "extraInformation": [], "name": "JumpButton" } ], @@ -32224,6 +31459,7 @@ "fullName": "First person camera multitouch controller mapper", "name": "FirstPersonMultitouchMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -32249,11 +31485,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyCurrentRotationSpeedZ" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentRotationSpeedZ", "=", "SpriteMultitouchJoystick::AcceleratedSpeed(CurrentRotationSpeedZ, SpriteMultitouchJoystick::StickForceX(ControllerIdentifier, CameraStick) * HorizontalRotationSpeedMax, HorizontalRotationSpeedMax, HorizontalRotationAcceleration, HorizontalRotationDeceleration)" ] @@ -32270,11 +31505,10 @@ }, { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyCurrentRotationSpeedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentRotationSpeedY", "=", "SpriteMultitouchJoystick::AcceleratedSpeed(CurrentRotationSpeedY, SpriteMultitouchJoystick::StickForceY(ControllerIdentifier, CameraStick) * VerticalRotationSpeedMax, VerticalRotationSpeedMax, VerticalRotationAcceleration, VerticalRotationDeceleration)" ] @@ -32474,11 +31708,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyHorizontalRotationSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HorizontalRotationSpeedMax", "=", "Value" ] @@ -32555,11 +31788,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyHorizontalRotationAcceleration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HorizontalRotationAcceleration", "=", "Value" ] @@ -32636,11 +31868,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyHorizontalRotationDeceleration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HorizontalRotationDeceleration", "=", "Value" ] @@ -32717,11 +31948,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyVerticalRotationSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalRotationSpeedMax", "=", "Value" ] @@ -32798,11 +32028,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyVerticalRotationAcceleration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalRotationAcceleration", "=", "Value" ] @@ -32879,11 +32108,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyVerticalRotationDeceleration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalRotationDeceleration", "=", "Value" ] @@ -32960,11 +32188,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyVerticalAngleMin" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalAngleMin", "=", "Value" ] @@ -33041,11 +32268,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyVerticalAngleMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalAngleMax", "=", "Value" ] @@ -33122,11 +32348,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyOffsetZ" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OffsetZ", "=", "Value" ] @@ -33155,8 +32380,6 @@ "value": "", "type": "Behavior", "label": "3D capability", - "description": "", - "group": "", "extraInformation": [ "Scene3D::Base3DBehavior" ], @@ -33166,16 +32389,12 @@ "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Secondary", "type": "Choice", "label": "Camera joystick", - "description": "", "group": "Controls", "extraInformation": [ "Primary", @@ -33188,27 +32407,21 @@ "type": "Number", "unit": "AngularSpeed", "label": "Maximum rotation speed", - "description": "", "group": "Horizontal rotation", - "extraInformation": [], "name": "HorizontalRotationSpeedMax" }, { "value": "360", "type": "Number", "label": "Rotation acceleration", - "description": "", "group": "Horizontal rotation", - "extraInformation": [], "name": "HorizontalRotationAcceleration" }, { "value": "720", "type": "Number", "label": "Rotation deceleration", - "description": "", "group": "Horizontal rotation", - "extraInformation": [], "name": "HorizontalRotationDeceleration" }, { @@ -33216,27 +32429,21 @@ "type": "Number", "unit": "AngularSpeed", "label": "Maximum rotation speed", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalRotationSpeedMax" }, { "value": "240", "type": "Number", "label": "Rotation acceleration", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalRotationAcceleration" }, { "value": "480", "type": "Number", "label": "Rotation deceleration", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalRotationDeceleration" }, { @@ -33244,9 +32451,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Minimum angle", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalAngleMin" }, { @@ -33254,9 +32459,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Maximum angle", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalAngleMax" }, { @@ -33264,9 +32467,7 @@ "type": "Number", "unit": "Pixel", "label": "Z position offset", - "description": "", "group": "Position", - "extraInformation": [], "name": "OffsetZ" }, { @@ -33274,9 +32475,6 @@ "type": "Number", "unit": "AngularSpeed", "label": "Current rotation speed Z", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentRotationSpeedZ" }, @@ -33285,20 +32483,183 @@ "type": "Number", "unit": "AngularSpeed", "label": "Current rotation speed Y", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentRotationSpeedY" } ], "sharedPropertyDescriptors": [] }, + { + "description": "Control a 3D physics car with a multitouch controller.", + "fullName": "3D car multitouch controller mapper", + "name": "PhysicsCar3DMultitouchMapper", + "objectType": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "SteerJoystickIdentifier", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateSteeringStick" + }, + "parameters": [ + "Object", + "PhysicsCar3D", + "SpriteMultitouchJoystick::StickForceX(ControllerIdentifier, \"Primary\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "SpeedJoystickIdentifier", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateAcceleratorStick" + }, + "parameters": [ + "Object", + "PhysicsCar3D", + "-SpriteMultitouchJoystick::StickForceY(ControllerIdentifier, \"Secondary\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsButtonPressed" + }, + "parameters": [ + "", + "ControllerIdentifier", + "HandBrakeButton", + "\"Down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateHandBrakeKey" + }, + "parameters": [ + "Object", + "PhysicsCar3D" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::PhysicsCar3DMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics car", + "extraInformation": [ + "Physics3D::PhysicsCar3D" + ], + "name": "PhysicsCar3D" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Steer joystick", + "group": "Controls", + "extraInformation": [ + "Primary", + "Secondary" + ], + "name": "SteerJoystickIdentifier" + }, + { + "value": "Secondary", + "type": "Choice", + "label": "Speed joystick", + "group": "Controls", + "extraInformation": [ + "Primary", + "Secondary" + ], + "name": "SpeedJoystickIdentifier" + }, + { + "value": "B", + "type": "String", + "label": "Hand brake button name", + "group": "Controls", + "name": "HandBrakeButton" + } + ], + "sharedPropertyDescriptors": [] + }, { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", "name": "TopDownMultitouchMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -33311,11 +32672,10 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "StickMode", "=", "\"Analog\"" ] @@ -33340,11 +32700,10 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "StickMode", "=", "\"360°\"" ] @@ -33369,11 +32728,10 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "StickMode", "=", "\"8 Directions\"" ] @@ -33812,8 +33170,6 @@ "value": "", "type": "Behavior", "label": "Top-down movement behavior", - "description": "", - "group": "", "extraInformation": [ "TopDownMovementBehavior::TopDownMovementBehavior" ], @@ -33823,17 +33179,12 @@ "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Joystick name", - "description": "", - "group": "", "extraInformation": [ "Primary", "Secondary" @@ -33844,7 +33195,6 @@ "value": "Analog", "type": "Choice", "label": "Stick mode", - "description": "", "group": "Controls", "extraInformation": [ "Analog", @@ -33870,6 +33220,110 @@ "fullName": "Multitouch Joystick", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "objects": [ + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "Thumb", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "Border", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "MultitouchJoystick", + "type": "SpriteMultitouchJoystick::MultitouchJoystick", + "ControllerIdentifier": 1, + "JoystickIdentifier": "Primary", + "FloatingEnabled": false, + "DeadZoneRadius": 0.4, + "JoystickAngle": 0, + "JoystickForce": 0, + "TouchId": 0, + "TouchIndex": 0 + } + ], + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Thumb" + }, + { + "objectName": "Border" + } + ] + }, + "objectsGroups": [], + "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": [], "eventsFunctions": [ { "fullName": "", @@ -34008,10 +33462,12 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::PropertyShouldBeHiddenWhenReleased" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "ShouldBeHiddenWhenReleased", + "True", + "" ] }, { @@ -34043,6 +33499,16 @@ "no", "" ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "ShouldBeHiddenWhenReleased", + "False", + "" + ] } ] } @@ -34203,11 +33669,12 @@ }, { "type": { - "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::SetPropertyShouldBeHiddenWhenReleased" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "ShouldBeHiddenWhenReleased", + "True", + "" ] }, { @@ -34333,10 +33800,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -34358,10 +33827,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -34971,17 +34442,12 @@ "value": "1", "type": "Number", "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Joystick name", - "description": "", - "group": "", "extraInformation": [ "Primary", "Secondary" @@ -34993,8 +34459,6 @@ "type": "Number", "label": "Dead zone radius (range: 0 to 1)", "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", - "group": "", - "extraInformation": [], "name": "DeadZoneRadius" }, { @@ -35002,7 +34466,6 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Thumb" ], @@ -35014,8 +34477,6 @@ "type": "Number", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [], "hidden": true, "name": "ThumbAnchorTarget" }, @@ -35024,7 +34485,6 @@ "type": "Boolean", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Thumb" ], @@ -35036,8 +34496,6 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [], "hidden": true, "name": "ParentOrigin" }, @@ -35045,117 +34503,11 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldBeHiddenWhenReleased" } ], - "objects": [ - { - "adaptCollisionMaskAutomatically": false, - "assetStoreId": "", - "name": "Thumb", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [], - "animations": [ - { - "name": "Idle", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] - } - ] - } - ] - }, - { - "adaptCollisionMaskAutomatically": false, - "assetStoreId": "", - "name": "Border", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "MultitouchJoystick", - "type": "SpriteMultitouchJoystick::MultitouchJoystick", - "ControllerIdentifier": 1, - "JoystickIdentifier": "Primary", - "FloatingEnabled": false, - "DeadZoneRadius": 0.4, - "JoystickAngle": 0, - "JoystickForce": 0, - "TouchId": 0, - "TouchIndex": 0 - } - ], - "animations": [ - { - "name": "Idle", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] - } - ] - } - ] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Thumb" - }, - { - "objectName": "Border" - } - ] - }, - "objectsGroups": [], - "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": [] + "variants": [] } ] }, @@ -35164,12 +34516,13 @@ "category": "Visual effect", "extensionNamespace": "", "fullName": "Shake object", + "gdevelopVersion": ">=5.5.222", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFycm93LWFsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMywxMUgxOEwxNi41LDkuNUwxNy45Miw4LjA4TDIxLjg0LDEyTDE3LjkyLDE1LjkyTDE2LjUsMTQuNUwxOCwxM0gxM1YxOEwxNC41LDE2LjVMMTUuOTIsMTcuOTJMMTIsMjEuODRMOC4wOCwxNy45Mkw5LjUsMTYuNUwxMSwxOFYxM0g2TDcuNSwxNC41TDYuMDgsMTUuOTJMMi4xNiwxMkw2LjA4LDguMDhMNy41LDkuNUw2LDExSDExVjZMOS41LDcuNUw4LjA4LDYuMDhMMTIsMi4xNkwxNS45Miw2LjA4TDE0LjUsNy41TDEzLDZWMTFaIiAvPjwvc3ZnPg==", "name": "ShakeObject", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/arrow-all.svg", "shortDescription": "Shake an object.", - "version": "1.5.7", + "version": "1.6.0", "description": [ "Shake an object (position, angle or scale).", "", @@ -35357,10 +34710,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShakeForever\"" + "ShakeForever", + "True", + "" ] } ], @@ -37354,10 +36709,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShakeForever\"" + "ShakeForever", + "True", + "" ] } ], @@ -39562,8 +38919,6 @@ "value": "", "type": "Behavior", "label": "Scalable capability", - "description": "", - "group": "", "extraInformation": [ "ScalableCapability::ScalableBehavior" ], @@ -39573,9 +38928,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "name": "Property" } ], @@ -39589,6 +38941,7 @@ "category": "Audio", "extensionNamespace": "", "fullName": "Volume Falloff", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXZvbHVtZS1zb3VyY2UiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA5VjE1SDdMMTIgMjBWNEw3IDlIM00xNiAxNUgxNFY5SDE2VjE1TTIwIDE5SDE4VjVIMjBWMTlaIiAvPjwvc3ZnPg==", "name": "VolumeFalloff", @@ -39622,10 +38975,10 @@ "conditions": [ { "type": { - "value": "StrEqual" + "value": "StringVariable" }, "parameters": [ - "GetArgumentAsString(\"AudioType\")", + "AudioType", "=", "\"Sound\"" ] @@ -39638,9 +38991,9 @@ }, "parameters": [ "", - "GetArgumentAsNumber(\"Channel\")", + "Channel", "=", - "lerp(GetArgumentAsNumber(\"MinVol\"), GetArgumentAsNumber(\"MaxVol\"), max((GetArgumentAsNumber(\"MaxDistance\") - DistanceBetweenPositions(Source.X(), Source.Y(), Target.X(), Target.Y()))/GetArgumentAsNumber(\"MaxDistance\"), 0))" + "lerp(MinVol, MaxVol, max((MaxDistance - DistanceBetweenPositions(Source.X(), Source.Y(), Target.X(), Target.Y())) / MaxDistance, 0))" ] } ] @@ -39650,10 +39003,10 @@ "conditions": [ { "type": { - "value": "StrEqual" + "value": "StringVariable" }, "parameters": [ - "GetArgumentAsString(\"AudioType\")", + "AudioType", "=", "\"Music\"" ] @@ -39666,9 +39019,9 @@ }, "parameters": [ "", - "GetArgumentAsNumber(\"Channel\")", + "Channel", "=", - "lerp(GetArgumentAsNumber(\"MinVol\"), GetArgumentAsNumber(\"MaxVol\"), max((GetArgumentAsNumber(\"MaxDistance\") - DistanceBetweenPositions(Source.X(), Source.Y(), Target.X(), Target.Y()))/GetArgumentAsNumber(\"MaxDistance\"), 0))" + "lerp(MinVol, MaxVol, max((MaxDistance - DistanceBetweenPositions(Source.X(), Source.Y(), Target.X(), Target.Y())) / MaxDistance, 0))" ] } ] @@ -39726,6 +39079,7 @@ "category": "", "extensionNamespace": "", "fullName": "", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "", "name": "Enemy", @@ -40129,8 +39483,6 @@ "value": "", "type": "Behavior", "label": "Animatable capability", - "description": "", - "group": "", "extraInformation": [ "AnimatableCapability::AnimatableBehavior" ], @@ -40147,6 +39499,7 @@ "category": "", "extensionNamespace": "", "fullName": "", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "", "name": "Player", @@ -40451,6 +39804,7 @@ "category": "", "extensionNamespace": "", "fullName": "", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "", "name": "UserInterface", @@ -40519,12 +39873,13 @@ "category": "Input", "extensionNamespace": "", "fullName": "Screen Orientation Checker", + "gdevelopVersion": ">=5.5.222", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNjcmVlbi1yb3RhdGlvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik03LjUsMjEuNUM0LjI1LDE5Ljk0IDEuOTEsMTYuNzYgMS41NSwxM0gwLjA1QzAuNTYsMTkuMTYgNS43MSwyNCAxMiwyNEwxMi42NiwyMy45N0w4Ljg1LDIwLjE2TTE0LjgzLDIxLjE5TDIuODEsOS4xN0w5LjE3LDIuODFMMjEuMTksMTQuODNNMTAuMjMsMS43NUM5LjY0LDEuMTYgOC42OSwxLjE2IDguMTEsMS43NUwxLjc1LDguMTFDMS4xNiw4LjcgMS4xNiw5LjY1IDEuNzUsMTAuMjNMMTMuNzcsMjIuMjVDMTQuMzYsMjIuODQgMTUuMzEsMjIuODQgMTUuODksMjIuMjVMMjIuMjUsMTUuODlDMjIuODQsMTUuMyAyMi44NCwxNC4zNSAyMi4yNSwxMy43N0wxMC4yMywxLjc1TTE2LjUsMi41QzE5Ljc1LDQuMDcgMjIuMDksNy4yNCAyMi40NSwxMUgyMy45NUMyMy40NCw0Ljg0IDE4LjI5LDAgMTIsMEwxMS4zNCwwLjAzTDE1LjE1LDMuODRMMTYuNSwyLjVaIiAvPjwvc3ZnPg==", "name": "ScreenOrientationChecker", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/0126888931a4a4f82bb2824df9f096347ace1c47f510c44df42aa8dc9e49e24a_screen-rotation.svg", "shortDescription": "Display a customizable screen asking the user to rotate their phone/tablet if not in the right orientation.", - "version": "0.0.2", + "version": "0.1.1", "description": "Display a customizable screen asking the user to rotate their phone/tablet if not in the right orientation.", "origin": { "identifier": "ScreenOrientationChecker", @@ -40610,6 +39965,260 @@ "isInnerAreaFollowingParentSize": true, "isUsingLegacyInstancesRenderer": false, "name": "ScreenOrientationChecker", + "objects": [ + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "string": "Rotate screen to play", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "Rotate screen to play", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "name": "BackgroundPainter", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [], + "fillOpacity": 255, + "outlineSize": 0, + "outlineOpacity": 255, + "absoluteCoordinates": true, + "clearBetweenFrames": true, + "antialiasing": "none", + "fillColor": { + "r": 0, + "g": 0, + "b": 0 + }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Icon", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "topEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "rotate-screen-icon.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 52.5, + "y": 56.5 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 105, + "y": 1 + }, + { + "x": 105, + "y": 113 + }, + { + "x": 0, + "y": 113 + } + ] + ] + } + ] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Text" + }, + { + "objectName": "BackgroundPainter" + }, + { + "objectName": "Icon" + } + ] + }, + "objectsGroups": [], + "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": 35, + "keepRatio": true, + "layer": "", + "name": "Text", + "persistentUuid": "65c003ea-19c0-4f18-a189-a02a24378f35", + "width": 207, + "x": 104, + "y": 120, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "BackgroundPainter", + "persistentUuid": "49ff4576-6406-41de-a43b-1355529d61fe", + "width": 0, + "x": 38, + "y": 17, + "zOrder": 14, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Icon", + "persistentUuid": "39cbfc66-13f4-43dc-b6ef-2bda83153277", + "width": 0, + "x": 204, + "y": 64, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], "eventsFunctions": [ { "fullName": "", @@ -40674,11 +40283,12 @@ "actions": [ { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "IsShown", + "False", + "" ] } ] @@ -40700,11 +40310,12 @@ "actions": [ { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "IsShown", + "False", + "" ] } ] @@ -40744,11 +40355,12 @@ "actions": [ { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "IsShown", + "False", + "" ] } ] @@ -40770,11 +40382,12 @@ "actions": [ { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "IsShown", + "False", + "" ] } ] @@ -40806,18 +40419,22 @@ "subInstructions": [ { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsShown" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsShown", + "True", + "" ] }, { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsForceShown" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsForceShown", + "True", + "" ] } ] @@ -40863,19 +40480,23 @@ { "type": { "inverted": true, - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsShown" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsShown", + "True", + "" ] }, { "type": { "inverted": true, - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsForceShown" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsForceShown", + "True", + "" ] } ], @@ -41067,10 +40688,12 @@ "conditions": [ { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsForceShown" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsForceShown", + "True", + "" ] } ], @@ -41110,21 +40733,24 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsForceShown" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "IsForceShown", + "False", + "" ] } ] @@ -41134,21 +40760,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsForceShown" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "IsForceShown", + "False", + "" ] } ] @@ -41177,9 +40806,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsShown" }, @@ -41188,8 +40814,6 @@ "type": "Boolean", "label": "Force show the screen", "description": "Use this to test the screen in your game", - "group": "", - "extraInformation": [], "name": "IsForceShown" }, { @@ -41197,9 +40821,7 @@ "type": "Number", "unit": "Pixel", "label": "Padding", - "description": "", "group": "Appearance", - "extraInformation": [], "name": "Padding" }, { @@ -41209,273 +40831,17 @@ "label": "Corner radius", "description": "Corner radius for the background", "group": "Appearance", - "extraInformation": [], "name": "CornerRadius" }, { "value": "0;0;0", "type": "Color", "label": "Background color", - "description": "", "group": "Appearance", - "extraInformation": [], "name": "BackgroundColor" } ], - "objects": [ - { - "assetStoreId": "", - "bold": true, - "italic": false, - "name": "Text", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 0, - "topEdgeAnchor": 4, - "useLegacyBottomAndRightAnchors": false - }, - { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ], - "string": "Rotate screen to play", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": true, - "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": "Rotate screen to play", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "255;255;255" - } - }, - { - "assetStoreId": "", - "name": "BackgroundPainter", - "type": "PrimitiveDrawing::Drawer", - "variables": [], - "effects": [], - "behaviors": [], - "fillOpacity": 255, - "outlineSize": 0, - "outlineOpacity": 255, - "absoluteCoordinates": true, - "clearBetweenFrames": true, - "antialiasing": "none", - "fillColor": { - "r": 0, - "g": 0, - "b": 0 - }, - "outlineColor": { - "r": 0, - "g": 0, - "b": 0 - } - }, - { - "adaptCollisionMaskAutomatically": true, - "assetStoreId": "", - "name": "Icon", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 4, - "topEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false - }, - { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ], - "animations": [ - { - "name": "", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "rotate-screen-icon.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 52.5, - "y": 56.5 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [ - [ - { - "x": 0, - "y": 1 - }, - { - "x": 105, - "y": 1 - }, - { - "x": 105, - "y": 113 - }, - { - "x": 0, - "y": 113 - } - ] - ] - } - ] - } - ] - } - ] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Text" - }, - { - "objectName": "BackgroundPainter" - }, - { - "objectName": "Icon" - } - ] - }, - "objectsGroups": [], - "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": 35, - "keepRatio": true, - "layer": "", - "name": "Text", - "persistentUuid": "65c003ea-19c0-4f18-a189-a02a24378f35", - "width": 207, - "x": 104, - "y": 120, - "zOrder": 15, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "keepRatio": true, - "layer": "", - "name": "BackgroundPainter", - "persistentUuid": "49ff4576-6406-41de-a43b-1355529d61fe", - "width": 0, - "x": 38, - "y": 17, - "zOrder": 14, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "keepRatio": true, - "layer": "", - "name": "Icon", - "persistentUuid": "39cbfc66-13f4-43dc-b6ef-2bda83153277", - "width": 0, - "x": 204, - "y": 64, - "zOrder": 16, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - } - ] + "variants": [] } ] } diff --git a/examples/plinko/plinko.json b/examples/plinko/plinko.json index cd31f76dc..20332d4c1 100644 --- a/examples/plinko/plinko.json +++ b/examples/plinko/plinko.json @@ -1,9 +1,9 @@ { "firstLayout": "Menu", "gdVersion": { - "build": 213, + "build": 237, "major": 5, - "minor": 4, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Plinko", "description": "In this game the player drops their pachinko ball in an effort to hit as many pegs as possible to accumulate the maximum number of points. This game exhibits a scoring system, a score multiplier, the physics options, the leaderboard system, and more.", @@ -84,7 +83,9 @@ ], "authorUsernames": [], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -96,7 +97,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/LongMetalPanel.png", "kind": "image", "metadata": "", @@ -105,7 +105,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Darkening.png", "kind": "image", "metadata": "", @@ -114,7 +113,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/DoublePeg.png", "kind": "image", "metadata": "", @@ -133,7 +131,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/starGold.png", "kind": "image", "metadata": "", @@ -149,7 +146,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/StonePeg.png", "kind": "image", "metadata": "", @@ -168,7 +164,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/metalPanel.png", "kind": "image", "metadata": "", @@ -197,7 +192,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Ball.png", "kind": "image", "metadata": "", @@ -206,7 +200,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/CloudLayer.png", "kind": "image", "metadata": "", @@ -219,7 +212,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/tiled_Background2.png", "kind": "image", "metadata": "", @@ -232,7 +224,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/desktop-icon-512.png", "kind": "image", "metadata": "", @@ -241,7 +232,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/android-icon-192.png", "kind": "image", "metadata": "", @@ -250,7 +240,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/android-icon-144.png", "kind": "image", "metadata": "", @@ -259,7 +248,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/android-icon-96.png", "kind": "image", "metadata": "", @@ -268,7 +256,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/android-icon-72.png", "kind": "image", "metadata": "", @@ -277,7 +264,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/android-icon-48.png", "kind": "image", "metadata": "", @@ -286,7 +272,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/android-icon-36.png", "kind": "image", "metadata": "", @@ -295,7 +280,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/android-windowSplashScreenAnimatedIcon.png", "kind": "image", "metadata": "", @@ -304,7 +288,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-1024.png", "kind": "image", "metadata": "", @@ -313,7 +296,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-180.png", "kind": "image", "metadata": "", @@ -322,7 +304,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-167.png", "kind": "image", "metadata": "", @@ -331,7 +312,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-152.png", "kind": "image", "metadata": "", @@ -340,7 +320,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-144.png", "kind": "image", "metadata": "", @@ -349,7 +328,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-120.png", "kind": "image", "metadata": "", @@ -358,7 +336,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-114.png", "kind": "image", "metadata": "", @@ -367,7 +344,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-100.png", "kind": "image", "metadata": "", @@ -376,7 +352,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-87.png", "kind": "image", "metadata": "", @@ -385,7 +360,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-80.png", "kind": "image", "metadata": "", @@ -394,7 +368,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-76.png", "kind": "image", "metadata": "", @@ -403,7 +376,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-72.png", "kind": "image", "metadata": "", @@ -412,7 +384,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-60.png", "kind": "image", "metadata": "", @@ -421,7 +392,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-58.png", "kind": "image", "metadata": "", @@ -430,7 +400,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-57.png", "kind": "image", "metadata": "", @@ -439,7 +408,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-50.png", "kind": "image", "metadata": "", @@ -448,7 +416,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-40.png", "kind": "image", "metadata": "", @@ -457,7 +424,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-29.png", "kind": "image", "metadata": "", @@ -466,7 +432,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-20.png", "kind": "image", "metadata": "", @@ -475,7 +440,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "thumbnail.png", "kind": "image", "metadata": "", @@ -484,7 +448,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/StonePeg.png", "kind": "image", "metadata": "", @@ -493,7 +456,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/DoublePeg.png", "kind": "image", "metadata": "", @@ -502,7 +464,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/starGold.png", "kind": "image", "metadata": "", @@ -511,7 +472,14 @@ "userAdded": true }, { - "alwaysLoaded": false, + "file": "assets/thumbnail-game.png", + "kind": "image", + "metadata": "", + "name": "assets/thumbnail-game.png", + "smoothed": true, + "userAdded": true + }, + { "file": "assets/Floating Out Button Dark Blue_Hovered.png", "kind": "image", "metadata": "", @@ -519,12 +487,11 @@ "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/2f8919c3cad70134ff1732dbaef5dd9babd0aed0240dd817c1db9e27aa6b205b_Floating Out Button Dark Blue_Hovered.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/2f8919c3cad70134ff1732dbaef5dd9babd0aed0240dd817c1db9e27aa6b205b_Floating Out Button Dark Blue_Hovered.png", "name": "Floating Out Button Dark Blue_Hovered.png" } }, { - "alwaysLoaded": false, "file": "assets/Floating Out Button Dark Blue_Idle.png", "kind": "image", "metadata": "", @@ -532,12 +499,11 @@ "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/d2cedf36d5812262daf2389108558a2ee0b40ca23da05f6200e1f0eee905ca11_Floating Out Button Dark Blue_Idle.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/d2cedf36d5812262daf2389108558a2ee0b40ca23da05f6200e1f0eee905ca11_Floating Out Button Dark Blue_Idle.png", "name": "Floating Out Button Dark Blue_Idle.png" } }, { - "alwaysLoaded": false, "file": "assets/Floating Out Button Dark Blue_Pressed.png", "kind": "image", "metadata": "", @@ -545,29 +511,9 @@ "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/d246e92fe474d2825e38af207a9926794d490bc052aef447688612f61ec48861_Floating Out Button Dark Blue_Pressed.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/d246e92fe474d2825e38af207a9926794d490bc052aef447688612f61ec48861_Floating Out Button Dark Blue_Pressed.png", "name": "Floating Out Button Dark Blue_Pressed.png" } - }, - { - "file": "assets/CarterOne-Regular.ttf", - "kind": "font", - "metadata": "", - "name": "CarterOne-Regular.ttf", - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/44aceaa249d2ecb8bfe3eb7bedcb17aac44c0f5f13f9f58d85427a5afa7e92f0_CarterOne-Regular.ttf", - "name": "CarterOne-Regular.ttf" - } - }, - { - "alwaysLoaded": false, - "file": "assets/thumbnail-game.png", - "kind": "image", - "metadata": "", - "name": "assets/thumbnail-game.png", - "smoothed": true, - "userAdded": true } ], "resourceFolders": [] @@ -713,6 +659,7 @@ "text": "PLINKO", "font": "PTSans-Bold.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 90, "color": "255;255;255" } @@ -721,6 +668,7 @@ "assetStoreId": "d00645a899e762e085fa6fdf2625701baea9cc10ee903a64ca7d371e5bbb8dca", "name": "Start", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Floating Out Button Dark Blue 2", "variables": [], "effects": [], "behaviors": [], @@ -730,7 +678,8 @@ "PressedLabelOffsetY": 2, "BottomPadding": 4, "TopPadding": 0, - "HoveredFadeOutDuration": 0 + "HoveredFadeOutDuration": 0, + "LabelText": "Start" }, "childrenContent": { "Hovered": { @@ -784,6 +733,7 @@ "text": "Start", "font": "PTSans-Bold.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 40, "color": "255;255;255" } @@ -2439,6 +2389,7 @@ "text": "Score: 0", "font": "PTSans-Bold.ttf", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 40, "color": "255;255;255" } @@ -2485,6 +2436,7 @@ "text": "x25%", "font": "PTSans-Bold.ttf", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 30, "color": "255;255;255" } @@ -2531,6 +2483,7 @@ "text": "Lives: 0", "font": "PTSans-Bold.ttf", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 40, "color": "255;255;255" } @@ -2592,6 +2545,8 @@ "particleAngleRandomness2": 0, "particleBlue1": 255, "particleBlue2": 114, + "particleColor1": "255;255;255", + "particleColor2": "114;114;114", "particleGravityX": 0, "particleGravityY": 95, "particleGreen1": 255, @@ -2637,6 +2592,8 @@ "particleAngleRandomness2": 0, "particleBlue1": 255, "particleBlue2": 255, + "particleColor1": "255;255;255", + "particleColor2": "255;255;255", "particleGravityX": 0, "particleGravityY": 0, "particleGreen1": 255, @@ -2682,6 +2639,8 @@ "particleAngleRandomness2": 0, "particleBlue1": 255, "particleBlue2": 255, + "particleColor1": "255;255;255", + "particleColor2": "255;255;255", "particleGravityX": 0, "particleGravityY": 100, "particleGreen1": 255, @@ -2788,6 +2747,7 @@ "text": "GAME OVER", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 100, "color": "255;255;255" } @@ -2873,6 +2833,7 @@ "text": "Submit Score", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 50, "color": "255;255;255" } @@ -2914,6 +2875,7 @@ "text": "Restart", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 50, "color": "255;255;255" } @@ -4761,12 +4723,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", + "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.4.4", + "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.", "", @@ -4783,6 +4746,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": [], @@ -4827,11 +4796,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -4840,11 +4808,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -4878,12 +4845,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -4893,11 +4860,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -4914,12 +4882,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -4942,12 +4910,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -4957,11 +4925,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -4972,20 +4939,20 @@ }, "parameters": [ "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -5017,11 +4984,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -5043,31 +5009,30 @@ }, "parameters": [ "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -5109,11 +5074,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -5128,11 +5092,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -5161,20 +5124,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -5183,11 +5146,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -5199,20 +5161,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -5221,11 +5183,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -5238,20 +5199,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -5260,11 +5221,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -5276,20 +5236,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -5298,11 +5258,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -5330,18 +5289,17 @@ }, "parameters": [ "", - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -5353,11 +5311,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -5366,11 +5323,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -5383,11 +5339,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -5395,11 +5350,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -5408,11 +5362,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -5495,22 +5448,20 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -5545,11 +5496,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -5594,11 +5544,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -5643,11 +5592,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -5692,11 +5640,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -5718,11 +5665,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -5767,11 +5713,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -5816,11 +5761,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -5869,7 +5813,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -5900,8 +5844,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -5909,8 +5851,6 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", "extraInformation": [ "Idle", "Hovered", @@ -5925,9 +5865,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -5935,9 +5872,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -5945,9 +5879,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -5955,9 +5886,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -5967,7 +5895,7 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 64, + "areaMaxX": 256, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, @@ -5976,110 +5904,280 @@ "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", - "isUsingLegacyInstancesRenderer": true, + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", - "eventsFunctions": [ + "objects": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." - }, + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 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": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Idle", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Hovered", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Pressed", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Hovered" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Pressed" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Hovered", - "=", - "1" - ] - } - ] - }, + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Place the label over the backgrounds." + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": 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": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { @@ -6087,38 +6185,91 @@ }, "parameters": [ "", - "Label", + "Hovered", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Pressed", "0", "0", "" ] }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Hovered", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Pressed", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] + }, { "type": { "value": "ChangePlan" }, "parameters": [ - "Label", + "Hovered", "=", - "2" + "1" ] }, { "type": { - "value": "TextObject::SetWrapping" + "value": "ChangePlan" }, "parameters": [ - "Label", - "yes" + "Pressed", + "=", + "1" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Object", - "" + "Label", + "Text", + "=", + "LabelText" ] } ] @@ -6157,18 +6308,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": [ @@ -6230,12 +6410,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -6270,10 +6451,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -6282,7 +6463,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -6290,7 +6471,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -6301,10 +6482,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -6328,10 +6509,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -6348,10 +6530,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -6380,12 +6563,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -6425,10 +6609,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -6441,231 +6626,113 @@ { "type": { "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": [ - "Object", - "ButtonFSM" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Idle" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Hovered" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "Pressed", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsFocused" - }, - "parameters": [ - "Object", - "ButtonFSM" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Idle" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "Hovered", - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Pressed" - ] - } - ] - } - ], - "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())" - ] - } + }, + "parameters": [ + "Object", + "ButtonFSM" ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] } ], "actions": [ { "type": { - "value": "ModVarObjet" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Idle", - "Width", + "Object", "=", - "Object.Width()" + "PressedLabelOffsetY", + "" ] }, { "type": { - "value": "ModVarObjet" + "value": "Cache" }, "parameters": [ - "Idle", - "Height", - "=", - "Object.Height()" + "Idle" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" ] }, { "type": { - "value": "PanelSpriteButton::Scale" + "value": "Montre" + }, + "parameters": [ + "Pressed", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsFocused" }, "parameters": [ "Object", - "=", - "1" + "ButtonFSM" ] }, { "type": { - "value": "PanelSpriteObject::Width" + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Background", + "Object", "=", - "Idle.Variable(Width)" + "0", + "" ] }, { "type": { - "value": "PanelSpriteObject::Height" + "value": "Cache" }, "parameters": [ - "Background", - "=", - "Idle.Variable(Height)" + "Idle" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "Montre" }, "parameters": [ - "Object", + "Hovered", "" ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] } ] } @@ -6681,22 +6748,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -6918,6 +6970,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -6926,21 +6979,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", - "GetArgumentAsString(\"LabelText\")" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -6955,17 +7000,17 @@ }, { "description": "Text", - "name": "LabelText", + "name": "Value", "type": "string" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", "sentence": "", "events": [ { @@ -6974,18 +7019,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Label", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -6997,12 +7042,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", @@ -7010,17 +7054,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Label.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -7033,65 +7077,35 @@ "objectGroups": [] }, { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" - ] - }, + "conditions": [ { "type": { - "value": "TextObject::WrappingWidth" + "value": "BooleanVariable" }, "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" + "ShouldActivate", + "True", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "SetCenterY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } + "Idle", + "ButtonFSM", + "yes" ] } ] @@ -7101,10 +7115,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", + "ShouldActivate", + "True", "" ] } @@ -7112,12 +7128,12 @@ "actions": [ { "type": { - "value": "MettreY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" + "Idle", + "ButtonFSM", + "no" ] } ] @@ -7129,126 +7145,123 @@ "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - } - ], - "objectGroups": [ + }, { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" } - ] + ], + "objectGroups": [] }, { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BehaviorActivated" }, "parameters": [ - "\"ShouldActivate\"" + "Idle", + "ButtonFSM" ] } ], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnBoolean" }, "parameters": [ - "Idle", - "ButtonFSM", - "yes" + "True" ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"ShouldActivate\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnNumber" }, "parameters": [ - "Idle", - "ButtonFSM", - "no" + "LabelOffset" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - }, - { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" + "type": "object" } ], "objectGroups": [] }, { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "BehaviorActivated" + "value": "SetCenterY" }, "parameters": [ - "Idle", - "ButtonFSM" + "Label", + "+", + "Value - LabelOffset" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "LabelOffset", + "=", + "Value" ] } ] @@ -7267,226 +7280,315 @@ ], "propertyDescriptors": [ { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "name": "PressedLabelOffsetY" + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" }, { - "value": "0", + "value": "0.25", "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "LeftPadding" + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" }, { "value": "0", "type": "Number", - "label": "Right padding", - "description": "", - "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", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "TopPadding" + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" }, { - "value": "0", - "type": "Number", - "label": "Bottom padding", - "description": "", - "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)", - "description": "", - "group": "", - "extraInformation": [], - "name": "HoveredFadeOutDuration" + "hidden": true, + "name": "_PropertyMapping" } ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 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": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": "0;0;0" - } - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "variants": [ + { + "areaMaxX": 192, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Floating Out Button Dark Blue 2", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "PTSans-Bold.ttf", + "textAlignment": "center", + "characterSize": 40, + "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": "Button", + "font": "PTSans-Bold.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "color": "255;255;255" + } + }, { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" - } - ], - "effects": [], - "behaviors": [ + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Idle", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Idle.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true - } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Hovered", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Hovered.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, { - "name": "Tween", - "type": "Tween::TweenBehavior" + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Pressed", + "rightMargin": 6, + "texture": "Floating Out Button Dark Blue_Pressed.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Idle" - }, - { - "objectName": "Hovered" + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] }, - { - "objectName": "Pressed" - } - ] - }, - "objectsGroups": [], - "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": [ + "objectsGroups": [ { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] } ], - "effects": [] + "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": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 57, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "dfb1b714-aad7-4c68-9234-531c340769cd", + "width": 186, + "x": 3, + "y": 31, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] } - ], - "instances": [] + ] } ] }, @@ -7495,12 +7597,13 @@ "category": "Visual effect", "extensionNamespace": "", "fullName": "Shake object", - "helpPath": "https://victrisgames.itch.io/gdevelop-camera-shake-example", + "gdevelopVersion": ">=5.5.222", + "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFycm93LWFsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMywxMUgxOEwxNi41LDkuNUwxNy45Miw4LjA4TDIxLjg0LDEyTDE3LjkyLDE1LjkyTDE2LjUsMTQuNUwxOCwxM0gxM1YxOEwxNC41LDE2LjVMMTUuOTIsMTcuOTJMMTIsMjEuODRMOC4wOCwxNy45Mkw5LjUsMTYuNUwxMSwxOFYxM0g2TDcuNSwxNC41TDYuMDgsMTUuOTJMMi4xNiwxMkw2LjA4LDguMDhMNy41LDkuNUw2LDExSDExVjZMOS41LDcuNUw4LjA4LDYuMDhMMTIsMi4xNkwxNS45Miw2LjA4TDE0LjUsNy41TDEzLDZWMTFaIiAvPjwvc3ZnPg==", "name": "ShakeObject", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/arrow-all.svg", "shortDescription": "Shake an object.", - "version": "1.5.6", + "version": "1.6.0", "description": [ "Shake an object (position, angle or scale).", "", @@ -7534,7 +7637,7 @@ "eventsFunctions": [], "eventsBasedBehaviors": [ { - "description": "Shake an object, using one or more ways to shake (position, angle).\nThis behavior can be used on any type of object.", + "description": "Shake objects with translation and rotation.", "fullName": "Shake object (position, angle)", "name": "ShakeObject_PositionAngle", "objectType": "", @@ -7606,7 +7709,7 @@ "Object", "__ShakeObject_Duration", "=", - "GetArgumentAsNumber(\"Duration\")" + "Duration" ] }, { @@ -7617,7 +7720,7 @@ "Object", "__ShakeObject_PowerX", "=", - "GetArgumentAsNumber(\"PowerX\")" + "PowerX" ] }, { @@ -7628,7 +7731,7 @@ "Object", "__ShakeObject_PowerY", "=", - "GetArgumentAsNumber(\"PowerY\")" + "PowerY" ] }, { @@ -7639,7 +7742,7 @@ "Object", "__ShakeObject_PowerAngle", "=", - "GetArgumentAsNumber(\"PowerAngle\")" + "PowerAngle" ] }, { @@ -7650,7 +7753,7 @@ "Object", "__ShakeObject_TimeBetweenShakes", "=", - "GetArgumentAsNumber(\"TimeBetweenShakes\")" + "TimeBetweenShakes" ] } ] @@ -7688,10 +7791,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShakeForever\"" + "ShakeForever", + "True", + "" ] } ], @@ -9520,10 +9625,10 @@ "sharedPropertyDescriptors": [] }, { - "description": "Shake an object, using one or more ways to shake (position, angle, scale)\nThis behavior can only be used on sprite objects.", + "description": "Shake objects with translation, rotation and scale.", "fullName": "Shake object (position, angle, scale)", "name": "ShakeObject_PositionAngleScale", - "objectType": "Sprite", + "objectType": "", "eventsFunctions": [ { "description": "Shake an object, using one or more ways to shake (position, angle, scale). Make sure to \"Stop shaking\" before starting a new shake if it uses different parameters.", @@ -9592,7 +9697,7 @@ "Object", "__ShakeObject_Duration", "=", - "GetArgumentAsNumber(\"Duration\")" + "Duration" ] }, { @@ -9603,7 +9708,7 @@ "Object", "__ShakeObject_PowerX", "=", - "GetArgumentAsNumber(\"PowerX\")" + "PowerX" ] }, { @@ -9614,7 +9719,7 @@ "Object", "__ShakeObject_PowerY", "=", - "GetArgumentAsNumber(\"PowerY\")" + "PowerY" ] }, { @@ -9625,7 +9730,7 @@ "Object", "__ShakeObject_PowerAngle", "=", - "GetArgumentAsNumber(\"PowerAngle\")" + "PowerAngle" ] }, { @@ -9636,7 +9741,7 @@ "Object", "__ShakeObject_PowerScale", "=", - "GetArgumentAsNumber(\"PowerScale\")" + "PowerScale" ] }, { @@ -9647,7 +9752,7 @@ "Object", "__ShakeObject_TimeBetweenShakes", "=", - "GetArgumentAsNumber(\"TimeBetweenShakes\")" + "TimeBetweenShakes" ] } ] @@ -9685,10 +9790,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShakeForever\"" + "ShakeForever", + "True", + "" ] } ], @@ -9894,7 +10001,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -10236,10 +10342,11 @@ "actions": [ { "type": { - "value": "ChangeScale" + "value": "ScalableCapability::ScalableBehavior::SetValue" }, "parameters": [ "Object", + "Scale", "-", "Object.Variable(__ShakeObject_ScaleTravelled)" ] @@ -11144,10 +11251,11 @@ "actions": [ { "type": { - "value": "ChangeScale" + "value": "ScalableCapability::ScalableBehavior::SetValue" }, "parameters": [ "Object", + "Scale", "+", "round(1024 * Object.Variable(__ShakeObject_DisplacementScale) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" ] @@ -11425,10 +11533,11 @@ "actions": [ { "type": { - "value": "ChangeScale" + "value": "ScalableCapability::ScalableBehavior::SetValue" }, "parameters": [ "Object", + "Scale", "-", "round(1024 * Object.Variable(__ShakeObject_DisplacementScale) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" ] @@ -11685,10 +11794,11 @@ "actions": [ { "type": { - "value": "ChangeScale" + "value": "ScalableCapability::ScalableBehavior::SetValue" }, "parameters": [ "Object", + "Scale", "-", "Object.Variable(__ShakeObject_ScaleTravelled)" ] @@ -11773,7 +11883,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -11825,7 +11934,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -11875,7 +11983,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -11888,7 +11995,23 @@ "objectGroups": [] } ], - "propertyDescriptors": [], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Scalable capability", + "extraInformation": [ + "ScalableCapability::ScalableBehavior" + ], + "name": "Scale" + }, + { + "value": "", + "type": "Number", + "label": "", + "name": "Property" + } + ], "sharedPropertyDescriptors": [] } ], @@ -11899,6 +12022,7 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Rectangular Movement (deprecated)", + "gdevelopVersion": "", "helpPath": "https://victrisgames.itch.io/extension-rectangular-movement", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNoYXBlLXJlY3RhbmdsZS1wbHVzIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE5LDZIMjJWOEgxOVYxMUgxN1Y4SDE0VjZIMTdWM0gxOVY2TTE3LDE3VjE0SDE5VjE5SDNWNkgxMVY4SDVWMTdIMTdaIiAvPjwvc3ZnPg==", "name": "RectangularMovement", @@ -14596,63 +14720,42 @@ "value": "300", "type": "Number", "label": "Horizontal speed", - "description": "", - "group": "", - "extraInformation": [], "name": "HorizontalSpeed" }, { "value": "300", "type": "Number", "label": "Vertical speed", - "description": "", - "group": "", - "extraInformation": [], "name": "VerticalSpeed" }, { "value": "100", "type": "Number", "label": "Horizontal Distance: Amplitude of the movement on X axis (0 to deactivate)", - "description": "", - "group": "", - "extraInformation": [], "name": "HorizontalDistance" }, { "value": "100", "type": "Number", "label": "Vertical Distance: Amplitude of the movement on Y axis (0 to deactivate)", - "description": "", - "group": "", - "extraInformation": [], "name": "VerticalDistance" }, { "value": "0", "type": "Number", "label": "Center of movement, X position", - "description": "", - "group": "", - "extraInformation": [], "name": "CenterPointX" }, { "value": "0", "type": "Number", "label": "Center of movement, Y position", - "description": "", - "group": "", - "extraInformation": [], "name": "CenterPointY" }, { "value": "0", "type": "Number", "label": "Counter used to change X position", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProgressX" }, @@ -14660,9 +14763,6 @@ "value": "0", "type": "Number", "label": "Counter used to change Y position", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProgressY" }, @@ -14670,9 +14770,6 @@ "value": "0", "type": "Number", "label": "Counter used for rectangular movement", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RectangularCounter" }, @@ -14680,26 +14777,18 @@ "value": "", "type": "Boolean", "label": "Use a constant speed for movement", - "description": "", - "group": "", - "extraInformation": [], "name": "ConstantSpeed" }, { "value": "", "type": "Boolean", "label": "Use counter-clockwise direction", - "description": "", - "group": "", - "extraInformation": [], "name": "CounterClockwise" }, { "value": "", "type": "Choice", "label": "Current direction the object is moving", - "description": "", - "group": "", "extraInformation": [ "Left", "Right", @@ -14716,6 +14805,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/run-dino-run/run-dino-run.json b/examples/run-dino-run/run-dino-run.json index b0a39aaef..b31b00cac 100644 --- a/examples/run-dino-run/run-dino-run.json +++ b/examples/run-dino-run/run-dino-run.json @@ -1,7 +1,7 @@ { "firstLayout": "Intro", "gdVersion": { - "build": 225, + "build": 237, "major": 5, "minor": 5, "revision": 0 @@ -89,6 +89,7 @@ ], "playableDevices": [ "keyboard", + "mobile", "mobile" ], "extensionProperties": [], @@ -1191,21 +1192,6 @@ "stringProperties": [], "initialVariables": [] }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "SignArrow", - "persistentUuid": "9fe76e45-3796-4a3f-89d4-a9a1222d046e", - "width": 0, - "x": 492, - "y": 475, - "zOrder": 19, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, { "angle": 0, "customSize": true, @@ -1238,6 +1224,22 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "LittleSignArrow", + "persistentUuid": "d92c86d6-70f1-4df4-b9a9-8759cb8f7c11", + "width": 0, + "x": 492, + "y": 475, + "zOrder": 19, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ @@ -1304,7 +1306,18 @@ "updateIfNotVisible": false, "variables": [], "effects": [], - "behaviors": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 2.0247e-320 + } + ], "animations": [ { "name": "Sign", @@ -1347,8 +1360,14 @@ "effects": [], "behaviors": [ { - "name": "Tween", - "type": "Tween::TweenBehavior" + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 2.0247e-320 } ], "animations": [ @@ -1869,6 +1888,47 @@ "characterSize": 18, "color": "255;255;255" } + }, + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "LittleSignArrow", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "SignArrow", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.02500000037252903, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets/SignArrow.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] } ], "objectsFolderStructure": { @@ -1928,6 +1988,9 @@ }, { "objectName": "SignArrow" + }, + { + "objectName": "LittleSignArrow" } ] }, @@ -1987,91 +2050,72 @@ "conditions": [ { "type": { - "value": "MouseButtonFromTextReleased" + "value": "ButtonStates::ButtonFSM::IsClicked" }, "parameters": [ - "", - "\"Left\"" + "SignArrow", + "ButtonFSM", + "" ] } ], - "actions": [], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SourisSurObjet" - }, - "parameters": [ - "SignArrow", - "", - "no", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Scene" - }, - "parameters": [ - "", - "\"Game\"", - "" - ] - } + "type": { + "value": "Scene" + }, + "parameters": [ + "", + "\"Game\"", + "" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "This action will display the leaderboard on top of the game scene. The display will not disable inputs or controls ; if the player clicks on the button \"restart\" while the leaderboard it displayed, it will restart the game. Consequently, it is recommended that the scene is switched to a blank one while the leaderboard is displayed to avoid this issue." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "ButtonStates::ButtonFSM::IsClicked" + }, + "parameters": [ + "Sign", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Leaderboards::DisplayLeaderboard" }, - "comment": "This action will display the leaderboard on top of the game scene. The display will not disable inputs or controls ; if the player clicks on the button \"restart\" while the leaderboard it displayed, it will restart the game. Consequently, it is recommended that the scene is switched to a blank one while the leaderboard is displayed to avoid this issue." + "parameters": [ + "", + "\"2dfc4fba-1e2b-4e07-b3f3-3ee9839ab0dd\"", + "yes" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SourisSurObjet" - }, - "parameters": [ - "Sign", - "", - "", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Leaderboards::DisplayLeaderboard" - }, - "parameters": [ - "", - "\"2dfc4fba-1e2b-4e07-b3f3-3ee9839ab0dd\"", - "yes" - ] - }, - { - "type": { - "value": "PushScene" - }, - "parameters": [ - "", - "\"LeaderboardBackground\"" - ] - } + "type": { + "value": "PushScene" + }, + "parameters": [ + "", + "\"LeaderboardBackground\"" ] } ] @@ -2093,20 +2137,42 @@ "conditions": [ { "type": { - "value": "SourisSurObjet" + "value": "ButtonStates::ButtonFSM::IsHovered" }, "parameters": [ - "Sign", - "", - "", + "SignArrow", + "ButtonFSM", "" ] - }, + } + ], + "actions": [ { "type": { - "value": "BuiltinCommonInstructions::Once" + "value": "EffectCapability::EffectBehavior::EnableEffect" }, - "parameters": [] + "parameters": [ + "StartText", + "Effect", + "\"Hovering\"", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsHovered" + }, + "parameters": [ + "SignArrow", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -2115,10 +2181,10 @@ "value": "EffectCapability::EffectBehavior::EnableEffect" }, "parameters": [ - "ScoreText", + "StartText", "Effect", "\"Hovering\"", - "yes" + "" ] } ] @@ -2128,21 +2194,42 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SourisSurObjet" + "value": "ButtonStates::ButtonFSM::IsHovered" }, "parameters": [ "Sign", - "", - "yes", + "ButtonFSM", "" ] - }, + } + ], + "actions": [ { "type": { - "value": "BuiltinCommonInstructions::Once" + "value": "EffectCapability::EffectBehavior::EnableEffect" }, - "parameters": [] + "parameters": [ + "ScoreText", + "Effect", + "\"Hovering\"", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsHovered" + }, + "parameters": [ + "Sign", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -2198,6 +2285,10 @@ "name": "Animation", "type": "AnimatableCapability::AnimatableBehavior" }, + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM" + }, { "name": "Effect", "type": "EffectCapability::EffectBehavior" @@ -2229,10 +2320,6 @@ { "name": "Text", "type": "TextContainerCapability::TextContainerBehavior" - }, - { - "name": "Tween", - "type": "Tween::TweenBehavior" } ] }, @@ -6925,6 +7012,7 @@ "assetStoreId": "", "name": "LeaderboardDialog", "type": "LeaderboardDialog::LeaderboardDialog", + "variant": "", "variables": [], "effects": [], "behaviors": [], @@ -7229,518 +7317,550 @@ "isInnerAreaFollowingParentSize": true, "isUsingLegacyInstancesRenderer": false, "name": "LeaderboardDialog", - "eventsFunctions": [ + "objects": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ + "assetStoreId": "", + "name": "RestartButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Orange smooth button", + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetScore" - }, - "parameters": [ - "Object", - "=", - "0", - "" - ] - }, - { - "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetDefaultPlayerName" - }, - "parameters": [ - "Object", - "=", - "DefaultPlayerName", - "" - ] - }, - { - "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" - }, - "parameters": [ - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "PlayerNameInput", - "Text", - "=", - "PlayerAuthentication::Username()" - ] - }, - { - "type": { - "value": "TextInput::TextInputObject::SetDisabled" - }, - "parameters": [ - "PlayerNameInput", - "yes" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "rightEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PlayerAuthentication::HasPlayerLoggedIn" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "PlayerNameInput", - "Text", - "=", - "PlayerAuthentication::Username()" - ] - }, - { - "type": { - "value": "TextInput::TextInputObject::SetDisabled" - }, - "parameters": [ - "PlayerNameInput", - "yes" - ] - }, - { - "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" - }, - "parameters": [ - "" - ] - } - ] + "content": { + "HoveredFadeOutDuration": 0, + "LabelText": "RETRY" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 11, + "height": 47, + "leftMargin": 20, + "rightMargin": 20, + "texture": "assets\\Buttons\\RestartButton.png", + "tiled": false, + "topMargin": 11, + "width": 128 }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Leaderboards::IsLeaderboardViewErrored" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" - }, - "parameters": [ - "" - ] - } - ] + "Idle": { + "bottomMargin": 11, + "height": 47, + "leftMargin": 20, + "rightMargin": 20, + "texture": "assets\\Buttons\\RestartButton.png", + "tiled": false, + "topMargin": 11, + "width": 128 }, - { - "type": "BuiltinCommonInstructions::Comment", + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "RETRY", + "font": "Nathaniel-19.otf", + "textAlignment": "center", + "characterSize": 30, "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "b": 255, + "g": 255, + "r": 255 }, - "comment": "Handle leaderboards.\nTo create a leaderboard, make sure your game is registered in Home > Profile > Games Dashboard and then, click on \"Manage game\" > Leaderboards. When a leaderboard is created, it should be available in the actions." + "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": "RETRY", + "font": "Nathaniel-19.otf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } }, + "Pressed": { + "bottomMargin": 11, + "height": 47, + "leftMargin": 20, + "rightMargin": 20, + "texture": "assets\\Buttons\\RestartButton.png", + "tiled": false, + "topMargin": 11, + "width": 128 + } + } + }, + { + "assetStoreId": "", + "name": "ScoresButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green smooth button", + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" - }, - "parameters": [ - "SubmitButton", - "" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Leaderboards::SaveConnectedPlayerScore" - }, - "parameters": [ - "", - "LeaderboardId", - "Score" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Leaderboards::SavePlayerScore" - }, - "parameters": [ - "", - "LeaderboardId", - "Score", - "PlayerNameInput.Text()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PlayerAuthentication::HideAuthenticationBanner" - }, - "parameters": [ - "" - ] - }, - { - "type": { - "value": "Leaderboards::DisplayLeaderboard" - }, - "parameters": [ - "", - "LeaderboardId", - "yes" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" - }, - "parameters": [ - "ScoresButton", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "PlayerAuthentication::HideAuthenticationBanner" - }, - "parameters": [ - "" - ] - }, - { - "type": { - "value": "Leaderboards::DisplayLeaderboard" - }, - "parameters": [ - "", - "\"2dfc4fba-1e2b-4e07-b3f3-3ee9839ab0dd\"", - "yes" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Leaderboards::HasPlayerJustClosedLeaderboardView" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" - }, - "parameters": [ - "" - ] - } - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "rightEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" + "content": { + "HoveredFadeOutDuration": 0, + "LabelText": "SCORES" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 11, + "height": 47, + "leftMargin": 20, + "rightMargin": 17, + "texture": "assets\\Buttons\\SubmitButton.png", + "tiled": false, + "topMargin": 11, + "width": 128 + }, + "Idle": { + "bottomMargin": 11, + "height": 47, + "leftMargin": 20, + "rightMargin": 17, + "texture": "assets\\Buttons\\SubmitButton.png", + "tiled": false, + "topMargin": 11, + "width": 128 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "SCORES", + "font": "Nathaniel-19.otf", + "textAlignment": "center", + "characterSize": 30, + "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": "SCORES", + "font": "Nathaniel-19.otf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + }, + "Pressed": { + "bottomMargin": 11, + "height": 47, + "leftMargin": 20, + "rightMargin": 17, + "texture": "assets\\Buttons\\SubmitButton.png", + "tiled": false, + "topMargin": 11, + "width": 128 } - ], - "objectGroups": [] + } }, { - "description": "the score.", - "fullName": "Score", - "functionType": "ExpressionAndCondition", - "name": "Score", - "sentence": "the score", - "events": [ + "assetStoreId": "", + "name": "SubmitButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green smooth button", + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Score" - ] - } - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "rightEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } ], - "expressionType": { - "type": "expression" + "content": { + "HoveredFadeOutDuration": 0, + "LabelText": "SUBMIT" }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "Score", - "name": "SetScore", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyScore" - }, - "parameters": [ - "Object", - "=", - "Value" - ] - }, - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "ScoreLabel", - "Text", - "=", - "\"Score: \" + Score" - ] - } - ] + "childrenContent": { + "Hovered": { + "bottomMargin": 11, + "height": 47, + "leftMargin": 20, + "rightMargin": 20, + "texture": "assets\\Buttons\\SubmitButton.png", + "tiled": false, + "topMargin": 11, + "width": 128 + }, + "Idle": { + "bottomMargin": 11, + "height": 47, + "leftMargin": 20, + "rightMargin": 20, + "texture": "assets\\Buttons\\SubmitButton.png", + "tiled": false, + "topMargin": 11, + "width": 128 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "SUBMIT", + "font": "Nathaniel-19.otf", + "textAlignment": "center", + "characterSize": 30, + "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": "SUBMIT", + "font": "Nathaniel-19.otf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + }, + "Pressed": { + "bottomMargin": 11, + "height": 47, + "leftMargin": 20, + "rightMargin": 20, + "texture": "assets\\Buttons\\SubmitButton.png", + "tiled": false, + "topMargin": 11, + "width": 128 } - ], - "parameters": [ + } + }, + { + "assetStoreId": "", + "name": "PlayerNameInput", + "type": "TextInput::TextInputObject", + "variables": [], + "effects": [], + "behaviors": [ { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } ], - "objectGroups": [] + "content": { + "initialValue": "", + "placeholder": "PlayerName", + "fontResourceName": "Nathaniel-19.otf", + "fontSize": 30, + "inputType": "text", + "textColor": "0;0;0", + "fillColor": "245;166;35", + "fillOpacity": 255, + "borderColor": "245;166;35", + "borderOpacity": 255, + "borderWidth": 1, + "readOnly": false, + "disabled": false + } }, { - "description": "the default player name.", - "fullName": "Default player name", - "functionType": "ExpressionAndCondition", - "name": "DefaultPlayerName", - "sentence": "the default player name", - "events": [ + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "ScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "DefaultPlayerName" - ] - } - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } ], - "expressionType": { - "type": "string" + "string": "Score", + "font": "Nathaniel-19.otf", + "textAlignment": "", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] + "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": "Score", + "font": "Nathaniel-19.otf", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "color": "255;255;255" + } }, { - "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "DefaultPlayerName", - "name": "SetDefaultPlayerName", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyDefaultPlayerName" - }, - "parameters": [ - "Object", - "=", - "Value" - ] - } - ] - }, + "assetStoreId": "", + "bottomMargin": 64, + "height": 192, + "leftMargin": 64, + "name": "ScorePannel", + "rightMargin": 64, + "texture": "9patch_Desert Tile_all_64.png", + "tiled": true, + "topMargin": 64, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - }, - { - "type": { - "value": "LeaderboardDialog::LeaderboardDialog::PropertyDefaultPlayerName" - }, - "parameters": [ - "Object", - "!=", - "\"0\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "PlayerNameInput", - "Text", - "=", - "DefaultPlayerName" - ] - } - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false } - ], - "parameters": [ + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "ScorePannel" + }, + { + "objectName": "ScoreLabel" + }, + { + "objectName": "PlayerNameInput" + }, + { + "objectName": "SubmitButton" + }, + { + "objectName": "ScoresButton" + }, + { + "objectName": "RestartButton" + } + ] + }, + "objectsGroups": [], + "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": [ { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 } ], - "objectGroups": [] + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "height": 320, + "layer": "", + "name": "ScorePannel", + "persistentUuid": "77a734d2-d847-4343-972a-471f5e3223d3", + "width": 512, + "x": 0, + "y": 0, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] }, { - "description": "the player name.", - "fullName": "Player name", - "functionType": "ExpressionAndCondition", - "name": "PlayerName", - "sentence": "the player name", + "angle": 0, + "customSize": true, + "height": 35, + "layer": "", + "name": "ScoreLabel", + "persistentUuid": "da22ceb1-621f-4f75-9541-63e68d15f504", + "width": 384, + "x": 64, + "y": 64, + "zOrder": 18, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 41, + "layer": "", + "name": "PlayerNameInput", + "persistentUuid": "cce376dc-ab6a-4fd2-8e31-ad28038cd451", + "width": 320, + "x": 96, + "y": 117, + "zOrder": 19, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "SubmitButton", + "persistentUuid": "7627ff07-0177-47fb-8d4b-1ffce936bf3f", + "width": 0, + "x": 96, + "y": 192, + "zOrder": 26, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "ScoresButton", + "persistentUuid": "52cde598-c0f5-42e7-be21-28bdfc023938", + "width": 0, + "x": 288, + "y": 192, + "zOrder": 27, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RestartButton", + "persistentUuid": "5f42f66e-950b-42ba-b689-68761eeb6816", + "width": 0, + "x": 192, + "y": 256, + "zOrder": 28, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -7748,63 +7868,65 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "LeaderboardDialog::LeaderboardDialog::SetScore" }, "parameters": [ - "PlayerNameInput.Text::Value()" + "Object", + "=", + "0", + "" + ] + }, + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::SetDefaultPlayerName" + }, + "parameters": [ + "Object", + "=", + "DefaultPlayerName", + "" + ] + }, + { + "type": { + "value": "PlayerAuthentication::DisplayAuthenticationBanner" + }, + "parameters": [ + "" ] } ] - } - ], - "expressionType": { - "type": "string" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the restart button of the dialog is clicked.", - "fullName": "Restart button clicked", - "functionType": "Condition", - "name": "IsRestartClicked", - "sentence": "Restart button of _PARAM0_ is clicked", - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + "value": "PlayerAuthentication::IsPlayerAuthenticated" }, - "parameters": [ - "RestartButton", - "" - ] + "parameters": [] } ], "actions": [ { "type": { - "value": "PlayerAuthentication::HideAuthenticationBanner" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "" + "PlayerNameInput", + "Text", + "=", + "PlayerAuthentication::Username()" ] }, { "type": { - "value": "SetReturnBoolean" + "value": "TextInput::TextInputObject::SetDisabled" }, "parameters": [ - "True" + "PlayerNameInput", + "yes" ] } ] @@ -7821,12 +7943,73 @@ "objectGroups": [] }, { - "description": "Check if the score has been sucessfully submitted by the dialog.", - "fullName": "Score is submitted", - "functionType": "Condition", - "name": "IsScoreSubmitted", - "sentence": "_PARAM0_ submitted a score", + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::HasPlayerLoggedIn" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "PlayerNameInput", + "Text", + "=", + "PlayerAuthentication::Username()" + ] + }, + { + "type": { + "value": "TextInput::TextInputObject::SetDisabled" + }, + "parameters": [ + "PlayerNameInput", + "yes" + ] + }, + { + "type": { + "value": "PlayerAuthentication::DisplayAuthenticationBanner" + }, + "parameters": [ + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Leaderboards::IsLeaderboardViewErrored" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::DisplayAuthenticationBanner" + }, + "parameters": [ + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -7837,33 +8020,148 @@ "textG": 0, "textR": 0 }, - "comment": "Allow to try and submit again in case of error." + "comment": "Handle leaderboards.\nTo create a leaderboard, make sure your game is registered in Home > Profile > Games Dashboard and then, click on \"Manage game\" > Leaderboards. When a leaderboard is created, it should be available in the actions." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "Leaderboards::HasPlayerJustClosedLeaderboardView" + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, - "parameters": [] + "parameters": [ + "SubmitButton", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Leaderboards::SaveConnectedPlayerScore" + }, + "parameters": [ + "", + "LeaderboardId", + "Score" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Leaderboards::SavePlayerScore" + }, + "parameters": [ + "", + "LeaderboardId", + "Score", + "PlayerNameInput.Text()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" + }, + "parameters": [ + "" + ] + }, + { + "type": { + "value": "Leaderboards::DisplayLeaderboard" + }, + "parameters": [ + "", + "LeaderboardId", + "yes" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "ScoresButton", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" + }, + "parameters": [ + "" + ] }, { "type": { - "value": "Leaderboards::HasLastSaveSucceeded" + "value": "Leaderboards::DisplayLeaderboard" }, "parameters": [ - "LeaderboardId" + "", + "\"2dfc4fba-1e2b-4e07-b3f3-3ee9839ab0dd\"", + "yes" ] } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Leaderboards::HasPlayerJustClosedLeaderboardView" + }, + "parameters": [] + } ], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "PlayerAuthentication::DisplayAuthenticationBanner" }, "parameters": [ - "True" + "" ] } ] @@ -7880,11 +8178,11 @@ "objectGroups": [] }, { - "description": "the leaderboard of the object.", - "fullName": "Leaderboard", + "description": "the score.", + "fullName": "Score", "functionType": "ExpressionAndCondition", - "name": "LeaderboardId", - "sentence": "the leaderboard", + "name": "Score", + "sentence": "the score", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -7892,17 +8190,17 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "SetReturnNumber" }, "parameters": [ - "LeaderboardId" + "Score" ] } ] } ], "expressionType": { - "type": "leaderboardId" + "type": "expression" }, "parameters": [ { @@ -7917,8 +8215,8 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "LeaderboardId", - "name": "SetLeaderboardId", + "getterName": "Score", + "name": "SetScore", "sentence": "", "events": [ { @@ -7927,13 +8225,24 @@ "actions": [ { "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyLeaderboardId" + "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyScore" }, "parameters": [ "Object", "=", "Value" ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "ScoreLabel", + "Text", + "=", + "\"Score: \" + Score" + ] } ] } @@ -7947,615 +8256,261 @@ } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "String", - "label": "Default player name", - "description": "", - "group": "", - "extraInformation": [], - "name": "DefaultPlayerName" - }, - { - "value": "", - "type": "LeaderboardId", - "label": "Leaderboard", - "description": "", - "group": "", - "extraInformation": [], - "name": "LeaderboardId" }, { - "value": "0", - "type": "Number", - "unit": "Dimensionless", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "Score" - } - ], - "objects": [ - { - "assetStoreId": "", - "name": "RestartButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [ + "description": "the default player name.", + "fullName": "Default player name", + "functionType": "ExpressionAndCondition", + "name": "DefaultPlayerName", + "sentence": "the default player name", + "events": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 4, - "rightEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "DefaultPlayerName" + ] + } + ] } ], - "content": { - "HoveredFadeOutDuration": 0 + "expressionType": { + "type": "string" }, - "childrenContent": { - "Hovered": { - "bottomMargin": 11, - "height": 47, - "leftMargin": 20, - "rightMargin": 20, - "texture": "assets\\Buttons\\RestartButton.png", - "tiled": false, - "topMargin": 11, - "width": 128 - }, - "Idle": { - "bottomMargin": 11, - "height": 47, - "leftMargin": 20, - "rightMargin": 20, - "texture": "assets\\Buttons\\RestartButton.png", - "tiled": false, - "topMargin": 11, - "width": 128 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "RETRY", - "font": "Nathaniel-19.otf", - "textAlignment": "center", - "characterSize": 30, - "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": "RETRY", - "font": "Nathaniel-19.otf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 11, - "height": 47, - "leftMargin": 20, - "rightMargin": 20, - "texture": "assets\\Buttons\\RestartButton.png", - "tiled": false, - "topMargin": 11, - "width": 128 + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" } - } + ], + "objectGroups": [] }, { - "assetStoreId": "", - "name": "ScoresButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [ + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "DefaultPlayerName", + "name": "SetDefaultPlayerName", + "sentence": "", + "events": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 4, - "rightEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyDefaultPlayerName" + }, + "parameters": [ + "Object", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + }, + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::PropertyDefaultPlayerName" + }, + "parameters": [ + "Object", + "!=", + "\"0\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "PlayerNameInput", + "Text", + "=", + "DefaultPlayerName" + ] + } + ] } ], - "content": { - "HoveredFadeOutDuration": 0 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 11, - "height": 47, - "leftMargin": 20, - "rightMargin": 17, - "texture": "assets\\Buttons\\SubmitButton.png", - "tiled": false, - "topMargin": 11, - "width": 128 - }, - "Idle": { - "bottomMargin": 11, - "height": 47, - "leftMargin": 20, - "rightMargin": 17, - "texture": "assets\\Buttons\\SubmitButton.png", - "tiled": false, - "topMargin": 11, - "width": 128 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "SCORES", - "font": "Nathaniel-19.otf", - "textAlignment": "center", - "characterSize": 30, - "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": "SCORES", - "font": "Nathaniel-19.otf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 11, - "height": 47, - "leftMargin": 20, - "rightMargin": 17, - "texture": "assets\\Buttons\\SubmitButton.png", - "tiled": false, - "topMargin": 11, - "width": 128 + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" } - } + ], + "objectGroups": [] }, { - "assetStoreId": "", - "name": "SubmitButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [ + "description": "the player name.", + "fullName": "Player name", + "functionType": "ExpressionAndCondition", + "name": "PlayerName", + "sentence": "the player name", + "events": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 4, - "rightEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "PlayerNameInput.Text::Value()" + ] + } + ] } ], - "content": { - "HoveredFadeOutDuration": 0 + "expressionType": { + "type": "string" }, - "childrenContent": { - "Hovered": { - "bottomMargin": 11, - "height": 47, - "leftMargin": 20, - "rightMargin": 20, - "texture": "assets\\Buttons\\SubmitButton.png", - "tiled": false, - "topMargin": 11, - "width": 128 - }, - "Idle": { - "bottomMargin": 11, - "height": 47, - "leftMargin": 20, - "rightMargin": 20, - "texture": "assets\\Buttons\\SubmitButton.png", - "tiled": false, - "topMargin": 11, - "width": 128 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "SUBMIT", - "font": "Nathaniel-19.otf", - "textAlignment": "center", - "characterSize": 30, - "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": "SUBMIT", - "font": "Nathaniel-19.otf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 11, - "height": 47, - "leftMargin": 20, - "rightMargin": 20, - "texture": "assets\\Buttons\\SubmitButton.png", - "tiled": false, - "topMargin": 11, - "width": 128 + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" } - } + ], + "objectGroups": [] }, { - "assetStoreId": "", - "name": "PlayerNameInput", - "type": "TextInput::TextInputObject", - "variables": [], - "effects": [], - "behaviors": [ + "description": "Check if the restart button of the dialog is clicked.", + "fullName": "Restart button clicked", + "functionType": "Condition", + "name": "IsRestartClicked", + "sentence": "Restart button of _PARAM0_ is clicked", + "events": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "RestartButton", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" + }, + "parameters": [ + "" + ] + }, + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] } ], - "content": { - "initialValue": "", - "placeholder": "PlayerName", - "fontResourceName": "Nathaniel-19.otf", - "fontSize": 30, - "inputType": "text", - "textColor": "0;0;0", - "fillColor": "245;166;35", - "fillOpacity": 255, - "borderColor": "245;166;35", - "borderOpacity": 255, - "borderWidth": 1, - "readOnly": false, - "disabled": false - } - }, - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "ScoreLabel", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [ + "parameters": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" } ], - "string": "Score", - "font": "Nathaniel-19.otf", - "textAlignment": "", - "characterSize": 40, - "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": "Score", - "font": "Nathaniel-19.otf", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 40, - "color": "255;255;255" - } + "objectGroups": [] }, { - "assetStoreId": "", - "bottomMargin": 64, - "height": 192, - "leftMargin": 64, - "name": "ScorePannel", - "rightMargin": 64, - "texture": "9patch_Desert Tile_all_64.png", - "tiled": true, - "topMargin": 64, - "type": "PanelSpriteObject::PanelSprite", - "width": 192, - "variables": [], - "effects": [], - "behaviors": [ + "description": "Check if the score has been sucessfully submitted by the dialog.", + "fullName": "Score is submitted", + "functionType": "Condition", + "name": "IsScoreSubmitted", + "sentence": "_PARAM0_ submitted a score", + "events": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 1, - "useLegacyBottomAndRightAnchors": false - } - ] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "ScorePannel" - }, - { - "objectName": "ScoreLabel" - }, - { - "objectName": "PlayerNameInput" - }, - { - "objectName": "SubmitButton" - }, - { - "objectName": "ScoresButton" - }, - { - "objectName": "RestartButton" - } - ] - }, - "objectsGroups": [], - "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": [ + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Allow to try and submit again in case of error." + }, { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Leaderboards::HasPlayerJustClosedLeaderboardView" + }, + "parameters": [] + }, + { + "type": { + "value": "Leaderboards::HasLastSaveSucceeded" + }, + "parameters": [ + "LeaderboardId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] } ], - "effects": [] - } - ], - "instances": [ - { - "angle": 0, - "customSize": true, - "height": 320, - "layer": "", - "name": "ScorePannel", - "persistentUuid": "77a734d2-d847-4343-972a-471f5e3223d3", - "width": 512, - "x": 0, - "y": 0, - "zOrder": 16, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "height": 35, - "layer": "", - "name": "ScoreLabel", - "persistentUuid": "da22ceb1-621f-4f75-9541-63e68d15f504", - "width": 384, - "x": 64, - "y": 64, - "zOrder": 18, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "height": 41, - "layer": "", - "name": "PlayerNameInput", - "persistentUuid": "cce376dc-ab6a-4fd2-8e31-ad28038cd451", - "width": 320, - "x": 96, - "y": 117, - "zOrder": 19, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "SubmitButton", - "persistentUuid": "7627ff07-0177-47fb-8d4b-1ffce936bf3f", - "width": 0, - "x": 96, - "y": 192, - "zOrder": 26, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "ScoresButton", - "persistentUuid": "52cde598-c0f5-42e7-be21-28bdfc023938", - "width": 0, - "x": 288, - "y": 192, - "zOrder": 27, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] }, { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "RestartButton", - "persistentUuid": "5f42f66e-950b-42ba-b689-68761eeb6816", - "width": 0, - "x": 192, - "y": 256, - "zOrder": 28, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - } - ] - } - ] - }, - { - "author": "@4ian", - "category": "Movement", - "extensionNamespace": "", - "fullName": "Linear Movement", - "gdevelopVersion": "", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXJheS1zdGFydC1hcnJvdyIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0yMywxMkwxOSwxNlYxM0g2LjgzQzYuNDIsMTQuMTcgNS4zMSwxNSA0LDE1QTMsMyAwIDAsMSAxLDEyQTMsMyAwIDAsMSA0LDlDNS4zMSw5IDYuNDIsOS44MyA2LjgzLDExSDE5VjhMMjMsMTJaIiAvPjwvc3ZnPg==", - "name": "LinearMovement", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/ray-start-arrow.svg", - "shortDescription": "Move the object linearly, according to the speed configured on X and Y axis. Useful for simple enemies, bullets or objects following a straight line on the screen.", - "version": "0.0.2", - "description": "Move the object linearly, according to the speed configured on X and Y axis. Useful for simple enemies, bullets or objects following a straight line on the screen.", - "origin": { - "identifier": "LinearMovement", - "name": "gdevelop-extension-store" - }, - "tags": [ - "line", - "movement", - "linear" - ], - "authorIds": [ - "wWP8BSlAW0UP4NeaHa2LcmmDzmH2" - ], - "dependencies": [], - "globalVariables": [], - "sceneVariables": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [ - { - "description": "Move the object linearly, according to the speed configured on X and Y axis. Useful for simple enemies, bullets or objects following a straight line on the screen.", - "fullName": "Linear movement", - "name": "LinearMovement", - "objectType": "", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", + "description": "the leaderboard of the object.", + "fullName": "Leaderboard", + "functionType": "ExpressionAndCondition", + "name": "LeaderboardId", + "sentence": "the leaderboard", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -8563,33 +8518,164 @@ "actions": [ { "type": { - "value": "AddForceXY" + "value": "SetReturnString" }, "parameters": [ - "Object", - "Object.Behavior::PropertySpeedX()", - "Object.Behavior::PropertySpeedY()", - "" + "LeaderboardId" ] } ] } ], + "expressionType": { + "type": "leaderboardId" + }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "LinearMovement::LinearMovement", - "type": "behavior" } ], "objectGroups": [] - } + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LeaderboardId", + "name": "SetLeaderboardId", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyLeaderboardId" + }, + "parameters": [ + "Object", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "String", + "label": "Default player name", + "name": "DefaultPlayerName" + }, + { + "value": "", + "type": "LeaderboardId", + "label": "Leaderboard", + "name": "LeaderboardId" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "", + "hidden": true, + "name": "Score" + } + ], + "variants": [] + } + ] + }, + { + "author": "@4ian", + "category": "Movement", + "extensionNamespace": "", + "fullName": "Linear Movement", + "gdevelopVersion": "", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXJheS1zdGFydC1hcnJvdyIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0yMywxMkwxOSwxNlYxM0g2LjgzQzYuNDIsMTQuMTcgNS4zMSwxNSA0LDE1QTMsMyAwIDAsMSAxLDEyQTMsMyAwIDAsMSA0LDlDNS4zMSw5IDYuNDIsOS44MyA2LjgzLDExSDE5VjhMMjMsMTJaIiAvPjwvc3ZnPg==", + "name": "LinearMovement", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/ray-start-arrow.svg", + "shortDescription": "Move the object linearly, according to the speed configured on X and Y axis. Useful for simple enemies, bullets or objects following a straight line on the screen.", + "version": "0.0.2", + "description": "Move the object linearly, according to the speed configured on X and Y axis. Useful for simple enemies, bullets or objects following a straight line on the screen.", + "origin": { + "identifier": "LinearMovement", + "name": "gdevelop-extension-store" + }, + "tags": [ + "line", + "movement", + "linear" + ], + "authorIds": [ + "wWP8BSlAW0UP4NeaHa2LcmmDzmH2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Move the object linearly, according to the speed configured on X and Y axis. Useful for simple enemies, bullets or objects following a straight line on the screen.", + "fullName": "Linear movement", + "name": "LinearMovement", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AddForceXY" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertySpeedX()", + "Object.Behavior::PropertySpeedY()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "LinearMovement::LinearMovement", + "type": "behavior" + } + ], + "objectGroups": [] + } ], "propertyDescriptors": [ { @@ -8597,9 +8683,6 @@ "type": "Number", "unit": "PixelSpeed", "label": "Speed on X axis", - "description": "", - "group": "", - "extraInformation": [], "name": "SpeedX" }, { @@ -8607,9 +8690,6 @@ "type": "Number", "unit": "PixelSpeed", "label": "Speed on Y axis", - "description": "", - "group": "", - "extraInformation": [], "name": "SpeedY" } ], @@ -9675,18 +9755,12 @@ "value": "true", "type": "Boolean", "label": "Horizontal wrapping", - "description": "", - "group": "", - "extraInformation": [], "name": "HorizontalWrapping" }, { "value": "true", "type": "Boolean", "label": "Vertical wrapping", - "description": "", - "group": "", - "extraInformation": [], "name": "VerticalWrapping" }, { @@ -9694,9 +9768,6 @@ "type": "Number", "unit": "Pixel", "label": "Top border of wrapped area (Y)", - "description": "", - "group": "", - "extraInformation": [], "name": "BorderTop" }, { @@ -9704,9 +9775,6 @@ "type": "Number", "unit": "Pixel", "label": "Left border of wrapped area (X)", - "description": "", - "group": "", - "extraInformation": [], "name": "BorderLeft" }, { @@ -9715,8 +9783,6 @@ "unit": "Pixel", "label": "Right border of wrapped area (X)", "description": "If blank, the value will be the scene width.", - "group": "", - "extraInformation": [], "name": "BorderRight" }, { @@ -9725,8 +9791,6 @@ "unit": "Pixel", "label": "Bottom border of wrapped area (Y)", "description": "If blank, the value will be scene height.", - "group": "", - "extraInformation": [], "name": "BorderBottom" }, { @@ -9734,9 +9798,6 @@ "type": "Number", "unit": "Pixel", "label": "Number of pixels past the center where the object teleports and appears", - "description": "", - "group": "", - "extraInformation": [], "name": "TriggerOffset" } ], @@ -10979,8 +11040,6 @@ "value": "", "type": "Behavior", "label": "Physics Behavior", - "description": "", - "group": "", "extraInformation": [ "Physics2::Physics2Behavior" ], @@ -10990,18 +11049,12 @@ "value": "true", "type": "Boolean", "label": "Horizontal wrapping", - "description": "", - "group": "", - "extraInformation": [], "name": "HorizontalWrapping" }, { "value": "true", "type": "Boolean", "label": "Vertical wrapping", - "description": "", - "group": "", - "extraInformation": [], "name": "VerticalWrapping" }, { @@ -11009,9 +11062,6 @@ "type": "Number", "unit": "Pixel", "label": "Top border of wrapped area (Y)", - "description": "", - "group": "", - "extraInformation": [], "name": "BorderTop" }, { @@ -11019,9 +11069,6 @@ "type": "Number", "unit": "Pixel", "label": "Left border of wrapped area (X)", - "description": "", - "group": "", - "extraInformation": [], "name": "BorderLeft" }, { @@ -11030,8 +11077,6 @@ "unit": "Pixel", "label": "Right border of wrapped area (X)", "description": "If blank, the value will be the scene width.", - "group": "", - "extraInformation": [], "name": "BorderRight" }, { @@ -11040,8 +11085,6 @@ "unit": "Pixel", "label": "Bottom border of wrapped area (Y)", "description": "If blank, the value will be scene height.", - "group": "", - "extraInformation": [], "name": "BorderBottom" }, { @@ -11049,18 +11092,12 @@ "type": "Number", "unit": "Pixel", "label": "Number of pixels past the center where the object teleports and appears", - "description": "", - "group": "", - "extraInformation": [], "name": "TriggerOffset" }, { "value": "0", "type": "Number", "label": "Angular Velocity", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "AngularVelocity" }, @@ -11068,9 +11105,6 @@ "value": "0", "type": "Number", "label": "Linear Velocity X", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LinearVelocityX" }, @@ -11078,9 +11112,6 @@ "value": "0", "type": "Number", "label": "Linear Velocity Y", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LinearVelocityY" } @@ -11095,13 +11126,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", - "gdevelopVersion": "", + "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.4.4", + "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.", "", @@ -11118,6 +11149,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": [], @@ -11162,11 +11199,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -11175,11 +11211,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -11213,12 +11248,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -11228,11 +11263,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -11249,12 +11285,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -11277,12 +11313,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -11292,11 +11328,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -11307,20 +11342,20 @@ }, "parameters": [ "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -11352,11 +11387,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -11378,31 +11412,30 @@ }, "parameters": [ "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -11444,11 +11477,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -11463,11 +11495,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -11496,20 +11527,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -11518,11 +11549,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -11534,20 +11564,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -11556,11 +11586,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -11573,20 +11602,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -11595,11 +11624,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -11611,20 +11639,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -11633,11 +11661,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -11665,18 +11692,17 @@ }, "parameters": [ "", - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -11688,11 +11714,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -11701,11 +11726,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -11718,11 +11742,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -11730,11 +11753,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -11743,11 +11765,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -11760,7 +11781,6348 @@ "parameters": [] } ], - "parameters": [] + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reset the state of the button.", + "fullName": "Reset state", + "functionType": "Action", + "name": "ResetState", + "private": true, + "sentence": "Reset the button state of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", + "functionType": "Condition", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed outside with mouse or touch.", + "fullName": "Is held outside", + "functionType": "Condition", + "name": "IsPressedOutside", + "sentence": "_PARAM0_ is held outside", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the touch id that is using the button or 0 if none.", + "fullName": "Touch id", + "functionType": "ExpressionAndCondition", + "name": "TouchId", + "sentence": "the touch id", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TouchId" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "Should check hovering", + "hidden": true, + "name": "ShouldCheckHovering" + }, + { + "value": "Idle", + "type": "Choice", + "label": "State", + "extraInformation": [ + "Idle", + "Hovered", + "PressedInside", + "PressedOutside", + "Validated" + ], + "hidden": true, + "name": "State" + }, + { + "value": "0", + "type": "Number", + "label": "Touch id", + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Boolean", + "label": "Touch is inside", + "hidden": true, + "name": "TouchIsInside" + }, + { + "value": "", + "type": "Boolean", + "label": "Mouse is inside", + "hidden": true, + "name": "MouseIsInside" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "Index" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [ + { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "Button", + "description": "A button that can be customized.", + "fullName": "Button (panel sprite)", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, + "name": "PanelSpriteButton", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 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": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": 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": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Hovered", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Pressed", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Hovered", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Pressed", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Hovered", + "=", + "1" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Pressed", + "=", + "1" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Label", + "Text", + "=", + "LabelText" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + }, + "parameters": [ + "Object", + "=", + "PressedLabelOffsetY", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Label", + "Text", + "=", + "LabelText" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply states", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Show the right background accordingly to the new state." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + }, + "parameters": [ + "Object", + "=", + "0", + "" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Idle", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoveredFadeOutDuration", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" + }, + "parameters": [ + "Hovered", + "Tween", + "\"Fadeout\"", + "0", + "\"linear\"", + "HoveredFadeOutDuration", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoveredFadeOutDuration", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "OpacityCapability::OpacityBehavior::Value" + }, + "parameters": [ + "Hovered", + "Opacity", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "OpacityCapability::OpacityBehavior::SetValue" + }, + "parameters": [ + "Hovered", + "Opacity", + "=", + "255" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" + }, + "parameters": [ + "Object", + "ButtonFSM" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + }, + "parameters": [ + "Object", + "=", + "0", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Idle" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Hovered", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Hovered", + "Tween", + "\"Fadeout\"" + ] + }, + { + "type": { + "value": "OpacityCapability::OpacityBehavior::SetValue" + }, + "parameters": [ + "Hovered", + "Opacity", + "=", + "255" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + }, + "parameters": [ + "Object", + "=", + "PressedLabelOffsetY", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Idle" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Pressed", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + }, + "parameters": [ + "Object", + "=", + "0", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Idle" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Hovered", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsIdle" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsClicked" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsHovered" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", + "functionType": "Condition", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsFocused" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsPressed" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Change the text of the button label.", + "fullName": "Label text", + "functionType": "Action", + "name": "SetLabelText", + "private": true, + "sentence": "Change the text of _PARAM0_ to _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Label", + "Text", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + }, + { + "description": "Text", + "name": "Value", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Label", + "Text", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the label text.", + "fullName": "Label text", + "functionType": "ExpressionAndCondition", + "name": "LabelText", + "sentence": "the label text", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Label.Text::Value()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", + "functionType": "Action", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldActivate", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldActivate", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + }, + { + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BehaviorActivated" + }, + "parameters": [ + "Idle", + "ButtonFSM" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "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": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" + }, + { + "value": "0.25", + "type": "Number", + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Label offset on Y axis when pressed", + "group": "States", + "name": "PressedLabelOffsetY" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" + }, + { + "value": "", + "type": "Choice", + "label": "", + "extraInformation": [ + "Label.Text=LabelText" + ], + "hidden": true, + "name": "_PropertyMapping" + } + ], + "variants": [ + { + "areaMaxX": 128, + "areaMaxY": 47, + "areaMaxZ": 1, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Orange smooth button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "Nathaniel-19.otf", + "textAlignment": "center", + "characterSize": 24, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": true, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "32;32;32", + "outlineThickness": 6, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Text", + "font": "Nathaniel-19.otf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 24, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 11, + "height": 47, + "leftMargin": 20, + "name": "Idle", + "rightMargin": 20, + "texture": "assets\\Buttons\\RestartButton.png", + "tiled": false, + "topMargin": 11, + "type": "PanelSpriteObject::PanelSprite", + "width": 128, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 11, + "height": 47, + "leftMargin": 20, + "name": "Hovered", + "rightMargin": 20, + "texture": "assets\\Buttons\\RestartButton.png", + "tiled": false, + "topMargin": 11, + "type": "PanelSpriteObject::PanelSprite", + "width": 128, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 11, + "height": 47, + "leftMargin": 20, + "name": "Pressed", + "rightMargin": 20, + "texture": "assets\\Buttons\\RestartButton.png", + "tiled": false, + "topMargin": 11, + "type": "PanelSpriteObject::PanelSprite", + "width": 128, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": false, + "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": 47, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 128, + "x": 0, + "y": 23, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] + }, + { + "areaMaxX": 128, + "areaMaxY": 47, + "areaMaxZ": 1, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Green smooth button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "Nathaniel-19.otf", + "textAlignment": "center", + "characterSize": 24, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": true, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "32;32;32", + "outlineThickness": 6, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Text", + "font": "Nathaniel-19.otf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 24, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 11, + "height": 47, + "leftMargin": 20, + "name": "Idle", + "rightMargin": 17, + "texture": "assets\\Buttons\\SubmitButton.png", + "tiled": false, + "topMargin": 11, + "type": "PanelSpriteObject::PanelSprite", + "width": 128, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 11, + "height": 47, + "leftMargin": 20, + "name": "Hovered", + "rightMargin": 17, + "texture": "assets\\Buttons\\SubmitButton.png", + "tiled": false, + "topMargin": 11, + "type": "PanelSpriteObject::PanelSprite", + "width": 128, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 11, + "height": 47, + "leftMargin": 20, + "name": "Pressed", + "rightMargin": 17, + "texture": "assets\\Buttons\\SubmitButton.png", + "tiled": false, + "topMargin": 11, + "type": "PanelSpriteObject::PanelSprite", + "width": 128, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": false, + "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": 47, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 128, + "x": 0, + "y": 23, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] + } + ] + } + ] + }, + { + "author": "@4ian, Tristan Rhodes (https://victrisgames.itch.io/)", + "category": "Movement", + "extensionNamespace": "", + "fullName": "Sine (or ellipsis) Movement (deprecated)", + "gdevelopVersion": "", + "helpPath": "https://victrisgames.itch.io/extension-sinemovement-and-deptheffect", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNpbmUtd2F2ZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNi41LDIxQzEzLjUsMjEgMTIuMzEsMTYuNzYgMTEuMDUsMTIuMjhDMTAuMTQsOS4wNCA5LDUgNy41LDVDNC4xMSw1IDQsMTEuOTMgNCwxMkgyQzIsMTEuNjMgMi4wNiwzIDcuNSwzQzEwLjUsMyAxMS43MSw3LjI1IDEyLjk3LDExLjc0QzEzLjgzLDE0LjggMTUsMTkgMTYuNSwxOUMxOS45NCwxOSAyMC4wMywxMi4wNyAyMC4wMywxMkgyMi4wM0MyMi4wMywxMi4zNyAyMS45NywyMSAxNi41LDIxWiIgLz48L3N2Zz4=", + "name": "SineMovement", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/sine-wave.svg", + "shortDescription": "Allow an object to move smoothly on the X and/or Y axis following a sine wave, or an ellipsis.", + "version": "0.0.5", + "description": [ + "Allow an object to move smoothly on the X and/or Y axis following a sine wave, or an ellipsis.", + "", + "", + "Example uses:", + "- Floating objects, such as powerups or coins", + "- Moveable platforms", + "- Enemy movement patterns", + "", + "Properties:", + "- Horizontal distance", + "- Vertical distance", + "- Horizontal speed", + "- Vertical speed", + "- Center of movement, X position", + "- Center of movement, Y position", + "", + "Tips:", + "- For circular or elliptical movement, the horizontal and vertical speed need to be the same", + "- For horizontal movement only, set vertical distance to 0", + "- For vertical movement only, set horizontal distance to 0", + "- For figure-8 movement, set horizontal speed to 1/2 of the vertical speed" + ], + "origin": { + "identifier": "SineMovement", + "name": "gdevelop-extension-store" + }, + "tags": [ + "sine", + "ellipsis", + "movement", + "circular", + "circle", + "floating", + "platform", + "enemy" + ], + "authorIds": [ + "wWP8BSlAW0UP4NeaHa2LcmmDzmH2", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Allow an object to move smoothly on the X and/or Y axis following a sine wave.\n\nExample uses:\n- Floating pickups\n- Moveable platforms\n- Enemy movement\n\nProperties:\n- Center of movement, X position\n- Center of movement, Y position\n- Horizontal distance\n- Vertical distance\n- Horizontal speed\n- Horizontal distance\n\nTips:\n- For circular or elliptical movement, the horizontal and vertical speed need to be the same\n- For horizontal movement, set vertical distance to 0\n- For vertical movement, set horizontal distance to 0\n- For figure-8 movement, set horizontal speed to 1/2 of the vertical speed.", + "fullName": "Sine Movement (deprecated)", + "name": "SineMovement", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Set the center of movement to the initial location of the object" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SineMovement::SineMovement::PropertyCenterPointX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "SineMovement::SineMovement::PropertyCenterPointY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SineMovement::SineMovement::SetPropertyCenterPointX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.X()" + ] + }, + { + "type": { + "value": "SineMovement::SineMovement::SetPropertyCenterPointY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Y()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move the object" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SineMovement::SineMovement::PropertyHorizontalDistance" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreX" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyCenterPointX() + cos(ToRad(Object.Behavior::PropertySineProgressX())) * Object.Behavior::PropertyHorizontalDistance()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SineMovement::SineMovement::PropertyVerticalDistance" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyCenterPointY() + sin(ToRad(Object.Behavior::PropertySineProgressY())) * Object.Behavior::PropertyVerticalDistance()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Increment counters that are used to calculate movement" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SineMovement::SineMovement::SetPropertySineProgressX" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.Behavior::PropertyHorizontalSpeed() * TimeDelta()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SineMovement::SineMovement::SetPropertySineProgressY" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.Behavior::PropertyVerticalSpeed() * TimeDelta()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SineMovement::SineMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Counter used to change the Y position of the object.", + "fullName": "Sine progress Y", + "functionType": "Expression", + "name": "SineProgressY", + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertySineProgressY()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SineMovement::SineMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Counter used to change the X position of the object.", + "fullName": "Sine progress X", + "functionType": "Expression", + "name": "SineProgressX", + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertySineProgressX()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SineMovement::SineMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Horizontal speed.", + "fullName": "Horizontal speed ", + "functionType": "Expression", + "name": "HorizontalSpeed", + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHorizontalSpeed()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SineMovement::SineMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Vertical speed.", + "fullName": "Vertical speed", + "functionType": "Expression", + "name": "VerticalSpeed", + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyVerticalSpeed()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SineMovement::SineMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Horizontal distance.", + "fullName": "Horizontal distance", + "functionType": "Expression", + "name": "HorizontalDistance", + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHorizontalDistance()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SineMovement::SineMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Vertical distance.", + "fullName": "Vertical distance", + "functionType": "Expression", + "name": "VerticalDistance", + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyVerticalDistance()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SineMovement::SineMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Center of movement, X position.", + "fullName": "Center of movement, X position", + "functionType": "Expression", + "name": "CenterX", + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyCenterPointX()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SineMovement::SineMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Center of movement, Y position.", + "fullName": "Center of movement, Y position", + "functionType": "Expression", + "name": "CenterY", + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyCenterPointY()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SineMovement::SineMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Set center Y position.", + "fullName": "Set center Y position", + "functionType": "Action", + "name": "SetCenterY", + "sentence": "Set center Y position of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SineMovement::SineMovement::SetPropertyCenterPointY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SineMovement::SineMovement", + "type": "behavior" + }, + { + "description": "Y position", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Set center X position.", + "fullName": "Set center X position", + "functionType": "Action", + "name": "SetCenterX", + "sentence": "Set center X position of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SineMovement::SineMovement::SetPropertyCenterPointX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SineMovement::SineMovement", + "type": "behavior" + }, + { + "description": "X position", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Set horizontal distance.", + "fullName": "Set horizontal distance", + "functionType": "Action", + "name": "SetHorizontalDistance", + "sentence": "Set horizontal distance of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SineMovement::SineMovement::SetPropertyHorizontalDistance" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SineMovement::SineMovement", + "type": "behavior" + }, + { + "description": "Distance", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Set vertical distance.", + "fullName": "Set vertical distance", + "functionType": "Action", + "name": "SetVerticalDistance", + "sentence": "Set vertical distance of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SineMovement::SineMovement::SetPropertyVerticalDistance" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SineMovement::SineMovement", + "type": "behavior" + }, + { + "description": "Distance", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Set horizontal speed.", + "fullName": "Set horizontal speed", + "functionType": "Action", + "name": "SetHorizontalSpeed", + "sentence": "Set horizontal speed of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SineMovement::SineMovement::SetPropertyHorizontalSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SineMovement::SineMovement", + "type": "behavior" + }, + { + "description": "Speed (in degrees per second)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Set vertical speed.", + "fullName": "Set vertical speed", + "functionType": "Action", + "name": "SetVerticalSpeed", + "sentence": "Set vertical speed of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SineMovement::SineMovement::SetPropertyVerticalSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SineMovement::SineMovement", + "type": "behavior" + }, + { + "description": "Speed (in degrees per second)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Reset sine progress counters. The object will return to the initial state.", + "fullName": "Reset sine progress counters", + "functionType": "Action", + "name": "ResetSineCounters", + "sentence": "Reset sine progress counters on _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SineMovement::SineMovement::SetPropertySineProgressX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "SineMovement::SineMovement::SetPropertySineProgressY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SineMovement::SineMovement", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "60", + "type": "Number", + "label": "Horizontal speed, in degrees per second", + "name": "HorizontalSpeed" + }, + { + "value": "60", + "type": "Number", + "label": "Vertical speed, in degrees per second", + "name": "VerticalSpeed" + }, + { + "value": "100", + "type": "Number", + "label": "Horizontal distance: amplitude of the movement on X axis (0 to deactivate)", + "name": "HorizontalDistance" + }, + { + "value": "0", + "type": "Number", + "label": "Vertical distance: amplitude of the movement on Y axis (0 to deactivate)", + "name": "VerticalDistance" + }, + { + "value": "0", + "type": "Number", + "label": "Center of movement, X position", + "name": "CenterPointX" + }, + { + "value": "0", + "type": "Number", + "label": "Center of movement, Y position", + "name": "CenterPointY" + }, + { + "value": "0", + "type": "Number", + "label": "Counter used to change X position", + "hidden": true, + "name": "SineProgressX" + }, + { + "value": "0", + "type": "Number", + "label": "Counter used to change Y position", + "hidden": true, + "name": "SineProgressY" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "Silver-Streak, @Bouh, Tristan Rhodes", + "category": "Game mechanic", + "extensionNamespace": "", + "fullName": "Object \"Is On Screen\" Detection", + "gdevelopVersion": "", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLW1vbml0b3Itc2NyZWVuc2hvdCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik05LDZINVYxMEg3VjhIOU0xOSwxMEgxN1YxMkgxNVYxNEgxOU0yMSwxNkgzVjRIMjFNMjEsMkgzQzEuODksMiAxLDIuODkgMSw0VjE2QTIsMiAwIDAsMCAzLDE4SDEwVjIwSDhWMjJIMTZWMjBIMTRWMThIMjFBMiwyIDAgMCwwIDIzLDE2VjRDMjMsMi44OSAyMi4xLDIgMjEsMiIgLz48L3N2Zz4=", + "name": "IsOnScreen", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/monitor-screenshot.svg", + "shortDescription": "This adds a condition to detect if an object is on screen based off its current layer.", + "version": "1.2.1", + "description": [ + "This extension adds conditions to check if an object is located within the visible portion of its layer's camera. The condition also allows for specifying padding to the virtual screen border.", + "", + "Note that this does not take into account any object visibility, such as being hidden or 0 opacity, but can be combined with those existing conditions." + ], + "origin": { + "identifier": "IsOnScreen", + "name": "gdevelop-extension-store" + }, + "tags": [ + "is on screen", + "condition", + "visible", + "hide", + "screen" + ], + "authorIds": [ + "2OwwM8ToR9dx9RJ2sAKTcrLmCB92", + "8Ih1aa8f5gWUp4UB2BdhQ2iXWxJ3", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "This behavior provides a condition to check if the object is located within the visible portion of its layer's camera. The condition also allows for specifying padding to the virtual screen border.\nNote that object visibility, such as being hidden or 0 opacity, is not considered (but you can use those existing conditions in addition to this behavior).", + "fullName": "Is on screen", + "name": "InOnScreen", + "objectType": "", + "eventsFunctions": [ + { + "description": "Checks if an object position is within the viewport of its layer.", + "fullName": "Is on screen", + "functionType": "Condition", + "name": "IsOnScreen", + "sentence": "_PARAM0_ is on screen (padded by _PARAM2_ pixels)", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/*", + "Get the object layer, convert the position from this layer to the screen coordinates.", + "Get the point on each side on the object on screen, and compare with the screen area.", + "", + "This way even if the camera has a rotation or custom scale the object is always compared to the screen area.", + "*/", + "", + "", + "// Get the layer of the object.", + "const object = objects[0];", + "const layer = runtimeScene.getLayer(object.getLayer());", + "", + "// Get the aabb of the object on his layer.", + "const aabb = object.getVisibilityAABB();", + "", + "// Get the layer to convert the coordinates of the AABB to the screen coordinates", + "const topLeft = layer.convertInverseCoords(aabb.min[0], aabb.min[1]);", + "const topRight = layer.convertInverseCoords(aabb.max[0], aabb.min[1]);", + "const bottomRight = layer.convertInverseCoords(aabb.max[0], aabb.max[1]);", + "const bottomLeft = layer.convertInverseCoords(aabb.min[0], aabb.max[1]);", + "", + "// Get the points on each side of the object on screen.", + "const posLeftObjectOnScreen = Math.min(topLeft[0], topRight[0], bottomLeft[0], bottomRight[0]);", + "const posRightObjectOnScreen = Math.max(topLeft[0], topRight[0], bottomLeft[0], bottomRight[0]);", + "const posUpObjectOnScreen = Math.min(topLeft[1], topRight[1], bottomLeft[1], bottomRight[1]);", + "const posDownObjectOnScreen = Math.max(topLeft[1], topRight[1], bottomLeft[1], bottomRight[1]);", + "", + "const padding = eventsFunctionContext.getArgument(\"Padding\");", + "", + "if (", + " !(posLeftObjectOnScreen - padding > runtimeScene.getGame().getGameResolutionWidth() ||", + " posUpObjectOnScreen - padding > runtimeScene.getGame().getGameResolutionHeight() ||", + " posRightObjectOnScreen + padding < 0 ||", + " posDownObjectOnScreen + padding < 0", + " )", + ") {", + " eventsFunctionContext.returnValue = true;", + "}", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "IsOnScreen::InOnScreen", + "type": "behavior" + }, + { + "description": "Padding (in pixels)", + "longDescription": "Number of pixels to pad the screen border. Zero by default. A negative value goes inside the screen, a positive value go outside.", + "name": "Padding", + "type": "expression" + } + ], + "objectGroups": [ + { + "name": "Group", + "objects": [] + } + ] + } + ], + "propertyDescriptors": [], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "User interface", + "extensionNamespace": "", + "fullName": "Button states and effects", + "gdevelopVersion": ">=5.5.222", + "helpPath": "/objects/button", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtdGFwLWJ1dHRvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMyA1QzE1LjIxIDUgMTcgNi43OSAxNyA5QzE3IDEwLjUgMTYuMiAxMS43NyAxNSAxMi40NlYxMS4yNEMxNS42MSAxMC42OSAxNiA5Ljg5IDE2IDlDMTYgNy4zNCAxNC42NiA2IDEzIDZTMTAgNy4zNCAxMCA5QzEwIDkuODkgMTAuMzkgMTAuNjkgMTEgMTEuMjRWMTIuNDZDOS44IDExLjc3IDkgMTAuNSA5IDlDOSA2Ljc5IDEwLjc5IDUgMTMgNU0yMCAyMC41QzE5Ljk3IDIxLjMyIDE5LjMyIDIxLjk3IDE4LjUgMjJIMTNDMTIuNjIgMjIgMTIuMjYgMjEuODUgMTIgMjEuNTdMOCAxNy4zN0w4Ljc0IDE2LjZDOC45MyAxNi4zOSA5LjIgMTYuMjggOS41IDE2LjI4SDkuN0wxMiAxOFY5QzEyIDguNDUgMTIuNDUgOCAxMyA4UzE0IDguNDUgMTQgOVYxMy40N0wxNS4yMSAxMy42TDE5LjE1IDE1Ljc5QzE5LjY4IDE2LjAzIDIwIDE2LjU2IDIwIDE3LjE0VjIwLjVNMjAgMkg0QzIuOSAyIDIgMi45IDIgNFYxMkMyIDEzLjExIDIuOSAxNCA0IDE0SDhWMTJMNCAxMkw0IDRIMjBMMjAgMTJIMThWMTRIMjBWMTMuOTZMMjAuMDQgMTRDMjEuMTMgMTQgMjIgMTMuMDkgMjIgMTJWNEMyMiAyLjkgMjEuMTEgMiAyMCAyWiIgLz48L3N2Zz4=", + "name": "ButtonStates", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", + "shortDescription": "Use any object as a button and change appearance according to user interactions.", + "version": "1.3.1", + "description": [ + "Use the \"Button states\" behavior to track user interactions with an object, including:", + "", + "- Hovered", + "- Pressed", + "- Clicked", + "- Idle", + "", + "Add additional behaviors to make juicy buttons with animated responses to user input:", + "", + "- Size", + "- Color", + "- Animation", + "- Object effects" + ], + "origin": { + "identifier": "ButtonStates", + "name": "gdevelop-extension-store" + }, + "tags": [ + "ui", + "button" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Use objects as buttons.", + "fullName": "Button states", + "name": "ButtonFSM", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Finite state machine", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The \"Validated\" state only last one frame." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure the cursor position is only checked once per frame." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "+", + "1" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reset the state of the button.", + "fullName": "Reset state", + "functionType": "Action", + "name": "ResetState", + "private": true, + "sentence": "Reset the button state of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", + "functionType": "Condition", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed outside with mouse or touch.", + "fullName": "Is held outside", + "functionType": "Condition", + "name": "IsPressedOutside", + "sentence": "_PARAM0_ is held outside", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the touch id that is using the button or 0 if none.", + "fullName": "Touch id", + "functionType": "ExpressionAndCondition", + "name": "TouchId", + "sentence": "the touch id", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TouchId" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "Should check hovering", + "hidden": true, + "name": "ShouldCheckHovering" + }, + { + "value": "Idle", + "type": "Choice", + "label": "State", + "extraInformation": [ + "Idle", + "Hovered", + "PressedInside", + "PressedOutside", + "Validated" + ], + "hidden": true, + "name": "State" + }, + { + "value": "0", + "type": "Number", + "label": "Touch id", + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Boolean", + "label": "Touch is inside", + "hidden": true, + "name": "TouchIsInside" + }, + { + "value": "", + "type": "Boolean", + "label": "Mouse is inside", + "hidden": true, + "name": "MouseIsInside" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "Index" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Enable effects on buttons based on their state.", + "fullName": "Button object effects", + "name": "ButtonObjectEffects", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "IdleEffect", + "yes" + ] + }, + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "FocusedEffect", + "no" + ] + }, + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "PressedEffect", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "States", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "IdleEffect", + "no" + ] + }, + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "FocusedEffect", + "no" + ] + }, + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "PressedEffect", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "IdleEffect", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "IdleEffect", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "FocusedEffect", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "FocusedEffect", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PressedEffect", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "PressedEffect", + "yes" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the idle state effect of the object.", + "fullName": "Idle state effect", + "functionType": "ExpressionAndCondition", + "group": "Button object effects configuration", + "name": "IdleEffect", + "sentence": "the idle state effect", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "IdleEffect" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleEffect", + "name": "SetIdleEffect", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleEffect", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the focused state effect of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state effect", + "functionType": "ExpressionAndCondition", + "group": "Button object effects configuration", + "name": "FocusedEffect", + "sentence": "the focused state effect", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "FocusedEffect" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedEffect", + "name": "SetFocusedEffect", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "FocusedEffect", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed state effect of the object.", + "fullName": "Pressed state effect", + "functionType": "ExpressionAndCondition", + "group": "Button object effects configuration", + "name": "PressedEffect", + "sentence": "the pressed state effect", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "PressedEffect" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedEffect", + "name": "SetPressedEffect", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PressedEffect", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Button states", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "name": "ButtonFSM" + }, + { + "value": "", + "type": "Behavior", + "label": "Effect capability", + "extraInformation": [ + "EffectCapability::EffectBehavior" + ], + "name": "Effect" + }, + { + "value": "", + "type": "String", + "label": "Idle state effect", + "group": "Effects", + "name": "IdleEffect" + }, + { + "value": "", + "type": "String", + "label": "Focused state effect", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Effects", + "name": "FocusedEffect" + }, + { + "value": "", + "type": "String", + "label": "Pressed state effect", + "group": "Effects", + "name": "PressedEffect" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Change the animation of buttons according to their state.", + "fullName": "Button animation", + "name": "ButtonAnimationName", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "IdleAnimationName" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Change based on state", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "IdleAnimationName" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "FocusedAnimationName" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "PressedAnimationName" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the idle state animation name of the object.", + "fullName": "Idle state animation name", + "functionType": "ExpressionAndCondition", + "group": "Button animation configuration", + "name": "IdleAnimationName", + "sentence": "the idle state animation name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "IdleAnimationName" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleAnimationName", + "name": "SetIdleAnimationName", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleAnimationName", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the focused state animation name of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state animation name", + "functionType": "ExpressionAndCondition", + "group": "Button animation configuration", + "name": "FocusedAnimationName", + "sentence": "the focused state animation name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "FocusedAnimationName" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedAnimationName", + "name": "SetFocusedAnimationName", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "FocusedAnimationName", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed state animation name of the object.", + "fullName": "Pressed state animation name", + "functionType": "ExpressionAndCondition", + "group": "Button animation configuration", + "name": "PressedAnimationName", + "sentence": "the pressed state animation name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "PressedAnimationName" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedAnimationName", + "name": "SetPressedAnimationName", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PressedAnimationName", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Animatable capability", + "extraInformation": [ + "AnimatableCapability::AnimatableBehavior" + ], + "name": "Animation" + }, + { + "value": "", + "type": "Behavior", + "label": "Button states", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "name": "ButtonFSM" + }, + { + "value": "Idle", + "type": "String", + "label": "Idle state animation name", + "group": "Animation", + "name": "IdleAnimationName" + }, + { + "value": "Focused", + "type": "String", + "label": "Focused state animation name", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Animation", + "name": "FocusedAnimationName" + }, + { + "value": "Pressed", + "type": "String", + "label": "Pressed state animation name", + "group": "Animation", + "name": "PressedAnimationName" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Smoothly change an effect on buttons according to their state.", + "fullName": "Button object effect tween", + "name": "ButtonObjectEffectTween", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "EffectValue", + "=", + "IdleValue" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "States", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "IdleValue", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "FocusedValue", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "FocusedValue", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Pressed\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "PressedValue", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Tween", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"FadeIn\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::PlayTween" + }, + "parameters": [ + "Object", + "Behavior", + "FadeInDuration", + "FadeInEasing", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"FadeOut\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::PlayTween" + }, + "parameters": [ + "Object", + "Behavior", + "FadeOutDuration", + "FadeOutEasing", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Time delta", + "functionType": "Expression", + "name": "TimeDelta", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TimeDelta() * LayerTimeScale(Object.Layer())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade in", + "functionType": "Action", + "name": "FadeIn", + "private": true, + "sentence": "_PARAM0_ fade in to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTime", + "=", + "0" + ] + }, + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"FadeIn\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenInitialValue", + "=", + "EffectValue" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTargetedValue", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade out", + "functionType": "Action", + "name": "FadeOut", + "private": true, + "sentence": "_PARAM0_ fade out to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTime", + "=", + "0" + ] + }, + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"FadeOut\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenInitialValue", + "=", + "EffectValue" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTargetedValue", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "Play tween", + "functionType": "Action", + "name": "PlayTween", + "private": true, + "sentence": "Tween the effect property of object _PARAM0_ over _PARAM2_ seconds with _PARAM3_ easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TweenTime", + "<", + "Duration" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTime", + "+", + "Object.Behavior::TimeDelta()" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "EffectValue", + "=", + "Tween::Ease(Easing, TweenInitialValue, TweenTargetedValue, TweenTime / Duration)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TweenTime", + ">=", + "Duration" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "EffectValue", + "=", + "TweenTargetedValue" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::SetEffectDoubleParameter" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "EffectProperty", + "EffectValue" + ] + } + ] } ], "parameters": [ @@ -11772,17 +18134,30 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" + }, + { + "description": "Duration (in seconds)", + "name": "Duration", + "type": "expression" + }, + { + "description": "Easing", + "name": "Easing", + "supplementaryInformation": "[]", + "type": "string" } ], "objectGroups": [] }, { - "fullName": "", - "functionType": "Action", - "name": "onDeActivate", - "sentence": "", + "description": "the effect name of the object.", + "fullName": "Effect name", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "EffectName", + "sentence": "the effect name", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -11790,17 +18165,18 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::ResetState" + "value": "SetReturnString" }, "parameters": [ - "Object", - "Behavior", - "" + "EffectName" ] } ] } ], + "expressionType": { + "type": "string" + }, "parameters": [ { "description": "Object", @@ -11810,19 +18186,61 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Reset the state of the button.", - "fullName": "Reset state", + "description": "the effect parameter of the object. The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", + "fullName": "Effect parameter", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "EffectProperty", + "sentence": "the effect parameter", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "EffectProperty" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the effect parameter of the object. The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", + "fullName": "Effect parameter", "functionType": "Action", - "name": "ResetState", - "private": true, - "sentence": "Reset the button state of _PARAM0_", + "getterName": "EffectName", + "group": "Button effect tween configuration", + "name": "SetEffectProperty", + "sentence": "Change the tweened effect of _PARAM0_ to _PARAM2_ with parameter _PARAM3_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -11830,24 +18248,22 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectName", "=", - "\"Idle\"" + "NewEffectName" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectProperty", "=", - "0" + "NewPropertyName" ] } ] @@ -11862,46 +18278,48 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" + }, + { + "description": "Effect name", + "name": "NewEffectName", + "type": "string" + }, + { + "description": "Parameter name", + "name": "NewPropertyName", + "type": "string" } ], "objectGroups": [] }, { - "description": "Check if the button is not used.", - "fullName": "Is idle", - "functionType": "Condition", - "name": "IsIdle", - "sentence": "_PARAM0_ is idle", + "description": "the idle effect parameter value of the object.", + "fullName": "Idle effect parameter value", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "IdleValue", + "sentence": "the idle effect parameter value", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "IdleValue" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -11911,46 +18329,77 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button was just clicked.", - "fullName": "Is clicked", - "functionType": "Condition", - "name": "IsClicked", - "sentence": "_PARAM0_ is clicked", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleValue", + "name": "SetIdleValue", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleValue", "=", - "\"Validated\"" + "Value" ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the focused effect parameter value of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused effect parameter value", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FocusedValue", + "sentence": "the focused effect parameter value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "FocusedValue" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -11960,46 +18409,77 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the cursor is hovered over the button.", - "fullName": "Is hovered", - "functionType": "Condition", - "name": "IsHovered", - "sentence": "_PARAM0_ is hovered", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedValue", + "name": "SetFocusedValue", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedValue", "=", - "\"Hovered\"" + "Value" ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed effect parameter value of the object.", + "fullName": "Pressed effect parameter value", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "PressedValue", + "sentence": "the pressed effect parameter value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "PressedValue" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -12009,67 +18489,31 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is either hovered or pressed but not hovered.", - "fullName": "Is focused", - "functionType": "Condition", - "name": "IsFocused", - "sentence": "_PARAM0_ is focused", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedValue", + "name": "SetPressedValue", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedValue", "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" + "Value" ] } ] @@ -12084,46 +18528,39 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is currently being pressed with mouse or touch.", - "fullName": "Is pressed", - "functionType": "Condition", - "name": "IsPressed", - "sentence": "_PARAM0_ is pressed", + "description": "the fade-in easing of the object.", + "fullName": "Fade-in easing", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FadeInEasing", + "sentence": "the fade-in easing", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnString" }, "parameters": [ - "True" + "FadeInEasing" ] } ] } ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, "parameters": [ { "description": "Object", @@ -12133,41 +18570,31 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is currently being pressed outside with mouse or touch.", - "fullName": "Is held outside", - "functionType": "Condition", - "name": "IsPressedOutside", - "sentence": "_PARAM0_ is held outside", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInEasing", + "name": "SetFadeInEasing", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetStringVariable" }, "parameters": [ - "True" + "FadeInEasing", + "=", + "Value" ] } ] @@ -12182,18 +18609,19 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "the touch id that is using the button or 0 if none.", - "fullName": "Touch id", + "description": "the fade-out easing of the object.", + "fullName": "Fade-out easing", "functionType": "ExpressionAndCondition", - "name": "TouchId", - "sentence": "the touch id", + "group": "Button effect tween configuration", + "name": "FadeOutEasing", + "sentence": "the fade-out easing", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -12201,17 +18629,18 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "FadeOutEasing" ] } ] } ], "expressionType": { - "type": "expression" + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" }, "parameters": [ { @@ -12222,272 +18651,433 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "true", - "type": "Boolean", - "label": "", - "description": "Should check hovering", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "ShouldCheckHovering" - }, - { - "value": "Idle", - "type": "Choice", - "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" - ], - "hidden": true, - "name": "State" - }, - { - "value": "0", - "type": "Number", - "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchId" - }, - { - "value": "", - "type": "Boolean", - "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchIsInside" }, - { - "value": "", - "type": "Boolean", - "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "MouseIsInside" - }, - { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "Index" - } - ], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [ - { - "areaMaxX": 64, - "areaMaxY": 64, - "areaMaxZ": 64, - "areaMinX": 0, - "areaMinY": 0, - "areaMinZ": 0, - "defaultName": "Button", - "description": "A button that can be customized.", - "fullName": "Button (panel sprite)", - "isUsingLegacyInstancesRenderer": true, - "name": "PanelSpriteButton", - "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": "Create one background instance for of each state.\nOnly the instance for the current state is shown." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Idle", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Hovered", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Pressed", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Hovered" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Pressed" - ] - }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutEasing", + "name": "SetFadeOutEasing", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "ChangePlan" + "value": "SetStringVariable" }, "parameters": [ - "Hovered", + "FadeOutEasing", "=", - "1" + "Value" ] } ] - }, + } + ], + "parameters": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Place the label over the backgrounds." + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in duration of the object.", + "fullName": "Fade-in duration", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FadeInDuration", + "sentence": "the fade-in duration", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "Create" + "value": "SetReturnNumber" }, "parameters": [ - "", - "Label", - "0", - "0", - "" + "FadeInDuration" ] - }, + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInDuration", + "name": "SetFadeInDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, "parameters": [ - "Label", + "FadeInDuration", "=", - "2" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "yes" + "Value" ] - }, + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out duration of the object.", + "fullName": "Fade-out duration", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FadeOutDuration", + "sentence": "the fade-out duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "" + "FadeOutDuration" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" } ], - "objectGroups": [ + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutDuration", + "name": "SetFadeOutDuration", + "sentence": "", + "events": [ { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "name": "Pressed" + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FadeOutDuration", + "=", + "Value" + ] } ] } - ] + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Button states", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "name": "ButtonFSM" + }, + { + "value": "", + "type": "Behavior", + "label": "Effect capability", + "extraInformation": [ + "EffectCapability::EffectBehavior" + ], + "name": "Effect" + }, + { + "value": "Effect", + "type": "String", + "label": "Effect name", + "group": "Effect", + "name": "EffectName" + }, + { + "value": "", + "type": "String", + "label": "Effect parameter", + "description": "The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", + "group": "Effect", + "name": "EffectProperty" + }, + { + "value": "0", + "type": "Number", + "label": "Idle effect parameter value", + "group": "Value", + "name": "IdleValue" + }, + { + "value": "0", + "type": "Number", + "label": "Focused effect parameter value", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Value", + "name": "FocusedValue" + }, + { + "value": "0", + "type": "Number", + "label": "Pressed effect parameter value", + "group": "Value", + "name": "PressedValue" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-in easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeInEasing" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeOutEasing" + }, + { + "value": "0.125", + "type": "Number", + "unit": "Second", + "label": "Fade-in duration", + "group": "Speed", + "name": "FadeInDuration" + }, + { + "value": "0.5", + "type": "Number", + "unit": "Second", + "label": "Fade-out duration", + "group": "Speed", + "name": "FadeOutDuration" + }, + { + "value": "Idle", + "type": "Choice", + "label": "", + "extraInformation": [ + "Idle", + "Focused", + "Pressed" + ], + "hidden": true, + "name": "PreviousState" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "TweenInitialValue" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "TweenTargetedValue" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "TweenTime" + }, + { + "value": "NoTween", + "type": "Choice", + "label": "", + "extraInformation": [ + "NoTween", + "FadeIn", + "FadeOut" + ], + "hidden": true, + "name": "TweenState" }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "EffectValue" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Smoothly resize buttons according to their state.", + "fullName": "Button scale tween", + "name": "ButtonScaleTween", + "objectType": "", + "eventsFunctions": [ { "fullName": "", "functionType": "Action", - "name": "onHotReloading", + "name": "onCreated", "sentence": "", "events": [ { @@ -12496,11 +19086,13 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "ScalableCapability::ScalableBehavior::SetValue" }, "parameters": [ "Object", - "" + "Scale", + "=", + "IdleScale" ] } ] @@ -12510,318 +19102,75 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", - "sentence": "", - "events": [ - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply states", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Show the right background accordingly to the new state." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsIdle" - }, - "parameters": [ - "Object", - "ButtonFSM" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "Idle", - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Pressed" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Visible" - }, - "parameters": [ - "Hovered" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" - }, - "parameters": [ - "Object", - ">", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Tween::AddObjectOpacityTween" - }, - "parameters": [ - "Hovered", - "Tween", - "\"Fadeout\"", - "0", - "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" - }, - "parameters": [ - "Object", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Hovered" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteObject::Opacity" - }, - "parameters": [ - "Hovered", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Hovered" - ] - }, - { - "type": { - "value": "PanelSpriteObject::SetOpacity" - }, - "parameters": [ - "Hovered", - "=", - "255" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" - }, - "parameters": [ - "Object", - "ButtonFSM" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Idle" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "Hovered", - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Pressed" - ] - }, - { - "type": { - "value": "Tween::RemoveTween" - }, - "parameters": [ - "Hovered", - "Tween", - "\"Fadeout\"" - ] - }, - { - "type": { - "value": "PanelSpriteObject::SetOpacity" - }, - "parameters": [ - "Hovered", - "=", - "255" - ] - } - ] - }, + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Change based on state", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "value": "ButtonStates::ButtonFSM::IsIdle" }, "parameters": [ "Object", - "ButtonFSM" + "ButtonFSM", + "" ] }, { "type": { - "value": "BuiltinCommonInstructions::Once" + "value": "StringVariable" }, - "parameters": [] + "parameters": [ + "PreviousState", + "!=", + "\"Idle\"" + ] } ], "actions": [ { "type": { - "value": "SetCenterY" + "value": "SetStringVariable" }, "parameters": [ - "Label", + "PreviousState", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Idle" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Hovered" + "\"Idle\"" ] }, { "type": { - "value": "Montre" + "value": "ButtonStates::ButtonScaleTween::FadeOut" }, "parameters": [ - "Pressed", + "Object", + "Behavior", + "IdleScale", "" ] } @@ -12832,278 +19181,322 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsFocused" + "value": "ButtonStates::ButtonFSM::IsFocused" }, "parameters": [ "Object", - "ButtonFSM" + "ButtonFSM", + "" ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] } ], - "actions": [ - { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Idle" - ] - }, + "actions": [], + "events": [ { - "type": { - "value": "Montre" - }, - "parameters": [ - "Hovered", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonScaleTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "FocusedScale", + "" + ] + } ] }, { - "type": { - "value": "Cache" - }, - "parameters": [ - "Pressed" - ] - } - ] - } - ], - "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": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" + "value": "StringVariable" }, "parameters": [ - "Object.Width()", - "!=", - "max(Idle.BoundingBoxRight(), Label.BoundingBoxRight()) - min(Idle.BoundingBoxLeft(), Label.BoundingBoxLeft())" + "PreviousState", + "=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Focused\"" ] }, { "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" + "value": "ButtonStates::ButtonScaleTween::FadeOut" }, "parameters": [ - "Object.Height()", - "!=", - "max(Idle.BoundingBoxBottom(), Label.BoundingBoxBottom()) - min(Idle.BoundingBoxTop(), Label.BoundingBoxTop())" + "Object", + "Behavior", + "FocusedScale", + "" ] } ] } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Height", - "=", - "Object.Height()" - ] - }, + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteButton::Scale" + "value": "ButtonStates::ButtonFSM::IsPressed" }, "parameters": [ "Object", - "=", - "1" + "ButtonFSM", + "" ] }, { "type": { - "value": "PanelSpriteObject::Width" + "value": "StringVariable" }, "parameters": [ - "Background", - "=", - "Idle.Variable(Width)" + "PreviousState", + "!=", + "\"Pressed\"" ] - }, + } + ], + "actions": [ { "type": { - "value": "PanelSpriteObject::Height" + "value": "SetStringVariable" }, "parameters": [ - "Background", + "PreviousState", "=", - "Idle.Variable(Height)" + "\"Pressed\"" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "ButtonStates::ButtonScaleTween::FadeIn" }, "parameters": [ "Object", + "Behavior", + "PressedScale", "" ] } ] } - ], - "parameters": [] + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade in", + "functionType": "Action", + "name": "FadeIn", + "private": true, + "sentence": "_PARAM0_ fade in to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween::AddObjectScaleTween" + }, + "parameters": [ + "Object", + "Tween", + "\"__ButtonScaleTween.Fade\"", + "Value", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", + "no", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade out", + "functionType": "Action", + "name": "FadeOut", + "private": true, + "sentence": "_PARAM0_ fade out to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween::AddObjectScaleTween" + }, + "parameters": [ + "Object", + "Tween", + "\"__ButtonScaleTween.Fade\"", + "Value", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", + "no", + "yes" + ] + } + ] } ], "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - } - ], - "objectGroups": [ + }, { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" } - ] + ], + "objectGroups": [] }, { - "description": "Check if the button is not used.", - "fullName": "Is idle", - "functionType": "Condition", - "name": "IsIdle", - "sentence": "_PARAM0_ is idle", + "description": "the idle state size scale of the object.", + "fullName": "Idle state size scale", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "IdleScale", + "sentence": "the idle state size scale", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsIdle" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "IdleScale" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button was just clicked.", - "fullName": "Is clicked", - "functionType": "Condition", - "name": "IsClicked", - "sentence": "_PARAM0_ is clicked", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleScale", + "name": "SetIdleScale", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsClicked" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "IdleScale", + "=", + "Value" ] } ] @@ -13113,40 +19506,77 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the cursor is hovered over the button.", - "fullName": "Is hovered", - "functionType": "Condition", - "name": "IsHovered", - "sentence": "_PARAM0_ is hovered", + "description": "the focused state size scale of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state size scale", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FocusedScale", + "sentence": "the focused state size scale", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::IsHovered" + "value": "SetReturnNumber" }, "parameters": [ - "Idle", - "ButtonFSM", - "" + "FocusedScale" ] } - ], + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedScale", + "name": "SetFocusedScale", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "FocusedScale", + "=", + "Value" ] } ] @@ -13156,40 +19586,77 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is either hovered or pressed but not hovered.", - "fullName": "Is focused", - "functionType": "Condition", - "name": "IsFocused", - "sentence": "_PARAM0_ is focused", + "description": "the pressed state size scale of the object.", + "fullName": "Pressed state size scale", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "PressedScale", + "sentence": "the pressed state size scale", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::IsFocused" + "value": "SetReturnNumber" }, "parameters": [ - "Idle", - "ButtonFSM", - "" + "PressedScale" ] } - ], + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedScale", + "name": "SetPressedScale", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "PressedScale", + "=", + "Value" ] } ] @@ -13199,40 +19666,77 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is currently being pressed with mouse or touch.", - "fullName": "Is pressed", - "functionType": "Condition", - "name": "IsPressed", - "sentence": "_PARAM0_ is pressed", + "description": "the fade-in duration of the object.", + "fullName": "Fade-in duration", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FadeInDuration", + "sentence": "the fade-in duration", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::IsPressed" + "value": "SetReturnNumber" }, "parameters": [ - "Idle", - "ButtonFSM", - "" + "FadeInDuration" ] } - ], + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInDuration", + "name": "SetFadeInDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "FadeInDuration", + "=", + "Value" ] } ] @@ -13242,18 +19746,24 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Change the text of the button label.", - "fullName": "Label text", - "functionType": "Action", - "name": "SetLabelText", - "sentence": "Change the text of _PARAM0_ to _PARAM1_", + "description": "the fade-out duration of the object.", + "fullName": "Fade-out duration", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FadeOutDuration", + "sentence": "the fade-out duration", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -13261,46 +19771,38 @@ "actions": [ { "type": { - "value": "TextObject::String" - }, - "parameters": [ - "Label", - "=", - "GetArgumentAsString(\"LabelText\")" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "" + "FadeOutDuration" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" }, { - "description": "Text", - "name": "LabelText", - "type": "string" + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutDuration", + "name": "SetFadeOutDuration", "sentence": "", "events": [ { @@ -13309,35 +19811,39 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "SetNumberVariable" }, "parameters": [ - "Label.String()" + "FadeOutDuration", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" } ], "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 fade-in easing of the object.", + "fullName": "Fade-in easing", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FadeInEasing", + "sentence": "the fade-in easing", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -13345,35 +19851,40 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "FadeInEasing" ] } ] } ], "expressionType": { - "type": "expression" + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" } ], "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_", + "functionType": "ActionWithOperator", + "getterName": "FadeInEasing", + "name": "SetFadeInEasing", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -13381,78 +19892,12 @@ "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" + "value": "SetStringVariable" }, "parameters": [ - "Label", + "FadeInEasing", "=", - "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()" + "Value" ] } ] @@ -13462,128 +19907,78 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - } - ], - "objectGroups": [ + }, { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" } - ] + ], + "objectGroups": [] }, { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "description": "the fade-out easing of the object.", + "fullName": "Fade-out easing", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FadeOutEasing", + "sentence": "the fade-out easing", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"ShouldActivate\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "ActivateBehavior" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "yes" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"ShouldActivate\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnString" }, "parameters": [ - "Idle", - "ButtonFSM", - "no" + "FadeOutEasing" ] } ] } ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" }, { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutEasing", + "name": "SetFadeOutEasing", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": [ - "Idle", - "ButtonFSM" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetStringVariable" }, "parameters": [ - "True" + "FadeOutEasing", + "=", + "Value" ] } ] @@ -13593,8 +19988,13 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" } ], "objectGroups": [] @@ -13602,473 +20002,465 @@ ], "propertyDescriptors": [ { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "name": "PressedLabelOffsetY" + "value": "", + "type": "Behavior", + "label": "Scalable capability", + "extraInformation": [ + "ScalableCapability::ScalableBehavior" + ], + "name": "Scale" }, { - "value": "0", - "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", + "value": "", + "type": "Behavior", + "label": "Button states behavior (required)", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "name": "ButtonFSM" + }, + { + "value": "", + "type": "Behavior", + "label": "Tween behavior (required)", "extraInformation": [ - "Label" + "Tween::TweenBehavior" ], - "name": "LeftPadding" + "name": "Tween" }, { - "value": "0", + "value": "1", "type": "Number", - "label": "Right padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "RightPadding" + "unit": "Dimensionless", + "label": "Idle state size scale", + "group": "Size", + "name": "IdleScale" }, { - "value": "0", + "value": "1", "type": "Number", - "label": "Top padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "TopPadding" + "unit": "Dimensionless", + "label": "Focused state size scale", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Size", + "name": "FocusedScale" }, { - "value": "0", + "value": "0.1", "type": "Number", - "label": "Bottom padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "BottomPadding" + "unit": "Second", + "label": "Fade-in duration", + "group": "Speed", + "name": "FadeInDuration" }, { - "value": "0.25", + "value": "0.2", "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], - "name": "HoveredFadeOutDuration" - } - ], - "objects": [ + "unit": "Second", + "label": "Fade-out duration", + "group": "Speed", + "name": "FadeOutDuration" + }, { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 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": "Text", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "0;0;0" - } + "value": "0.95", + "type": "Number", + "unit": "Dimensionless", + "label": "Pressed state size scale", + "group": "Size", + "name": "PressedScale" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ - { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" - } + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-in easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" ], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true - } - ] + "name": "FadeInEasing" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ] + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeOutEasing" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Idle" - }, - { - "objectName": "Hovered" - }, - { - "objectName": "Pressed" - } - ] - }, - "objectsGroups": [], - "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 - } + "value": "Idle", + "type": "Choice", + "label": "", + "extraInformation": [ + "Idle", + "Focused", + "Pressed" ], - "effects": [] + "hidden": true, + "name": "PreviousState" } ], - "instances": [] - } - ] - }, - { - "author": "@4ian, Tristan Rhodes (https://victrisgames.itch.io/)", - "category": "Movement", - "extensionNamespace": "", - "fullName": "Sine (or ellipsis) Movement (deprecated)", - "gdevelopVersion": "", - "helpPath": "https://victrisgames.itch.io/extension-sinemovement-and-deptheffect", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNpbmUtd2F2ZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNi41LDIxQzEzLjUsMjEgMTIuMzEsMTYuNzYgMTEuMDUsMTIuMjhDMTAuMTQsOS4wNCA5LDUgNy41LDVDNC4xMSw1IDQsMTEuOTMgNCwxMkgyQzIsMTEuNjMgMi4wNiwzIDcuNSwzQzEwLjUsMyAxMS43MSw3LjI1IDEyLjk3LDExLjc0QzEzLjgzLDE0LjggMTUsMTkgMTYuNSwxOUMxOS45NCwxOSAyMC4wMywxMi4wNyAyMC4wMywxMkgyMi4wM0MyMi4wMywxMi4zNyAyMS45NywyMSAxNi41LDIxWiIgLz48L3N2Zz4=", - "name": "SineMovement", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/sine-wave.svg", - "shortDescription": "Allow an object to move smoothly on the X and/or Y axis following a sine wave, or an ellipsis.", - "version": "0.0.5", - "description": [ - "Allow an object to move smoothly on the X and/or Y axis following a sine wave, or an ellipsis.", - "", - "", - "Example uses:", - "- Floating objects, such as powerups or coins", - "- Moveable platforms", - "- Enemy movement patterns", - "", - "Properties:", - "- Horizontal distance", - "- Vertical distance", - "- Horizontal speed", - "- Vertical speed", - "- Center of movement, X position", - "- Center of movement, Y position", - "", - "Tips:", - "- For circular or elliptical movement, the horizontal and vertical speed need to be the same", - "- For horizontal movement only, set vertical distance to 0", - "- For vertical movement only, set horizontal distance to 0", - "- For figure-8 movement, set horizontal speed to 1/2 of the vertical speed" - ], - "origin": { - "identifier": "SineMovement", - "name": "gdevelop-extension-store" - }, - "tags": [ - "sine", - "ellipsis", - "movement", - "circular", - "circle", - "floating", - "platform", - "enemy" - ], - "authorIds": [ - "wWP8BSlAW0UP4NeaHa2LcmmDzmH2", - "gqDaZjCfevOOxBYkK6zlhtZnXCg1" - ], - "dependencies": [], - "globalVariables": [], - "sceneVariables": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [ + "sharedPropertyDescriptors": [] + }, { - "description": "Allow an object to move smoothly on the X and/or Y axis following a sine wave.\n\nExample uses:\n- Floating pickups\n- Moveable platforms\n- Enemy movement\n\nProperties:\n- Center of movement, X position\n- Center of movement, Y position\n- Horizontal distance\n- Vertical distance\n- Horizontal speed\n- Horizontal distance\n\nTips:\n- For circular or elliptical movement, the horizontal and vertical speed need to be the same\n- For horizontal movement, set vertical distance to 0\n- For vertical movement, set horizontal distance to 0\n- For figure-8 movement, set horizontal speed to 1/2 of the vertical speed.", - "fullName": "Sine Movement (deprecated)", - "name": "SineMovement", - "objectType": "", + "description": "Smoothly change the color tint of buttons according to their state.", + "fullName": "Button color tint tween", + "name": "ButtonColorTintTween", + "objectType": "Sprite", "eventsFunctions": [ { "fullName": "", "functionType": "Action", - "name": "doStepPreEvents", + "name": "onCreated", "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Set the center of movement to the initial location of the object" - }, + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SineMovement::SineMovement::PropertyCenterPointX" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - }, - { - "type": { - "value": "SineMovement::SineMovement::PropertyCenterPointY" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SineMovement::SineMovement::SetPropertyCenterPointX" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Object.X()" - ] - }, - { - "type": { - "value": "SineMovement::SineMovement::SetPropertyCenterPointY" + "value": "ChangeColor" }, "parameters": [ "Object", - "Behavior", - "=", - "Object.Y()" + "IdleColorTint" ] } ] - }, + } + ], + "parameters": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Move the object" + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "States", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SineMovement::SineMovement::PropertyHorizontalDistance" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "IdleColorTint", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "MettreX" - }, - "parameters": [ - "Object", - "=", - "Object.Behavior::PropertyCenterPointX() + cos(ToRad(Object.Behavior::PropertySineProgressX())) * Object.Behavior::PropertyHorizontalDistance()" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "FocusedColorTint", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "FocusedColorTint", + "" + ] + } + ] + } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "SineMovement::SineMovement::PropertyVerticalDistance" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Pressed\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "PressedColorTint", + "" + ] + } ] } ], - "actions": [ - { - "type": { - "value": "MettreY" - }, - "parameters": [ - "Object", - "=", - "Object.Behavior::PropertyCenterPointY() + sin(ToRad(Object.Behavior::PropertySineProgressY())) * Object.Behavior::PropertyVerticalDistance()" - ] - } - ] - }, + "parameters": [] + } + ], + "parameters": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Increment counters that are used to calculate movement" + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SineMovement::SineMovement::SetPropertySineProgressX" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "Object.Behavior::PropertyHorizontalSpeed() * TimeDelta()" - ] - } - ] - }, + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade in", + "functionType": "Action", + "name": "FadeIn", + "private": true, + "sentence": "_PARAM0_ fade in to _PARAM2_", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "SineMovement::SineMovement::SetPropertySineProgressY" + "value": "Tween::AddObjectColorTween" }, "parameters": [ "Object", - "Behavior", - "+", - "Object.Behavior::PropertyVerticalSpeed() * TimeDelta()" + "Tween", + "\"__ButtonColorTintTween.Fade\"", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", + "no", + "yes" ] } ] @@ -14078,23 +20470,29 @@ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SineMovement::SineMovement", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "color" } ], "objectGroups": [] }, { - "description": "Counter used to change the Y position of the object.", - "fullName": "Sine progress Y", - "functionType": "Expression", - "name": "SineProgressY", - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "fullName": "Fade out", + "functionType": "Action", + "name": "FadeOut", + "private": true, + "sentence": "_PARAM0_ fade out to _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -14102,39 +20500,50 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "Tween::AddObjectColorTween" }, "parameters": [ - "Object.Behavior::PropertySineProgressY()" + "Object", + "Tween", + "\"__ButtonColorTintTween.Fade\"", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", + "no", + "yes" ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SineMovement::SineMovement", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "color" } ], "objectGroups": [] }, { - "description": "Counter used to change the X position of the object.", - "fullName": "Sine progress X", - "functionType": "Expression", - "name": "SineProgressX", - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "description": "the idle state color tint of the object.", + "fullName": "Idle state color tint", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "IdleColorTint", + "sentence": "the idle state color tint", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -14142,39 +20551,40 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertySineProgressX()" + "IdleColorTint" ] } ] } ], "expressionType": { - "type": "expression" + "type": "color" }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SineMovement::SineMovement", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Horizontal speed.", - "fullName": "Horizontal speed ", - "functionType": "Expression", - "name": "HorizontalSpeed", - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleColorTint", + "name": "SetIdleColorTint", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -14182,39 +20592,40 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetStringVariable" }, "parameters": [ - "Object.Behavior::PropertyHorizontalSpeed()" + "IdleColorTint", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SineMovement::SineMovement", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Vertical speed.", - "fullName": "Vertical speed", - "functionType": "Expression", - "name": "VerticalSpeed", - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "description": "the focused state color tint of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state color tint", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FocusedColorTint", + "sentence": "the focused state color tint", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -14222,39 +20633,40 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyVerticalSpeed()" + "FocusedColorTint" ] } ] } ], "expressionType": { - "type": "expression" + "type": "color" }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SineMovement::SineMovement", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Horizontal distance.", - "fullName": "Horizontal distance", - "functionType": "Expression", - "name": "HorizontalDistance", - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedColorTint", + "name": "SetFocusedColorTint", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -14262,39 +20674,40 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetStringVariable" }, "parameters": [ - "Object.Behavior::PropertyHorizontalDistance()" + "FocusedColorTint", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SineMovement::SineMovement", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Vertical distance.", - "fullName": "Vertical distance", - "functionType": "Expression", - "name": "VerticalDistance", - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "description": "the pressed state color tint of the object.", + "fullName": "Pressed state color tint", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "PressedColorTint", + "sentence": "the pressed state color tint", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -14302,39 +20715,40 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyVerticalDistance()" + "PressedColorTint" ] } ] } ], "expressionType": { - "type": "expression" + "type": "color" }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SineMovement::SineMovement", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Center of movement, X position.", - "fullName": "Center of movement, X position", - "functionType": "Expression", - "name": "CenterX", - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedColorTint", + "name": "SetPressedColorTint", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -14342,39 +20756,40 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetStringVariable" }, "parameters": [ - "Object.Behavior::PropertyCenterPointX()" + "PressedColorTint", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SineMovement::SineMovement", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Center of movement, Y position.", - "fullName": "Center of movement, Y position", - "functionType": "Expression", - "name": "CenterY", - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "description": "the fade-in duration of the object.", + "fullName": "Fade-in duration", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeInDuration", + "sentence": "the fade-in duration", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -14385,7 +20800,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyCenterPointY()" + "FadeInDuration" ] } ] @@ -14398,23 +20813,24 @@ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SineMovement::SineMovement", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Set center Y position.", - "fullName": "Set center Y position", - "functionType": "Action", - "name": "SetCenterY", - "sentence": "Set center Y position of _PARAM0_ to _PARAM2_", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInDuration", + "name": "SetFadeInDuration", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -14422,13 +20838,12 @@ "actions": [ { "type": { - "value": "SineMovement::SineMovement::SetPropertyCenterPointY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -14438,28 +20853,25 @@ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SineMovement::SineMovement", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" - }, - { - "description": "Y position", - "name": "Value", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Set center X position.", - "fullName": "Set center X position", - "functionType": "Action", - "name": "SetCenterX", - "sentence": "Set center X position of _PARAM0_ to _PARAM2_", + "description": "the fade-out duration of the object.", + "fullName": "Fade-out duration", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeOutDuration", + "sentence": "the fade-out duration", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -14467,44 +20879,40 @@ "actions": [ { "type": { - "value": "SineMovement::SineMovement::SetPropertyCenterPointX" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" + "FadeOutDuration" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SineMovement::SineMovement", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" - }, - { - "description": "X position", - "name": "Value", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Set horizontal distance.", - "fullName": "Set horizontal distance", - "functionType": "Action", - "name": "SetHorizontalDistance", - "sentence": "Set horizontal distance of _PARAM0_ to _PARAM2_", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutDuration", + "name": "SetFadeOutDuration", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -14512,13 +20920,12 @@ "actions": [ { "type": { - "value": "SineMovement::SineMovement::SetPropertyHorizontalDistance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -14528,28 +20935,25 @@ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SineMovement::SineMovement", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" - }, - { - "description": "Distance", - "name": "Value", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Set vertical distance.", - "fullName": "Set vertical distance", - "functionType": "Action", - "name": "SetVerticalDistance", - "sentence": "Set vertical distance of _PARAM0_ to _PARAM2_", + "description": "the fade-in easing of the object.", + "fullName": "Fade-in easing", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeInEasing", + "sentence": "the fade-in easing", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -14557,44 +20961,41 @@ "actions": [ { "type": { - "value": "SineMovement::SineMovement::SetPropertyVerticalDistance" + "value": "SetReturnString" }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" + "parameters": [ + "FadeInEasing" ] } ] } ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SineMovement::SineMovement", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" - }, - { - "description": "Distance", - "name": "Value", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Set horizontal speed.", - "fullName": "Set horizontal speed", - "functionType": "Action", - "name": "SetHorizontalSpeed", - "sentence": "Set horizontal speed of _PARAM0_ to _PARAM2_", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInEasing", + "name": "SetFadeInEasing", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -14602,13 +21003,12 @@ "actions": [ { "type": { - "value": "SineMovement::SineMovement::SetPropertyHorizontalSpeed" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -14618,28 +21018,25 @@ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SineMovement::SineMovement", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" - }, - { - "description": "Speed (in degrees per second)", - "name": "Value", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Set vertical speed.", - "fullName": "Set vertical speed", - "functionType": "Action", - "name": "SetVerticalSpeed", - "sentence": "Set vertical speed of _PARAM0_ to _PARAM2_", + "description": "the fade-out easing of the object.", + "fullName": "Fade-out easing", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeOutEasing", + "sentence": "the fade-out easing", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -14647,44 +21044,41 @@ "actions": [ { "type": { - "value": "SineMovement::SineMovement::SetPropertyVerticalSpeed" + "value": "SetReturnString" }, "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" + "FadeOutEasing" ] } ] } ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SineMovement::SineMovement", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" - }, - { - "description": "Speed (in degrees per second)", - "name": "Value", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Reset sine progress counters. The object will return to the initial state.", - "fullName": "Reset sine progress counters", - "functionType": "Action", - "name": "ResetSineCounters", - "sentence": "Reset sine progress counters on _PARAM0_", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutEasing", + "name": "SetFadeOutEasing", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -14692,24 +21086,12 @@ "actions": [ { "type": { - "value": "SineMovement::SineMovement::SetPropertySineProgressX" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - }, - { - "type": { - "value": "SineMovement::SineMovement::SetPropertySineProgressY" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", - "0" + "Value" ] } ] @@ -14719,12 +21101,13 @@ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SineMovement::SineMovement", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], @@ -14733,212 +21116,158 @@ ], "propertyDescriptors": [ { - "value": "60", - "type": "Number", - "label": "Horizontal speed, in degrees per second", - "description": "", - "group": "", - "extraInformation": [], - "name": "HorizontalSpeed" + "value": "", + "type": "Behavior", + "label": "Button states", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "name": "ButtonFSM" }, { - "value": "60", - "type": "Number", - "label": "Vertical speed, in degrees per second", - "description": "", - "group": "", - "extraInformation": [], - "name": "VerticalSpeed" + "value": "", + "type": "Behavior", + "label": "Tween", + "extraInformation": [ + "Tween::TweenBehavior" + ], + "name": "Tween" }, { - "value": "100", - "type": "Number", - "label": "Horizontal distance: amplitude of the movement on X axis (0 to deactivate)", - "description": "", - "group": "", - "extraInformation": [], - "name": "HorizontalDistance" + "value": "255;255;255", + "type": "Color", + "label": "Idle state color tint", + "group": "Color", + "name": "IdleColorTint" }, { - "value": "0", - "type": "Number", - "label": "Vertical distance: amplitude of the movement on Y axis (0 to deactivate)", - "description": "", - "group": "", - "extraInformation": [], - "name": "VerticalDistance" + "value": "192;192;192", + "type": "Color", + "label": "Focused state color tint", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Color", + "name": "FocusedColorTint" }, { - "value": "0", - "type": "Number", - "label": "Center of movement, X position", - "description": "", - "group": "", - "extraInformation": [], - "name": "CenterPointX" + "value": "64;64;64", + "type": "Color", + "label": "Pressed state color tint", + "group": "Color", + "name": "PressedColorTint" }, { - "value": "0", + "value": "0.1", "type": "Number", - "label": "Center of movement, Y position", - "description": "", - "group": "", - "extraInformation": [], - "name": "CenterPointY" + "unit": "Second", + "label": "Fade-in duration", + "group": "Speed", + "name": "FadeInDuration" }, { - "value": "0", + "value": "0.2", "type": "Number", - "label": "Counter used to change X position", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "SineProgressX" + "unit": "Second", + "label": "Fade-out duration", + "group": "Speed", + "name": "FadeOutDuration" }, { - "value": "0", - "type": "Number", - "label": "Counter used to change Y position", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "SineProgressY" - } - ], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [] - }, - { - "author": "Silver-Streak, @Bouh, Tristan Rhodes", - "category": "Game mechanic", - "extensionNamespace": "", - "fullName": "Object \"Is On Screen\" Detection", - "gdevelopVersion": "", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLW1vbml0b3Itc2NyZWVuc2hvdCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik05LDZINVYxMEg3VjhIOU0xOSwxMEgxN1YxMkgxNVYxNEgxOU0yMSwxNkgzVjRIMjFNMjEsMkgzQzEuODksMiAxLDIuODkgMSw0VjE2QTIsMiAwIDAsMCAzLDE4SDEwVjIwSDhWMjJIMTZWMjBIMTRWMThIMjFBMiwyIDAgMCwwIDIzLDE2VjRDMjMsMi44OSAyMi4xLDIgMjEsMiIgLz48L3N2Zz4=", - "name": "IsOnScreen", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/monitor-screenshot.svg", - "shortDescription": "This adds a condition to detect if an object is on screen based off its current layer.", - "version": "1.2.1", - "description": [ - "This extension adds conditions to check if an object is located within the visible portion of its layer's camera. The condition also allows for specifying padding to the virtual screen border.", - "", - "Note that this does not take into account any object visibility, such as being hidden or 0 opacity, but can be combined with those existing conditions." - ], - "origin": { - "identifier": "IsOnScreen", - "name": "gdevelop-extension-store" - }, - "tags": [ - "is on screen", - "condition", - "visible", - "hide", - "screen" - ], - "authorIds": [ - "2OwwM8ToR9dx9RJ2sAKTcrLmCB92", - "8Ih1aa8f5gWUp4UB2BdhQ2iXWxJ3", - "gqDaZjCfevOOxBYkK6zlhtZnXCg1" - ], - "dependencies": [], - "globalVariables": [], - "sceneVariables": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [ - { - "description": "This behavior provides a condition to check if the object is located within the visible portion of its layer's camera. The condition also allows for specifying padding to the virtual screen border.\nNote that object visibility, such as being hidden or 0 opacity, is not considered (but you can use those existing conditions in addition to this behavior).", - "fullName": "Is on screen", - "name": "InOnScreen", - "objectType": "", - "eventsFunctions": [ + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-in easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeInEasing" + }, { - "description": "Checks if an object position is within the viewport of its layer.", - "fullName": "Is on screen", - "functionType": "Condition", - "name": "IsOnScreen", - "sentence": "_PARAM0_ is on screen (padded by _PARAM2_ pixels)", - "events": [ - { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "/*", - "Get the object layer, convert the position from this layer to the screen coordinates.", - "Get the point on each side on the object on screen, and compare with the screen area.", - "", - "This way even if the camera has a rotation or custom scale the object is always compared to the screen area.", - "*/", - "", - "", - "// Get the layer of the object.", - "const object = objects[0];", - "const layer = runtimeScene.getLayer(object.getLayer());", - "", - "// Get the aabb of the object on his layer.", - "const aabb = object.getVisibilityAABB();", - "", - "// Get the layer to convert the coordinates of the AABB to the screen coordinates", - "const topLeft = layer.convertInverseCoords(aabb.min[0], aabb.min[1]);", - "const topRight = layer.convertInverseCoords(aabb.max[0], aabb.min[1]);", - "const bottomRight = layer.convertInverseCoords(aabb.max[0], aabb.max[1]);", - "const bottomLeft = layer.convertInverseCoords(aabb.min[0], aabb.max[1]);", - "", - "// Get the points on each side of the object on screen.", - "const posLeftObjectOnScreen = Math.min(topLeft[0], topRight[0], bottomLeft[0], bottomRight[0]);", - "const posRightObjectOnScreen = Math.max(topLeft[0], topRight[0], bottomLeft[0], bottomRight[0]);", - "const posUpObjectOnScreen = Math.min(topLeft[1], topRight[1], bottomLeft[1], bottomRight[1]);", - "const posDownObjectOnScreen = Math.max(topLeft[1], topRight[1], bottomLeft[1], bottomRight[1]);", - "", - "const padding = eventsFunctionContext.getArgument(\"Padding\");", - "", - "if (", - " !(posLeftObjectOnScreen - padding > runtimeScene.getGame().getGameResolutionWidth() ||", - " posUpObjectOnScreen - padding > runtimeScene.getGame().getGameResolutionHeight() ||", - " posRightObjectOnScreen + padding < 0 ||", - " posDownObjectOnScreen + padding < 0", - " )", - ") {", - " eventsFunctionContext.returnValue = true;", - "}", - "" - ], - "parameterObjects": "Object", - "useStrict": true, - "eventsSheetExpanded": true - } + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "IsOnScreen::InOnScreen", - "type": "behavior" - }, - { - "description": "Padding (in pixels)", - "longDescription": "Number of pixels to pad the screen border. Zero by default. A negative value goes inside the screen, a positive value go outside.", - "name": "Padding", - "type": "expression" - } + "name": "FadeOutEasing" + }, + { + "value": "Idle", + "type": "Choice", + "label": "", + "extraInformation": [ + "Idle", + "Focused", + "Pressed" ], - "objectGroups": [ - { - "name": "Group", - "objects": [] - } - ] + "hidden": true, + "name": "PreviousState" } ], - "propertyDescriptors": [], "sharedPropertyDescriptors": [] } ], diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 27aab20fa..46a599793 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -1,9 +1,9 @@ { "firstLayout": "LevelSelection", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 237, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Smoothy", "description": "A Zuma clone to show how to orginize a project with behaviors.", @@ -92,6 +91,7 @@ "puzzle" ], "playableDevices": [ + "mobile", "mobile" ], "extensionProperties": [], @@ -105,7 +105,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/BlueBubble.png", "kind": "image", "metadata": "", @@ -114,7 +113,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/GreenBubble.png", "kind": "image", "metadata": "", @@ -123,7 +121,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/PurpuleBubble.png", "kind": "image", "metadata": "", @@ -132,7 +129,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/RedBubble.png", "kind": "image", "metadata": "", @@ -141,7 +137,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/YellowBubble.png", "kind": "image", "metadata": "", @@ -150,7 +145,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Launcher.png", "kind": "image", "metadata": "", @@ -159,7 +153,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/SideBorder.png", "kind": "image", "metadata": "", @@ -168,7 +161,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/TopBorder.png", "kind": "image", "metadata": "", @@ -177,7 +169,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/NewSprite.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -186,7 +177,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/GreyBubble.png", "kind": "image", "metadata": "", @@ -195,7 +185,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/LevelBackground.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -204,7 +193,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/LevelBackground.png", "kind": "image", "metadata": "", @@ -213,7 +201,22 @@ "userAdded": true }, { - "alwaysLoaded": false, + "file": "assets/Hole.png", + "kind": "image", + "metadata": "", + "name": "assets\\Hole.png", + "smoothed": true, + "userAdded": true + }, + { + "file": "preview.png", + "kind": "image", + "metadata": "", + "name": "preview.png", + "smoothed": true, + "userAdded": true + }, + { "file": "assets/Grey Button_Hovered.png", "kind": "image", "metadata": "", @@ -221,12 +224,11 @@ "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/b43e0035dca80ea2fad5c5d65de926dae0185038e5f9cb21d5f20234f30d1c76_Grey Button_Hovered.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/b43e0035dca80ea2fad5c5d65de926dae0185038e5f9cb21d5f20234f30d1c76_Grey Button_Hovered.png", "name": "Grey Button_Hovered.png" } }, { - "alwaysLoaded": false, "file": "assets/Grey Button_Idle.png", "kind": "image", "metadata": "", @@ -234,12 +236,11 @@ "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/da7fc2efa0882eb5dfa0266315f2483c2f68d86a6751dc309ea9e9d0dd4759ba_Grey Button_Idle.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/da7fc2efa0882eb5dfa0266315f2483c2f68d86a6751dc309ea9e9d0dd4759ba_Grey Button_Idle.png", "name": "Grey Button_Idle.png" } }, { - "alwaysLoaded": false, "file": "assets/Grey Button_Pressed.png", "kind": "image", "metadata": "", @@ -247,27 +248,9 @@ "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/49c35e14af0e1f7aae407455cb944de96328955870e5f1500f63723ad879a42e_Grey Button_Pressed.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/49c35e14af0e1f7aae407455cb944de96328955870e5f1500f63723ad879a42e_Grey Button_Pressed.png", "name": "Grey Button_Pressed.png" } - }, - { - "alwaysLoaded": false, - "file": "assets/Hole.png", - "kind": "image", - "metadata": "", - "name": "assets\\Hole.png", - "smoothed": true, - "userAdded": true - }, - { - "alwaysLoaded": false, - "file": "preview.png", - "kind": "image", - "metadata": "", - "name": "preview.png", - "smoothed": true, - "userAdded": true } ], "resourceFolders": [] @@ -2373,19 +2356,19 @@ "fillOpacity": 255, "outlineSize": 32, "outlineOpacity": 255, + "absoluteCoordinates": true, + "clearBetweenFrames": false, + "antialiasing": "none", "fillColor": { - "b": 27, + "r": 54, "g": 46, - "r": 54 + "b": 27 }, "outlineColor": { - "b": 27, + "r": 54, "g": 46, - "r": 54 - }, - "absoluteCoordinates": true, - "clearBetweenFrames": false, - "antialiasing": "none" + "b": 27 + } }, { "adaptCollisionMaskAutomatically": false, @@ -2456,6 +2439,8 @@ "particleAngleRandomness2": 0, "particleBlue1": 51, "particleBlue2": 0, + "particleColor1": "255;51;51", + "particleColor2": "255;255;0", "particleGravityX": 0, "particleGravityY": 0, "particleGreen1": 51, @@ -2498,6 +2483,27 @@ "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": "0000", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 20, + "color": "255;255;255" } }, { @@ -2519,6 +2525,27 @@ "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": "3:00", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 20, + "color": "255;255;255" } }, { @@ -3974,6 +4001,7 @@ "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -3996,6 +4024,10 @@ } ], "behaviorsSharedData": [ + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, { "name": "BoardBubbleBehavior", "type": "Smoothy::BoardBubbleBehavior" @@ -4008,10 +4040,18 @@ "name": "ButtonFSM", "type": "ButtonStates::ButtonFSM" }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, { "name": "FireBullet", "type": "FireBullet::FireBullet" }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, { "name": "GutterBehavior", "type": "Smoothy::GutterBehavior" @@ -4024,6 +4064,18 @@ "name": "ObjectStack", "type": "ObjectStack::ObjectStack" }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, { "name": "SpeedPathMovement", "type": "CurvedMovement::SpeedPathMovement" @@ -4031,6 +4083,10 @@ { "name": "SpwanerBehavior", "type": "Smoothy::SpwanerBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" } ] }, @@ -4232,19 +4288,19 @@ "fillOpacity": 255, "outlineSize": 11, "outlineOpacity": 255, + "absoluteCoordinates": true, + "clearBetweenFrames": false, + "antialiasing": "none", "fillColor": { - "b": 27, + "r": 54, "g": 46, - "r": 54 + "b": 27 }, "outlineColor": { - "b": 27, + "r": 54, "g": 46, - "r": 54 - }, - "absoluteCoordinates": true, - "clearBetweenFrames": false, - "antialiasing": "none" + "b": 27 + } }, { "adaptCollisionMaskAutomatically": false, @@ -4754,6 +4810,7 @@ "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -4776,10 +4833,34 @@ } ], "behaviorsSharedData": [ + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, { "name": "ButtonFSM", "type": "ButtonStates::ButtonFSM" }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, { "name": "SpeedPathMovement", "type": "CurvedMovement::SpeedPathMovement" @@ -4944,6 +5025,27 @@ "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": "Score", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 60, + "color": "255;255;255" } }, { @@ -4973,6 +5075,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "SubmitButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button", "variables": [], "effects": [], "behaviors": [], @@ -4982,7 +5085,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "🡲" }, "childrenContent": { "Hovered": { @@ -5010,7 +5114,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "🡲", + "string": "", "font": "", "textAlignment": "center", "characterSize": 60, @@ -5018,6 +5122,27 @@ "b": 79, "g": 72, "r": 72 + }, + "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": 60, + "color": "72;72;79" } }, "Pressed": { @@ -5036,6 +5161,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "MainMenuButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button", "variables": [], "effects": [], "behaviors": [], @@ -5045,7 +5171,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Menu" }, "childrenContent": { "Hovered": { @@ -5073,7 +5200,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Menu", + "string": "", "font": "", "textAlignment": "center", "characterSize": 60, @@ -5081,6 +5208,27 @@ "b": 79, "g": 72, "r": 72 + }, + "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": 60, + "color": "72;72;79" } }, "Pressed": { @@ -5099,6 +5247,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "RestartButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button", "variables": [], "effects": [], "behaviors": [], @@ -5108,7 +5257,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Restart" }, "childrenContent": { "Hovered": { @@ -5144,6 +5294,27 @@ "b": 79, "g": 72, "r": 72 + }, + "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": "Restart", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 60, + "color": "72;72;79" } }, "Pressed": { @@ -5583,6 +5754,7 @@ "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -5599,6 +5771,7 @@ "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -5620,13 +5793,37 @@ "effects": [] } ], - "behaviorsSharedData": [] + "behaviorsSharedData": [ + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + } + ] } ], "externalEvents": [ { "associatedLayout": "Game", - "lastChangeTimeStamp": 0, "name": "UpdateRemainingColors", "events": [ { @@ -5718,6 +5915,7 @@ "category": "Advanced", "extensionNamespace": "", "fullName": "Extended math support", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZ1bmN0aW9uLXZhcmlhbnQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNDIsNS4yOUMxMS4zMiw1LjE5IDEwLjM1LDYgMTAuMjUsNy4xMUwxMCwxMEgxMi44MlYxMkg5LjgyTDkuMzgsMTcuMDdDOS4xOCwxOS4yNyA3LjI0LDIwLjkgNS4wNCwyMC43QzMuNzksMjAuNTkgMi42NiwxOS45IDIsMTguODNMMy41LDE3LjMzQzMuODMsMTguMzggNC45NiwxOC45NyA2LDE4LjYzQzYuNzgsMTguMzkgNy4zMywxNy43IDcuNCwxNi44OUw3LjgyLDEySDQuODJWMTBIOEw4LjI3LDYuOTNDOC40Niw0LjczIDEwLjM5LDMuMSAxMi42LDMuMjhDMTMuODYsMy4zOSAxNSw0LjA5IDE1LjY2LDUuMTdMMTQuMTYsNi42N0MxMy45MSw1LjkgMTMuMjMsNS4zNiAxMi40Miw1LjI5TTIyLDEzLjY1TDIwLjU5LDEyLjI0TDE3Ljc2LDE1LjA3TDE0LjkzLDEyLjI0TDEzLjUsMTMuNjVMMTYuMzUsMTYuNUwxMy41LDE5LjMxTDE0LjkzLDIwLjcyTDE3Ljc2LDE3Ljg5TDIwLjU5LDIwLjcyTDIyLDE5LjMxTDE5LjE3LDE2LjVMMjIsMTMuNjVaIiAvPjwvc3ZnPg==", "name": "ExtendedMath", @@ -5761,6 +5959,8 @@ "dt0tRnf2kHWJnjkrpnzTzNj9Yc63" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Returns a term from the Fibonacci sequence.", @@ -6637,12 +6837,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", + "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.4.4", + "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.", "", @@ -6659,7 +6860,15 @@ "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": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -6701,11 +6910,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -6714,11 +6922,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -6752,12 +6959,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -6767,11 +6974,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -6788,12 +6996,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -6816,12 +7024,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -6831,11 +7039,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -6846,20 +7053,20 @@ }, "parameters": [ "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -6891,11 +7098,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -6917,31 +7123,30 @@ }, "parameters": [ "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -6983,11 +7188,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -7002,11 +7206,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -7035,20 +7238,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -7057,11 +7260,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -7073,20 +7275,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -7095,11 +7297,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -7112,20 +7313,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -7134,11 +7335,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -7150,20 +7350,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -7172,11 +7372,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -7204,18 +7403,17 @@ }, "parameters": [ "", - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -7227,11 +7425,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -7240,11 +7437,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -7257,11 +7453,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -7269,11 +7464,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -7282,11 +7476,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -7369,22 +7562,20 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -7419,11 +7610,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -7468,11 +7658,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -7517,11 +7706,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -7566,11 +7754,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -7592,11 +7779,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -7641,11 +7827,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -7690,11 +7875,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -7743,7 +7927,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -7774,8 +7958,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -7783,8 +7965,6 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", "extraInformation": [ "Idle", "Hovered", @@ -7799,9 +7979,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -7809,9 +7986,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -7819,9 +7993,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -7829,9 +8000,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -7841,10 +8009,267 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 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": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": 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": "", @@ -7874,7 +8299,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -7886,7 +8311,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -7894,14 +8319,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()" ] }, { @@ -7929,63 +8364,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" ] } ] @@ -8024,18 +8422,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": [ @@ -8097,12 +8524,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -8137,10 +8565,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -8149,7 +8577,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -8157,7 +8585,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -8168,10 +8596,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -8195,10 +8623,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -8215,10 +8644,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -8247,12 +8677,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -8292,10 +8723,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -8324,12 +8756,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -8381,12 +8814,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -8418,126 +8852,49 @@ } ], "parameters": [] - }, + } + ], + "parameters": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsIdle" }, - "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": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteButton::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" - ] - } + "parameters": [ + "Idle", + "ButtonFSM", + "" ] } ], - "parameters": [] + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] } ], "parameters": [ @@ -8548,122 +8905,64 @@ "type": "object" } ], - "objectGroups": [ + "objectGroups": [] + }, + { + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", + "events": [ { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "name": "Hovered" - }, + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsClicked" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ { - "name": "Pressed" + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] } ] } - ] + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] }, { - "description": "Check if the button is not used.", - "fullName": "Is idle", + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", "functionType": "Condition", - "name": "IsIdle", - "sentence": "_PARAM0_ is idle", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::IsIdle" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the button was just clicked.", - "fullName": "Is clicked", - "functionType": "Condition", - "name": "IsClicked", - "sentence": "_PARAM0_ is clicked", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsClicked" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the cursor is hovered over the button.", - "fullName": "Is hovered", - "functionType": "Condition", - "name": "IsHovered", - "sentence": "_PARAM0_ is hovered", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsHovered" + "value": "PanelSpriteButton::ButtonFSM::IsHovered" }, "parameters": [ "Idle", @@ -8785,6 +9084,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -8793,21 +9093,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", - "GetArgumentAsString(\"LabelText\")" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -8822,17 +9114,17 @@ }, { "description": "Text", - "name": "LabelText", + "name": "Value", "type": "string" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", "sentence": "", "events": [ { @@ -8841,18 +9133,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Label", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -8864,12 +9156,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", @@ -8877,17 +9168,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Label.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -8900,65 +9191,35 @@ "objectGroups": [] }, { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" - ] - }, + "conditions": [ { "type": { - "value": "TextObject::WrappingWidth" + "value": "BooleanVariable" }, "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" + "ShouldActivate", + "True", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "SetCenterY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } + "Idle", + "ButtonFSM", + "yes" ] } ] @@ -8968,10 +9229,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", + "ShouldActivate", + "True", "" ] } @@ -8979,12 +9242,12 @@ "actions": [ { "type": { - "value": "MettreY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" + "Idle", + "ButtonFSM", + "no" ] } ] @@ -8996,126 +9259,123 @@ "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - } - ], - "objectGroups": [ + }, { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" } - ] + ], + "objectGroups": [] }, { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BehaviorActivated" }, "parameters": [ - "\"ShouldActivate\"" + "Idle", + "ButtonFSM" ] } ], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnBoolean" }, "parameters": [ - "Idle", - "ButtonFSM", - "yes" + "True" ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"ShouldActivate\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnNumber" }, "parameters": [ - "Idle", - "ButtonFSM", - "no" + "LabelOffset" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - }, - { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "BehaviorActivated" + "value": "SetCenterY" }, "parameters": [ - "Idle", - "ButtonFSM" + "Label", + "+", + "Value - LabelOffset" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "LabelOffset", + "=", + "Value" ] } ] @@ -9134,180 +9394,317 @@ ], "propertyDescriptors": [ { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "PressedLabelOffsetY" + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" }, { - "value": "0", + "value": "0.25", "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "name": "LeftPadding" + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" }, { "value": "0", "type": "Number", - "label": "Right padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "name": "RightPadding" + "unit": "Pixel", + "label": "Label offset on Y axis when pressed", + "group": "States", + "name": "PressedLabelOffsetY" }, { "value": "0", "type": "Number", - "label": "Top padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "name": "TopPadding" + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" }, { - "value": "0", - "type": "Number", - "label": "Bottom padding", - "description": "", - "group": "Padding", + "value": "", + "type": "Choice", + "label": "", "extraInformation": [ - "Label" + "Label.Text=LabelText" ], - "hidden": false, - "name": "BottomPadding" - }, - { - "value": "0.25", - "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "HoveredFadeOutDuration" + "hidden": true, + "name": "_PropertyMapping" } ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "variants": [ + { + "areaMaxX": 256, + "areaMaxY": 106, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "assetStoreOriginalName": "Grey Button", + "name": "Grey Button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "Button", + "font": "", + "textAlignment": "center", + "characterSize": 60, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "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": "Button", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 60, + "color": "72;72;79" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "assetStoreId": "", + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": false, + "topMargin": 32, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] } ], - "effects": [], - "behaviors": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + ], + "layers": [ { - "name": "Tween", - "type": "Tween::TweenBehavior" + "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": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 80, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "d52675e5-4b81-4535-8e9a-d392ed684d6e", + "width": 240, + "x": 8, + "y": 48, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Idle" - }, - { - "objectName": "Hovered" - }, - { - "objectName": "Pressed" - } - ] - } + ] } ] }, @@ -9316,6 +9713,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Time formatting", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNsb2NrLWRpZ2l0YWwiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMiw2QTIsMiAwIDAsMCAwLDhWMTZBMiwyIDAgMCwwIDIsMThIMjJBMiwyIDAgMCwwIDI0LDE2VjhBMiwyIDAgMCwwIDIyLDZNMiw4SDIyVjE2SDJNMyw5VjEwLjVINi4yNUwzLDE1SDQuNzVMOCwxMC41VjlNOS4yNSw5VjEwLjVIMTAuNzVWOU0xMiw5VjEwLjVIMTMuNVYxNUgxNVY5TTE3LDlBMSwxIDAgMCwwIDE2LDEwVjE0QTEsMSAwIDAsMCAxNywxNUgyMEExLDEgMCAwLDAgMjEsMTRWMTBBMSwxIDAgMCwwIDIwLDlNMTcuNSwxMC41SDE5LjVWMTMuNUgxNy41TTkuMjUsMTMuNVYxNUgxMC43NVYxMy41IiAvPjwvc3ZnPg==", "name": "TimeFormatter", @@ -9346,6 +9744,8 @@ "2OwwM8ToR9dx9RJ2sAKTcrLmCB92" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Format time in seconds to HH:MM:SS.", @@ -9434,6 +9834,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Button states and effects", + "gdevelopVersion": "", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtdGFwLWJ1dHRvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMyA1QzE1LjIxIDUgMTcgNi43OSAxNyA5QzE3IDEwLjUgMTYuMiAxMS43NyAxNSAxMi40NlYxMS4yNEMxNS42MSAxMC42OSAxNiA5Ljg5IDE2IDlDMTYgNy4zNCAxNC42NiA2IDEzIDZTMTAgNy4zNCAxMCA5QzEwIDkuODkgMTAuMzkgMTAuNjkgMTEgMTEuMjRWMTIuNDZDOS44IDExLjc3IDkgMTAuNSA5IDlDOSA2Ljc5IDEwLjc5IDUgMTMgNU0yMCAyMC41QzE5Ljk3IDIxLjMyIDE5LjMyIDIxLjk3IDE4LjUgMjJIMTNDMTIuNjIgMjIgMTIuMjYgMjEuODUgMTIgMjEuNTdMOCAxNy4zN0w4Ljc0IDE2LjZDOC45MyAxNi4zOSA5LjIgMTYuMjggOS41IDE2LjI4SDkuN0wxMiAxOFY5QzEyIDguNDUgMTIuNDUgOCAxMyA4UzE0IDguNDUgMTQgOVYxMy40N0wxNS4yMSAxMy42TDE5LjE1IDE1Ljc5QzE5LjY4IDE2LjAzIDIwIDE2LjU2IDIwIDE3LjE0VjIwLjVNMjAgMkg0QzIuOSAyIDIgMi45IDIgNFYxMkMyIDEzLjExIDIuOSAxNCA0IDE0SDhWMTJMNCAxMkw0IDRIMjBMMjAgMTJIMThWMTRIMjBWMTMuOTZMMjAuMDQgMTRDMjEuMTMgMTQgMjIgMTMuMDkgMjIgMTJWNEMyMiAyLjkgMjEuMTEgMiAyMCAyWiIgLz48L3N2Zz4=", "name": "ButtonStates", @@ -9468,6 +9869,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -10581,8 +10984,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -10590,8 +10991,6 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", "extraInformation": [ "Idle", "Hovered", @@ -10606,9 +11005,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -10616,9 +11012,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -10626,9 +11019,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -10636,9 +11026,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -11151,34 +11538,25 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], - "hidden": false, "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], - "hidden": false, "name": "Effect" }, { "value": "", "type": "String", "label": "Idle state effect", - "description": "", "group": "Effects", - "extraInformation": [], - "hidden": false, "name": "IdleEffect" }, { @@ -11187,18 +11565,13 @@ "label": "Focused state effect", "description": "The state is Focused when the button is hovered or held outside.", "group": "Effects", - "extraInformation": [], - "hidden": false, "name": "FocusedEffect" }, { "value": "", "type": "String", "label": "Pressed state effect", - "description": "", "group": "Effects", - "extraInformation": [], - "hidden": false, "name": "PressedEffect" } ], @@ -11624,22 +11997,16 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], - "hidden": false, "name": "ButtonFSM" }, { "value": "Idle", "type": "String", "label": "Idle state animation name", - "description": "", "group": "Animation", - "extraInformation": [], - "hidden": false, "name": "IdleAnimationName" }, { @@ -11648,18 +12015,13 @@ "label": "Focused state animation name", "description": "The state is Focused when the button is hovered or held outside.", "group": "Animation", - "extraInformation": [], - "hidden": false, "name": "FocusedAnimationName" }, { "value": "Pressed", "type": "String", "label": "Pressed state animation name", - "description": "", "group": "Animation", - "extraInformation": [], - "hidden": false, "name": "PressedAnimationName" } ], @@ -13062,34 +13424,25 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], - "hidden": false, "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], - "hidden": false, "name": "Effect" }, { "value": "Effect", "type": "String", "label": "Effect name", - "description": "", "group": "Effect", - "extraInformation": [], - "hidden": false, "name": "EffectName" }, { @@ -13098,18 +13451,13 @@ "label": "Effect parameter", "description": "The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", "group": "Effect", - "extraInformation": [], - "hidden": false, "name": "EffectProperty" }, { "value": "0", "type": "Number", "label": "Idle effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "IdleValue" }, { @@ -13118,25 +13466,19 @@ "label": "Focused effect parameter value", "description": "The state is Focused when the button is hovered or held outside.", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "FocusedValue" }, { "value": "0", "type": "Number", "label": "Pressed effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "PressedValue" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -13173,14 +13515,12 @@ "easeFrom", "easeTo" ], - "hidden": false, "name": "FadeInEasing" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -13217,7 +13557,6 @@ "easeFrom", "easeTo" ], - "hidden": false, "name": "FadeOutEasing" }, { @@ -13225,10 +13564,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "FadeInDuration" }, { @@ -13236,18 +13572,13 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "FadeOutDuration" }, { "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "Idle", "Focused", @@ -13260,9 +13591,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenInitialValue" }, @@ -13270,9 +13598,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTargetedValue" }, @@ -13280,9 +13605,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTime" }, @@ -13290,8 +13612,6 @@ "value": "NoTween", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "NoTween", "FadeIn", @@ -13304,9 +13624,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "EffectValue" } @@ -14283,24 +14600,18 @@ "value": "", "type": "Behavior", "label": "Button states behavior (required)", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], - "hidden": false, "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween behavior (required)", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], - "hidden": false, "name": "Tween" }, { @@ -14308,10 +14619,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Idle state size scale", - "description": "", "group": "Size", - "extraInformation": [], - "hidden": false, "name": "IdleScale" }, { @@ -14321,8 +14629,6 @@ "label": "Focused state size scale", "description": "The state is Focused when the button is hovered or held outside.", "group": "Size", - "extraInformation": [], - "hidden": false, "name": "FocusedScale" }, { @@ -14330,10 +14636,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "FadeInDuration" }, { @@ -14341,10 +14644,7 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "FadeOutDuration" }, { @@ -14352,17 +14652,13 @@ "type": "Number", "unit": "Dimensionless", "label": "Pressed state size scale", - "description": "", "group": "Size", - "extraInformation": [], - "hidden": false, "name": "PressedScale" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -14399,14 +14695,12 @@ "easeFrom", "easeTo" ], - "hidden": false, "name": "FadeInEasing" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -14443,15 +14737,12 @@ "easeFrom", "easeTo" ], - "hidden": false, "name": "FadeOutEasing" }, { "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "Idle", "Focused", @@ -15429,34 +15720,25 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], - "hidden": false, "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], - "hidden": false, "name": "Tween" }, { "value": "255;255;255", "type": "Color", "label": "Idle state color tint", - "description": "", "group": "Color", - "extraInformation": [], - "hidden": false, "name": "IdleColorTint" }, { @@ -15465,18 +15747,13 @@ "label": "Focused state color tint", "description": "The state is Focused when the button is hovered or held outside.", "group": "Color", - "extraInformation": [], - "hidden": false, "name": "FocusedColorTint" }, { "value": "64;64;64", "type": "Color", "label": "Pressed state color tint", - "description": "", "group": "Color", - "extraInformation": [], - "hidden": false, "name": "PressedColorTint" }, { @@ -15484,10 +15761,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "FadeInDuration" }, { @@ -15495,17 +15769,13 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "FadeOutDuration" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -15542,14 +15812,12 @@ "easeFrom", "easeTo" ], - "hidden": false, "name": "FadeInEasing" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", "extraInformation": [ "linear", @@ -15586,15 +15854,12 @@ "easeFrom", "easeTo" ], - "hidden": false, "name": "FadeOutEasing" }, { "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", "extraInformation": [ "Idle", "Focused", @@ -15614,6 +15879,7 @@ "category": "", "extensionNamespace": "", "fullName": "Smoothy", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "", "name": "Smoothy", @@ -15624,6 +15890,8 @@ "tags": [], "authorIds": [], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Create a level according to the \"Levels\" global variable.", @@ -19687,12 +19955,9 @@ "value": "", "type": "Behavior", "label": "Speed path movement", - "description": "", - "group": "", "extraInformation": [ "CurvedMovement::SpeedPathMovement" ], - "hidden": false, "name": "SpeedPathMovement" }, { @@ -19700,10 +19965,6 @@ "type": "Number", "unit": "Pixel", "label": "Bubble size", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "BubbleSize" }, { @@ -19711,10 +19972,6 @@ "type": "Number", "unit": "Second", "label": "Insertion duration", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "InsertionDuration" } ], @@ -22770,8 +23027,6 @@ "value": "Idle", "type": "Choice", "label": "Tail state", - "description": "", - "group": "", "extraInformation": [ "Idle", "JustSplit", @@ -22789,8 +23044,6 @@ "value": "Idle", "type": "Choice", "label": "Head state", - "description": "", - "group": "", "extraInformation": [ "Idle", "JustSplit", @@ -22808,9 +23061,6 @@ "type": "Number", "unit": "Dimensionless", "label": "Tail combo level", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TailComboLevel" }, @@ -22819,9 +23069,6 @@ "type": "Number", "unit": "Dimensionless", "label": "Head combo level", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HeadComboLevel" }, @@ -22830,10 +23077,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Rewinding maximum speed", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "RewindingSpeedMax" }, { @@ -22841,10 +23085,7 @@ "type": "Number", "unit": "PixelAcceleration", "label": "Rewinding acceleration", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "RewindingAcceleration" }, { @@ -22854,8 +23095,6 @@ "label": "Rewind delay", "description": "Before the hit-stop", "group": "Hit-stop", - "extraInformation": [], - "hidden": false, "name": "RewindDelay" }, { @@ -22863,10 +23102,7 @@ "type": "Number", "unit": "Second", "label": "Hit-stop duration before rewinding", - "description": "", "group": "Hit-stop", - "extraInformation": [], - "hidden": false, "name": "HitStopBeforeRewindDuration" }, { @@ -22874,10 +23110,7 @@ "type": "Number", "unit": "Second", "label": "Hit-stop at the end of a combo", - "description": "", "group": "Hit-stop", - "extraInformation": [], - "hidden": false, "name": "HitStopAfterComboDuration" }, { @@ -22885,10 +23118,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Impact speed gain at each combo level", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "ImpactSpeedGain" }, { @@ -22896,10 +23126,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Impact speed maximum", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "ImpactSpeedMax" } ], @@ -24200,12 +24427,9 @@ "value": "", "type": "Behavior", "label": "Object stack", - "description": "", - "group": "", "extraInformation": [ "ObjectStack::ObjectStack" ], - "hidden": false, "name": "ObjectStack" }, { @@ -24213,19 +24437,14 @@ "type": "Number", "unit": "Dimensionless", "label": "Color count", - "description": "", "group": "Colors", - "extraInformation": [], - "hidden": false, "name": "ColorCount" }, { "value": "", "type": "String", "label": "Path name", - "description": "", "group": "Colors", - "extraInformation": [], "hidden": true, "name": "PathName" }, @@ -24234,10 +24453,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Spawned bubbles count before 1st new color", - "description": "", "group": "Colors", - "extraInformation": [], - "hidden": false, "name": "FirstNewColorBubbleCount" }, { @@ -24245,10 +24461,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Spawned bubbles count before 2nd new color", - "description": "", "group": "Colors", - "extraInformation": [], - "hidden": false, "name": "SecondNewColorBubbleCount" }, { @@ -24256,10 +24469,6 @@ "type": "Number", "unit": "Pixel", "label": "Bubble size", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "BubbleSize" } ], @@ -24268,9 +24477,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "SpawnedBubbleCount" } @@ -25499,12 +25705,9 @@ "value": "", "type": "Behavior", "label": "Object stack", - "description": "", - "group": "", "extraInformation": [ "ObjectStack::ObjectStack" ], - "hidden": false, "name": "ObjectStack" }, { @@ -25512,9 +25715,6 @@ "type": "Number", "unit": "Dimensionless", "label": "Pushing queue progression", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PushingQueueProgression" }, @@ -25522,9 +25722,6 @@ "value": "", "type": "String", "label": "Path name", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PathName" }, @@ -25532,9 +25729,6 @@ "value": "true", "type": "Boolean", "label": "Start boost is enabled", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsStartBoostEnabled" }, @@ -25543,10 +25737,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Beginning push speed", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "BeginningSpeed" }, { @@ -25554,10 +25745,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "End push speed", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "EndSpeed" }, { @@ -25565,9 +25753,6 @@ "type": "Number", "unit": "Dimensionless", "label": "Identifier", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Identifier" }, @@ -25576,10 +25761,7 @@ "type": "Number", "unit": "Second", "label": "Time to get to full speed", - "description": "", "group": "Acceleration", - "extraInformation": [], - "hidden": false, "name": "AccelerationDuration" }, { @@ -25587,10 +25769,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Beggining fill ratio", - "description": "", "group": "Start boost", - "extraInformation": [], - "hidden": false, "name": "BeginningFillRatio" }, { @@ -25598,10 +25777,7 @@ "type": "Number", "unit": "PixelAcceleration", "label": "Start boost deceleration", - "description": "", "group": "Start boost", - "extraInformation": [], - "hidden": false, "name": "StartBoostDeceleration" }, { @@ -25609,20 +25785,14 @@ "type": "Number", "unit": "PixelSpeed", "label": "Safe zone end push speed", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "SafeZoneEndSpeed" }, { "value": "0", "type": "Number", "label": "Safe zone end length ratio", - "description": "", "group": "Speed zone", - "extraInformation": [], - "hidden": false, "name": "SafeZoneEndLengthRatio" }, { @@ -25630,20 +25800,14 @@ "type": "Number", "unit": "PixelSpeed", "label": "Normal zone end push speed", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "NormalZoneEndSpeed" }, { "value": "0.87", "type": "Number", "label": "Normal zone end length ratio", - "description": "", "group": "Speed zone", - "extraInformation": [], - "hidden": false, "name": "NormalZoneEndLengthRatio" }, { @@ -25651,10 +25815,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Near death zone beginning push speed", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "NearDeathZoneBeginningSpeed" }, { @@ -25662,10 +25823,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Near death zone beginning length ratio", - "description": "", "group": "Speed zone", - "extraInformation": [], - "hidden": false, "name": "NearDeathZoneBeginningLengthRatio" }, { @@ -25673,9 +25831,6 @@ "type": "Number", "unit": "Dimensionless", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PushingQueueFarestProgression" } @@ -25811,10 +25966,6 @@ "type": "Number", "unit": "Pixel", "label": "Bubble size", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "BubbleSize" } ], @@ -25828,6 +25979,7 @@ "category": "Game mechanic", "extensionNamespace": "", "fullName": "Object Stack", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTE4LDI5SDhjLTIuMiwwLTQtMS44LTQtNFY3YzAtMi4yLDEuOC00LDQtNGgxMGMyLjIsMCw0LDEuOCw0LDR2MThDMjIsMjcuMiwyMC4yLDI5LDE4LDI5eiIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIyLDYuNGw1LDNjMS45LDEuMSwyLjUsMy42LDEuMyw1LjVMMjIsMjUuNSIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI4LDE2bDAuNSwwLjdjMS4zLDEuOCwwLjgsNC4zLTEsNS42bC01LjcsNCIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjgiIHkxPSI3IiB4Mj0iOCIgeTI9IjkiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjIzIiB4Mj0iMTgiIHkyPSIyNSIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTEwLjQsMTYuNmMwLjUsMC41LDEuMywwLjUsMS44LDBsMC44LTAuOGwwLjgsMC44YzAuNSwwLjUsMS4zLDAuNSwxLjgsMGMwLjUtMC41LDAuNS0xLjQsMC0xLjlsLTAuOC0wLjhMMTMsMTINCglsLTEuOCwxLjlsLTAuOCwwLjhDOS45LDE1LjIsOS45LDE2LjEsMTAuNCwxNi42eiIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjEyIiB5MT0iMjAiIHgyPSIxNCIgeTI9IjIwIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMTMiIHkxPSIxNyIgeDI9IjEzIiB5Mj0iMTkiLz4NCjwvc3ZnPg0K", "name": "ObjectStack", @@ -25864,6 +26016,8 @@ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Define helper classes JavaScript code.", @@ -26987,6 +27141,7 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Curved movement", + "gdevelopVersion": "", "helpPath": "/extensions/curved-movement/details/", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO30NCgkuc3Qye2ZpbGw6bm9uZTtzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6MjtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLWRhc2hhcnJheTo2LDY7fQ0KCS5zdDN7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtZGFzaGFycmF5OjQsNDt9DQoJLnN0NHtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7fQ0KCS5zdDV7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1kYXNoYXJyYXk6My4xMDgxLDMuMTA4MTt9DQoJDQoJCS5zdDZ7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDtzdHJva2UtZGFzaGFycmF5OjQsMzt9DQo8L3N0eWxlPg0KPHJlY3QgeD0iMyIgeT0iMjUiIGNsYXNzPSJzdDAiIHdpZHRoPSI0IiBoZWlnaHQ9IjQiLz4NCjxyZWN0IHg9IjI1IiB5PSIzIiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSI0Ii8+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjUsNUwyNSw1QzE0LDUsNSwxNCw1LDI1djAiLz4NCjwvc3ZnPg0K", "name": "CurvedMovement", @@ -27028,6 +27183,8 @@ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "fullName": "", @@ -31813,10 +31970,6 @@ "value": "true", "type": "Boolean", "label": "Rotate object", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Rotation" }, { @@ -31824,39 +31977,24 @@ "type": "Number", "unit": "DegreeAngle", "label": "Rotation offset", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "RotationOffset" }, { "value": "", "type": "Boolean", "label": "Flip on X to go back", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "FlipXToGoBack" }, { "value": "", "type": "Boolean", "label": "Flip on Y to go back", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "FlipYToGoBack" }, { "value": "1", "type": "Number", "label": "Speed scale", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "SpeedScale" }, @@ -31864,9 +32002,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PathOriginX" }, @@ -31874,9 +32009,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PathOriginY" }, @@ -31884,9 +32016,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Target" }, @@ -31894,9 +32023,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Origin" }, @@ -31904,9 +32030,6 @@ "value": "", "type": "String", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PathName" }, @@ -31914,9 +32037,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Duration" }, @@ -31924,9 +32044,6 @@ "value": "", "type": "String", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Easing" }, @@ -31934,9 +32051,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DrawingElementIndex" }, @@ -31944,9 +32058,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "X" }, @@ -31954,9 +32065,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Y" }, @@ -31964,9 +32072,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PathAngle" }, @@ -31974,9 +32079,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PathScale" }, @@ -31984,9 +32086,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RepetitionCount" }, @@ -31994,9 +32093,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldGoBack" }, @@ -32004,9 +32100,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldLoop" }, @@ -32014,9 +32107,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RepetitionDoneCount" }, @@ -32024,9 +32114,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsGoingBack" }, @@ -32034,9 +32121,6 @@ "value": "0", "type": "Number", "label": "Pause duration before going back", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PauseDurationBeforeGoingBack" }, @@ -32044,9 +32128,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DrawingPathOriginX" }, @@ -32054,9 +32135,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DrawingPathOriginY" }, @@ -32064,9 +32142,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DebugLineStrokeWidth" }, @@ -32074,13 +32149,10 @@ "value": "Top-Down", "type": "Choice", "label": "Viewpoint", - "description": "", - "group": "", "extraInformation": [ "Top-Down", "Isometry 2:1 (26.565°)" ], - "hidden": false, "name": "Viewpoint" } ], @@ -34709,10 +34781,7 @@ "value": "true", "type": "Boolean", "label": "Rotate object", - "description": "", "group": "Rotation", - "extraInformation": [], - "hidden": false, "name": "Rotation" }, { @@ -34720,19 +34789,13 @@ "type": "Number", "unit": "DegreeAngle", "label": "Rotation offset", - "description": "", "group": "Rotation", - "extraInformation": [], - "hidden": false, "name": "RotationOffset" }, { "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Speed" }, @@ -34740,9 +34803,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PathOriginX" }, @@ -34750,9 +34810,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PathOriginY" }, @@ -34760,9 +34817,6 @@ "value": "", "type": "String", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PathName" }, @@ -34770,9 +34824,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TargetedSpeed" }, @@ -34780,9 +34831,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Acceleration" }, @@ -34790,9 +34838,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DrawingElementIndex" }, @@ -34800,9 +34845,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "X" }, @@ -34810,9 +34852,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Y" }, @@ -34820,9 +34859,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PathAngle" }, @@ -34830,9 +34866,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PathScale" }, @@ -34840,9 +34873,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RepetitionCount" }, @@ -34850,9 +34880,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldLoop" }, @@ -34860,9 +34887,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DrawingPathOriginX" }, @@ -34870,9 +34894,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DrawingPathOriginY" }, @@ -34880,9 +34901,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DebugLineStrokeWidth" }, @@ -34890,9 +34908,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousSpeed" }, @@ -34900,9 +34915,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentLength" }, @@ -34910,9 +34922,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsLookingBack" }, @@ -34920,13 +34929,10 @@ "value": "Top-Down", "type": "Choice", "label": "Viewpoint", - "description": "", - "group": "", "extraInformation": [ "Top-Down", "Isometry 2:1 (26.565°)" ], - "hidden": false, "name": "Viewpoint" } ], @@ -34940,6 +34946,7 @@ "category": "Game mechanic", "extensionNamespace": "", "fullName": "Fire bullets", + "gdevelopVersion": "", "helpPath": "/extensions/fire-bullet/details", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWJ1bGxldCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNCwyMkgxMFYyMUgxNFYyMk0xMywxMFY3SDExVjEwTDEwLDExLjVWMjBIMTRWMTEuNUwxMywxME0xMiwyQzEyLDIgMTEsMyAxMSw1VjZIMTNWNUMxMyw1IDEzLDMgMTIsMloiIC8+PC9zdmc+", "name": "FireBullet", @@ -34983,6 +34990,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -39836,18 +39845,12 @@ "unit": "Second", "label": "Firing cooldown", "description": "Objects cannot shoot while firing cooldown is active", - "group": "", - "extraInformation": [], - "hidden": false, "name": "FireCooldown" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HasJustFired" }, @@ -39858,8 +39861,6 @@ "label": "Firing arc", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], - "hidden": false, "name": "FiringArc" }, { @@ -39868,8 +39869,6 @@ "label": "Number of bullets created at once (Multi-Fire)", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], - "hidden": false, "name": "BulletQuantity" }, { @@ -39879,27 +39878,18 @@ "label": "Angle variance", "description": "Make imperfect aim (Range: 0 to 180 degrees)", "group": "Firing variance", - "extraInformation": [], - "hidden": false, "name": "AngleVariance" }, { "value": "true", "type": "Boolean", "label": "Rotate bullets to match their trajectory", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "RotateBullet" }, { "value": "0", "type": "Number", "label": "Ammo quantity (current)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "AmmoQuantity" }, @@ -39909,8 +39899,6 @@ "label": "Shots per reload ", "description": "Use 0 to disable reloading", "group": "Reload", - "extraInformation": [], - "hidden": false, "name": "ShotsPerReload" }, { @@ -39920,27 +39908,19 @@ "label": "Reloading duration", "description": "Objects cannot shoot while reloading is in progress", "group": "Reload", - "extraInformation": [], - "hidden": false, "name": "ReloadDuration" }, { "value": "0", "type": "Number", "label": "Max ammo ", - "description": "", "group": "Ammo", - "extraInformation": [], - "hidden": false, "name": "MaxAmmo" }, { "value": "0", "type": "Number", "label": "Shots before next reload", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShotsBeforeNextReload" }, @@ -39949,8 +39929,6 @@ "type": "Number", "label": "Total shots fired", "description": "Regardless of how many bullets are created, only 1 shot will be counted per frame", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalShotsFired" }, @@ -39958,9 +39936,6 @@ "value": "0", "type": "Number", "label": "Total bullets created", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalBulletsCreated" }, @@ -39968,19 +39943,13 @@ "value": "0", "type": "Number", "label": "Starting ammo", - "description": "", "group": "Ammo", - "extraInformation": [], - "hidden": false, "name": "StartingAmmo" }, { "value": "0", "type": "Number", "label": "Total reloads completed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalReloadsCompleted" }, @@ -39988,19 +39957,13 @@ "value": "true", "type": "Boolean", "label": "Unlimited ammo", - "description": "", "group": "Ammo", - "extraInformation": [], - "hidden": false, "name": "UnlimitedAmmo" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ReloadInProgress" }, @@ -40010,17 +39973,12 @@ "label": "Heat increase per shot (Range: 0 to 1)", "description": " Object is overheated when Heat reaches 1", "group": "Overheat", - "extraInformation": [], - "hidden": false, "name": "HeatIncreasePerShot" }, { "value": "0", "type": "Number", "label": "Heat level (Range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HeatLevel" }, @@ -40028,10 +39986,7 @@ "value": "true", "type": "Boolean", "label": "Reload automatically", - "description": "", "group": "Reload", - "extraInformation": [], - "hidden": false, "name": "AutomaticReloading" }, { @@ -40041,18 +39996,13 @@ "label": "Overheat duration", "description": "Object cannot shoot while overheat duration is active", "group": "Overheat", - "extraInformation": [], - "hidden": false, "name": "OverheatDuration" }, { "value": "0.1", "type": "Number", "label": "Linear cooling rate (per second)", - "description": "", "group": "Overheat", - "extraInformation": [], - "hidden": false, "name": "LinearCoolingRate" }, { @@ -40065,7 +40015,6 @@ "Linear", "Exponential" ], - "hidden": false, "name": "ExponentialCoolingRate" }, { @@ -40074,7 +40023,6 @@ "label": "Layer the bullets are created on", "description": "Base layer by default", "group": "Shooting configuration", - "extraInformation": [], "hidden": true, "name": "BulletLayer" }, @@ -40082,9 +40030,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RandomizedAngle" }, @@ -40095,8 +40040,6 @@ "label": "Bullet speed variance", "description": "Bullet speed will be adjusted by a random value within this range", "group": "Firing variance", - "extraInformation": [], - "hidden": false, "name": "BulletSpeedVariance" } ], @@ -40110,6 +40053,7 @@ "category": "", "extensionNamespace": "", "fullName": "", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXRpbWVyLW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIsMjBBNyw3IDAgMCwxIDUsMTNBNyw3IDAgMCwxIDEyLDZBNyw3IDAgMCwxIDE5LDEzQTcsNyAwIDAsMSAxMiwyME0xOS4wMyw3LjM5TDIwLjQ1LDUuOTdDMjAsNS40NiAxOS41NSw1IDE5LjA0LDQuNTZMMTcuNjIsNkMxNi4wNyw0Ljc0IDE0LjEyLDQgMTIsNEE5LDkgMCAwLDAgMywxM0E5LDkgMCAwLDAgMTIsMjJDMTcsMjIgMjEsMTcuOTcgMjEsMTNDMjEsMTAuODggMjAuMjYsOC45MyAxOS4wMyw3LjM5TTExLDE0SDEzVjhIMTFNMTUsMUg5VjNIMTVWMVoiIC8+PC9zdmc+", "name": "AdvancedTimer", @@ -40120,6 +40064,8 @@ "tags": [], "authorIds": [], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "fullName": "", @@ -40211,6 +40157,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/sokoban/sokoban.json b/examples/sokoban/sokoban.json index fedc7071d..d8b081b7f 100644 --- a/examples/sokoban/sokoban.json +++ b/examples/sokoban/sokoban.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 212, + "build": 237, "major": 5, - "minor": 4, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Sokoban", "description": "Sokoban is a puzzle video game where the player pushes boxes around, trying to get them to specific locations. The game was designed in 1981 by Hiroyuki Imabayashi, and first published in December 1982.\n\nThis example shows a how to push multiple objects in a row, and how to check if the player has won.", @@ -82,7 +81,9 @@ "authorIds": [], "authorUsernames": [], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -94,7 +95,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Marker.png", "kind": "image", "metadata": "", @@ -103,7 +103,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Player.png", "kind": "image", "metadata": "", @@ -112,7 +111,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Crate.png", "kind": "image", "metadata": "", @@ -121,7 +119,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Crate_Dark.png", "kind": "image", "metadata": "", @@ -130,7 +127,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Ground.png", "kind": "image", "metadata": "", @@ -139,7 +135,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Goal.png", "kind": "image", "metadata": "", @@ -148,7 +143,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Directional Arrow Full Circle.png", "kind": "image", "metadata": "", @@ -157,7 +151,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Crate.png", "kind": "image", "metadata": "", @@ -166,7 +159,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/D-pad up.png", "kind": "image", "metadata": "", @@ -175,7 +167,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/D-pad right.png", "kind": "image", "metadata": "", @@ -184,7 +175,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/D-pad left.png", "kind": "image", "metadata": "", @@ -193,7 +183,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/D-pad bottom.png", "kind": "image", "metadata": "", @@ -202,7 +191,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "preview.png", "kind": "image", "metadata": "", @@ -211,7 +199,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/desktop-icon-512.png", "kind": "image", "metadata": "", @@ -220,7 +207,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/android-icon-192.png", "kind": "image", "metadata": "", @@ -229,7 +215,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/android-icon-144.png", "kind": "image", "metadata": "", @@ -238,7 +223,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/android-icon-96.png", "kind": "image", "metadata": "", @@ -247,7 +231,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/android-icon-72.png", "kind": "image", "metadata": "", @@ -256,7 +239,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/android-icon-48.png", "kind": "image", "metadata": "", @@ -265,7 +247,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/android-icon-36.png", "kind": "image", "metadata": "", @@ -274,7 +255,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/android-windowSplashScreenAnimatedIcon.png", "kind": "image", "metadata": "", @@ -283,7 +263,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-1024.png", "kind": "image", "metadata": "", @@ -292,7 +271,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-180.png", "kind": "image", "metadata": "", @@ -301,7 +279,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-167.png", "kind": "image", "metadata": "", @@ -310,7 +287,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-152.png", "kind": "image", "metadata": "", @@ -319,7 +295,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-144.png", "kind": "image", "metadata": "", @@ -328,7 +303,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-120.png", "kind": "image", "metadata": "", @@ -337,7 +311,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-114.png", "kind": "image", "metadata": "", @@ -346,7 +319,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-100.png", "kind": "image", "metadata": "", @@ -355,7 +327,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-87.png", "kind": "image", "metadata": "", @@ -364,7 +335,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-80.png", "kind": "image", "metadata": "", @@ -373,7 +343,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-76.png", "kind": "image", "metadata": "", @@ -382,7 +351,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-72.png", "kind": "image", "metadata": "", @@ -391,7 +359,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-60.png", "kind": "image", "metadata": "", @@ -400,7 +367,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-58.png", "kind": "image", "metadata": "", @@ -409,7 +375,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-57.png", "kind": "image", "metadata": "", @@ -418,7 +383,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-50.png", "kind": "image", "metadata": "", @@ -427,7 +391,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-40.png", "kind": "image", "metadata": "", @@ -436,7 +399,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-29.png", "kind": "image", "metadata": "", @@ -445,7 +407,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ios-icon-20.png", "kind": "image", "metadata": "", @@ -454,7 +415,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Tilemap_Obstacles.png", "kind": "image", "metadata": "", @@ -492,7 +452,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, - "zoomFactor": 0.44009971693712, + "zoomFactor": 0.6552209578218773, "windowMask": false }, "objectsGroups": [ @@ -1041,17 +1001,39 @@ "stringProperties": [], "initialVariables": [] }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Tilemap_Obstacles", + "persistentUuid": "c4fee2f8-d72c-4240-81d4-7b712918b663", + "width": 0, + "x": 192, + "y": 0, + "zOrder": 29, + "numberProperties": [], + "stringProperties": [ + { + "name": "tilemap", + "value": "{\"tileWidth\":64,\"tileHeight\":64,\"dimX\":14,\"dimY\":11,\"layers\":[{\"id\":0,\"alpha\":1,\"tiles\":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0],[0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0],[0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0],[0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0],[0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0],[0,0,0,0,-1,-1,-1,-1,-1,-1,0,0,0,0],[-1,-1,-1,0,-1,-1,-1,-1,-1,-1,0,-1,-1,-1],[-1,-1,-1,0,-1,-1,-1,-1,-1,-1,0,-1,-1,-1],[-1,-1,-1,0,-1,-1,-1,-1,-1,-1,0,-1,-1,-1],[-1,-1,-1,0,0,0,0,0,0,0,0,-1,-1,-1]]}]}" + } + ], + "initialVariables": [] + }, { "angle": 0, "customSize": true, + "depth": 0, "height": 64, - "layer": "UI", + "layer": "", "name": "ResetGameButton", - "persistentUuid": "4f937247-5be0-402e-b98b-aa71faccf81f", + "persistentUuid": "9bef18c8-aceb-4f80-bdbb-1f5aede04d79", "width": 64, "x": 1184, "y": 32, - "zOrder": 24, + "zOrder": 30, "numberProperties": [], "stringProperties": [], "initialVariables": [] @@ -1059,14 +1041,15 @@ { "angle": 0, "customSize": true, + "depth": 0, "height": 64, - "layer": "UI", + "layer": "", "name": "UpKey", - "persistentUuid": "7f9ec114-54b1-4a2f-a657-b6d8c20b6b66", + "persistentUuid": "401486f4-2b71-4215-a565-2569ef30f99e", "width": 64, "x": 1024, "y": 512, - "zOrder": 25, + "zOrder": 31, "numberProperties": [], "stringProperties": [], "initialVariables": [] @@ -1074,14 +1057,15 @@ { "angle": 0, "customSize": true, + "depth": 0, "height": 64, - "layer": "UI", + "layer": "", "name": "RightKey", - "persistentUuid": "b41cf219-6650-4a4b-ba45-fddea758bce4", + "persistentUuid": "2a19d946-49a0-4f5a-8441-4a14f1ae4dd3", "width": 64, "x": 1088, "y": 576, - "zOrder": 26, + "zOrder": 32, "numberProperties": [], "stringProperties": [], "initialVariables": [] @@ -1089,14 +1073,15 @@ { "angle": 0, "customSize": true, + "depth": 0, "height": 64, - "layer": "UI", + "layer": "", "name": "LeftKey", - "persistentUuid": "ab307751-4610-4a3e-b234-547840a3d8be", + "persistentUuid": "4b0bd4c0-372f-486b-889d-4e3cd74a0a5b", "width": 64, "x": 960, "y": 576, - "zOrder": 27, + "zOrder": 33, "numberProperties": [], "stringProperties": [], "initialVariables": [] @@ -1104,38 +1089,18 @@ { "angle": 0, "customSize": true, + "depth": 0, "height": 64, - "layer": "UI", + "layer": "", "name": "DownKey", - "persistentUuid": "9606689e-e16d-4aa7-8f45-d14b325d5b8b", + "persistentUuid": "932a29e9-fc31-4940-8aea-f9c1c289aeae", "width": 64, "x": 1024, "y": 640, - "zOrder": 28, + "zOrder": 34, "numberProperties": [], "stringProperties": [], "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "keepRatio": true, - "layer": "", - "name": "Tilemap_Obstacles", - "persistentUuid": "c4fee2f8-d72c-4240-81d4-7b712918b663", - "width": 0, - "x": 192, - "y": 0, - "zOrder": 29, - "numberProperties": [], - "stringProperties": [ - { - "name": "tilemap", - "value": "{\"tileWidth\":64,\"tileHeight\":64,\"dimX\":14,\"dimY\":11,\"layers\":[{\"id\":0,\"alpha\":1,\"tiles\":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0],[0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0],[0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0],[0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0],[0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0],[0,0,0,0,-1,-1,-1,-1,-1,-1,0,0,0,0],[-1,-1,-1,0,-1,-1,-1,-1,-1,-1,0,-1,-1,-1],[-1,-1,-1,0,-1,-1,-1,-1,-1,-1,0,-1,-1,-1],[-1,-1,-1,0,-1,-1,-1,-1,-1,-1,0,-1,-1,-1],[-1,-1,-1,0,0,0,0,0,0,0,0,-1,-1,-1]]}]}" - } - ], - "initialVariables": [] } ], "objects": [ @@ -1411,84 +1376,6 @@ } ] }, - { - "assetStoreId": "", - "name": "ResetGameButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "HoveredFadeOutDuration": 0 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\Directional Arrow Full Circle.png", - "tiled": false, - "topMargin": 0, - "width": 32 - }, - "Idle": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\Directional Arrow Full Circle.png", - "tiled": false, - "topMargin": 0, - "width": 32 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 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": "", - "characterSize": 20, - "color": "0;0;0" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\Directional Arrow Full Circle.png", - "tiled": false, - "topMargin": 0, - "width": 32 - } - } - }, { "assetStoreId": "", "bold": false, @@ -1539,404 +1426,448 @@ "text": "You Win!", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 200, "color": "255;255;255" } }, { "assetStoreId": "", - "name": "UpKey", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "HoveredFadeOutDuration": 0 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\D-pad up.png", - "tiled": false, - "topMargin": 0, - "width": 32 - }, - "Idle": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\D-pad up.png", - "tiled": false, - "topMargin": 0, - "width": 32 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 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": "", - "characterSize": 20, - "color": "0;0;0" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\D-pad up.png", - "tiled": false, - "topMargin": 0, - "width": 32 + "name": "Tilemap_Obstacles", + "type": "TileMap::SimpleTileMap", + "variables": [ + { + "folded": true, + "name": "Direction", + "persistentUuid": "bb6344a8-7522-4fdb-8d66-437cae6ad0c3", + "type": "string", + "value": "None" } - } - }, - { - "assetStoreId": "", - "name": "RightKey", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], + ], "effects": [], "behaviors": [], "content": { - "HoveredFadeOutDuration": 0 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\D-pad right.png", - "tiled": false, - "topMargin": 0, - "width": 32 - }, - "Idle": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\D-pad right.png", - "tiled": false, - "topMargin": 0, - "width": 32 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 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": "", - "characterSize": 20, - "color": "0;0;0" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\D-pad right.png", - "tiled": false, - "topMargin": 0, - "width": 32 - } + "atlasImage": "assets\\Tilemap_Obstacles.png", + "rowCount": 2, + "columnCount": 3, + "tileSize": 64, + "tilesWithHitBox": "0,1,2,5,4,3" } }, { + "adaptCollisionMaskAutomatically": true, "assetStoreId": "", - "name": "LeftKey", - "type": "PanelSpriteButton::PanelSpriteButton", + "name": "ResetGameButton", + "type": "Sprite", + "updateIfNotVisible": false, "variables": [], "effects": [], - "behaviors": [], - "content": { - "HoveredFadeOutDuration": 0 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\D-pad left.png", - "tiled": false, - "topMargin": 0, - "width": 32 - }, - "Idle": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\D-pad left.png", - "tiled": false, - "topMargin": 0, - "width": 32 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 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": "", - "characterSize": 20, - "color": "0;0;0" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\D-pad left.png", - "tiled": false, - "topMargin": 0, - "width": 32 + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 2.0247e-320 } - } + ], + "animations": [ + { + "name": "default", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets\\Directional Arrow Full Circle.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 5, + "y": 5 + }, + { + "x": 143, + "y": 5 + }, + { + "x": 143, + "y": 142 + }, + { + "x": 5, + "y": 142 + } + ] + ] + } + ] + } + ] + } + ] }, { + "adaptCollisionMaskAutomatically": true, "assetStoreId": "", - "name": "DownKey", - "type": "PanelSpriteButton::PanelSpriteButton", + "name": "UpKey", + "type": "Sprite", + "updateIfNotVisible": false, "variables": [], "effects": [], - "behaviors": [], - "content": { - "HoveredFadeOutDuration": 0 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\D-pad bottom.png", - "tiled": false, - "topMargin": 0, - "width": 32 - }, - "Idle": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\D-pad bottom.png", - "tiled": false, - "topMargin": 0, - "width": 32 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 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": "", - "characterSize": 20, - "color": "0;0;0" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\D-pad bottom.png", - "tiled": false, - "topMargin": 0, - "width": 32 + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 2.0247e-320 } - } + ], + "animations": [ + { + "name": "default", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets\\D-pad up.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 61, + "y": 0 + }, + { + "x": 61, + "y": 76 + }, + { + "x": 0, + "y": 76 + } + ] + ] + } + ] + } + ] + } + ] }, { + "adaptCollisionMaskAutomatically": true, "assetStoreId": "", - "name": "Tilemap_Obstacles", - "type": "TileMap::SimpleTileMap", - "variables": [ + "name": "RightKey", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ { - "folded": true, - "name": "Direction", - "persistentUuid": "bb6344a8-7522-4fdb-8d66-437cae6ad0c3", - "type": "string", - "value": "None" + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 2.0247e-320 } ], - "effects": [], - "behaviors": [], - "content": { - "atlasImage": "assets\\Tilemap_Obstacles.png", - "rowCount": 2, - "columnCount": 3, - "tileSize": 64, - "tilesWithHitBox": "0,1,2,5,4,3" - } - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Player" - }, - { - "objectName": "Box" - }, - { - "objectName": "Marker" - }, - { - "objectName": "Floor" - }, - { - "objectName": "Goal" - }, - { - "objectName": "ResetGameButton" - }, - { - "objectName": "YouWin" - }, - { - "objectName": "UpKey" - }, - { - "objectName": "RightKey" - }, - { - "objectName": "LeftKey" - }, - { - "objectName": "DownKey" - }, - { - "objectName": "Tilemap_Obstacles" - } - ] - }, - "events": [ - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "MobileControls", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "animations": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, + "name": "default", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets\\D-pad right.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 1, + "y": 0 + }, + { + "x": 75, + "y": 0 + }, + { + "x": 75, + "y": 61 + }, + { + "x": 1, + "y": 61 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "LeftKey", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 2.0247e-320 + } + ], + "animations": [ + { + "name": "default", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets\\D-pad left.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 75, + "y": 0 + }, + { + "x": 75, + "y": 61 + }, + { + "x": 0, + "y": 61 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "DownKey", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 2.0247e-320 + } + ], + "animations": [ + { + "name": "default", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets\\D-pad bottom.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 61, + "y": 1 + }, + { + "x": 61, + "y": 75 + }, + { + "x": 0, + "y": 75 + } + ] + ] + } + ] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Player" + }, + { + "objectName": "Box" + }, + { + "objectName": "Marker" + }, + { + "objectName": "Floor" + }, + { + "objectName": "Goal" + }, + { + "objectName": "ResetGameButton" + }, + { + "objectName": "YouWin" + }, + { + "objectName": "UpKey" + }, + { + "objectName": "RightKey" + }, + { + "objectName": "LeftKey" + }, + { + "objectName": "DownKey" + }, + { + "objectName": "Tilemap_Obstacles" + } + ] + }, + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "MobileControls", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, "textG": 0, "textR": 0 }, @@ -2016,10 +1947,11 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "value": "ButtonStates::ButtonFSM::IsPressed" }, "parameters": [ "OnScreenButtons", + "ButtonFSM", "" ] } @@ -2056,19 +1988,29 @@ "subInstructions": [ { "type": { - "value": "KeyPressed" + "value": "KeyFromTextPressed" }, "parameters": [ "", - "a" + "\"a\"" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "\"Left\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" }, "parameters": [ "LeftKey", + "ButtonFSM", "" ] } @@ -2119,19 +2061,29 @@ "subInstructions": [ { "type": { - "value": "KeyPressed" + "value": "KeyFromTextPressed" }, "parameters": [ "", - "s" + "\"s\"" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "\"Down\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" }, "parameters": [ "DownKey", + "ButtonFSM", "" ] } @@ -2182,19 +2134,29 @@ "subInstructions": [ { "type": { - "value": "KeyPressed" + "value": "KeyFromTextPressed" }, "parameters": [ "", - "w" + "\"w\"" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "\"Up\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" }, "parameters": [ "UpKey", + "ButtonFSM", "" ] } @@ -2245,19 +2207,29 @@ "subInstructions": [ { "type": { - "value": "KeyPressed" + "value": "KeyFromTextPressed" }, "parameters": [ "", - "d" + "\"d\"" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "\"Right\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" }, "parameters": [ "RightKey", + "ButtonFSM", "" ] } @@ -2720,10 +2692,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + "value": "ButtonStates::ButtonFSM::IsClicked" }, "parameters": [ "ResetGameButton", + "ButtonFSM", "" ] } @@ -2885,6 +2858,10 @@ "name": "Animation", "type": "AnimatableCapability::AnimatableBehavior" }, + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM" + }, { "name": "Effect", "type": "EffectCapability::EffectBehavior" @@ -2919,6 +2896,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K", "name": "PanelSpriteButton", @@ -3389,42 +3367,6091 @@ ] } ] - }, + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "Object.Behavior::PropertyTouchId()" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", + "functionType": "Condition", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed outside with mouse or touch.", + "fullName": "Is held outside", + "functionType": "Condition", + "name": "IsPressedOutside", + "sentence": "_PARAM0_ is held outside", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the touch id that is using the button or 0 if none.", + "fullName": "Touch id", + "functionType": "ExpressionAndCondition", + "name": "TouchId", + "sentence": "the touch id", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyTouchId()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "Should check hovering", + "hidden": true, + "name": "ShouldCheckHovering" + }, + { + "value": "Idle", + "type": "Choice", + "label": "State", + "extraInformation": [ + "Idle", + "Hovered", + "PressedInside", + "PressedOutside", + "Validated" + ], + "hidden": true, + "name": "State" + }, + { + "value": "0", + "type": "Number", + "label": "Touch id", + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Boolean", + "label": "Touch is inside", + "hidden": true, + "name": "TouchIsInside" + }, + { + "value": "", + "type": "Boolean", + "label": "Mouse is inside", + "hidden": true, + "name": "MouseIsInside" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "Index" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [ + { + "areaMaxX": 64, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "Button", + "description": "A button that can be customized.", + "fullName": "Button (panel sprite)", + "isUsingLegacyInstancesRenderer": true, + "name": "PanelSpriteButton", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Text", + "font": "", + "textAlignment": "", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 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": "Text", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [], + "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": [], + "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": "Create one background instance for of each state.\nOnly the instance for the current state is shown." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Idle", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Hovered", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Pressed", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Hovered", + "=", + "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", + "=", + "2" + ] + }, + { + "type": { + "value": "TextObject::SetWrapping" + }, + "parameters": [ + "Label", + "yes" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply states", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Show the right background accordingly to the new state." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Label", + "=", + "Object.CenterWithPaddingY()" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Idle", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + }, + "parameters": [ + "Object", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::AddObjectOpacityTween" + }, + "parameters": [ + "Hovered", + "Tween", + "\"Fadeout\"", + "0", + "\"linear\"", + "Object.PropertyHoveredFadeOutDuration() * 1000", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + }, + "parameters": [ + "Object", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteObject::Opacity" + }, + "parameters": [ + "Hovered", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "PanelSpriteObject::SetOpacity" + }, + "parameters": [ + "Hovered", + "=", + "255" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" + }, + "parameters": [ + "Object", + "ButtonFSM" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Label", + "=", + "Object.CenterWithPaddingY()" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Idle" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Hovered", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Hovered", + "Tween", + "\"Fadeout\"" + ] + }, + { + "type": { + "value": "PanelSpriteObject::SetOpacity" + }, + "parameters": [ + "Hovered", + "=", + "255" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Label", + "=", + "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Idle" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Pressed", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Label", + "=", + "Object.CenterWithPaddingY()" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Idle" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Hovered", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] + } + ] + } + ], + "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": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Idle", + "Width", + "=", + "Object.Width()" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Idle", + "Height", + "=", + "Object.Height()" + ] + }, + { + "type": { + "value": "PanelSpriteButton::Scale" + }, + "parameters": [ + "Object", + "=", + "1" + ] + }, + { + "type": { + "value": "PanelSpriteObject::Width" + }, + "parameters": [ + "Background", + "=", + "Idle.Variable(Width)" + ] + }, + { + "type": { + "value": "PanelSpriteObject::Height" + }, + "parameters": [ + "Background", + "=", + "Idle.Variable(Height)" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsIdle" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsClicked" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsHovered" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", + "functionType": "Condition", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsFocused" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsPressed" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Change the text of the button label.", + "fullName": "Label text", + "functionType": "Action", + "name": "SetLabelText", + "sentence": "Change the text of _PARAM0_ to _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Label", + "=", + "GetArgumentAsString(\"LabelText\")" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + }, + { + "description": "", + "name": "LabelText", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Return the label text.", + "fullName": "Label text", + "functionType": "StringExpression", + "name": "LabelText", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Label.String()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "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": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "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", + "functionType": "Action", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldActivate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldActivate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + }, + { + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BehaviorActivated" + }, + "parameters": [ + "Idle", + "ButtonFSM" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "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": "0", + "type": "Number", + "label": "Left padding", + "group": "Padding", + "extraInformation": [ + "Label" + ], + "name": "LeftPadding" + }, + { + "value": "0", + "type": "Number", + "label": "Right padding", + "group": "Padding", + "extraInformation": [ + "Label" + ], + "name": "RightPadding" + }, + { + "value": "0", + "type": "Number", + "label": "Top padding", + "group": "Padding", + "extraInformation": [ + "Label" + ], + "name": "TopPadding" + }, + { + "value": "0", + "type": "Number", + "label": "Bottom padding", + "group": "Padding", + "extraInformation": [ + "Label" + ], + "name": "BottomPadding" + }, + { + "value": "0.25", + "type": "Number", + "label": "Hovered fade out duration (in seconds)", + "name": "HoveredFadeOutDuration" + } + ], + "variants": [] + } + ] + }, + { + "author": "", + "category": "User interface", + "extensionNamespace": "", + "fullName": "Button states and effects", + "gdevelopVersion": ">=5.5.222", + "helpPath": "/objects/button", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtdGFwLWJ1dHRvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMyA1QzE1LjIxIDUgMTcgNi43OSAxNyA5QzE3IDEwLjUgMTYuMiAxMS43NyAxNSAxMi40NlYxMS4yNEMxNS42MSAxMC42OSAxNiA5Ljg5IDE2IDlDMTYgNy4zNCAxNC42NiA2IDEzIDZTMTAgNy4zNCAxMCA5QzEwIDkuODkgMTAuMzkgMTAuNjkgMTEgMTEuMjRWMTIuNDZDOS44IDExLjc3IDkgMTAuNSA5IDlDOSA2Ljc5IDEwLjc5IDUgMTMgNU0yMCAyMC41QzE5Ljk3IDIxLjMyIDE5LjMyIDIxLjk3IDE4LjUgMjJIMTNDMTIuNjIgMjIgMTIuMjYgMjEuODUgMTIgMjEuNTdMOCAxNy4zN0w4Ljc0IDE2LjZDOC45MyAxNi4zOSA5LjIgMTYuMjggOS41IDE2LjI4SDkuN0wxMiAxOFY5QzEyIDguNDUgMTIuNDUgOCAxMyA4UzE0IDguNDUgMTQgOVYxMy40N0wxNS4yMSAxMy42TDE5LjE1IDE1Ljc5QzE5LjY4IDE2LjAzIDIwIDE2LjU2IDIwIDE3LjE0VjIwLjVNMjAgMkg0QzIuOSAyIDIgMi45IDIgNFYxMkMyIDEzLjExIDIuOSAxNCA0IDE0SDhWMTJMNCAxMkw0IDRIMjBMMjAgMTJIMThWMTRIMjBWMTMuOTZMMjAuMDQgMTRDMjEuMTMgMTQgMjIgMTMuMDkgMjIgMTJWNEMyMiAyLjkgMjEuMTEgMiAyMCAyWiIgLz48L3N2Zz4=", + "name": "ButtonStates", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", + "shortDescription": "Use any object as a button and change appearance according to user interactions.", + "version": "1.3.1", + "description": [ + "Use the \"Button states\" behavior to track user interactions with an object, including:", + "", + "- Hovered", + "- Pressed", + "- Clicked", + "- Idle", + "", + "Add additional behaviors to make juicy buttons with animated responses to user input:", + "", + "- Size", + "- Color", + "- Animation", + "- Object effects" + ], + "origin": { + "identifier": "ButtonStates", + "name": "gdevelop-extension-store" + }, + "tags": [ + "ui", + "button" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Use objects as buttons.", + "fullName": "Button states", + "name": "ButtonFSM", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Finite state machine", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The \"Validated\" state only last one frame." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure the cursor position is only checked once per frame." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "+", + "1" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reset the state of the button.", + "fullName": "Reset state", + "functionType": "Action", + "name": "ResetState", + "private": true, + "sentence": "Reset the button state of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", + "functionType": "Condition", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed outside with mouse or touch.", + "fullName": "Is held outside", + "functionType": "Condition", + "name": "IsPressedOutside", + "sentence": "_PARAM0_ is held outside", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the touch id that is using the button or 0 if none.", + "fullName": "Touch id", + "functionType": "ExpressionAndCondition", + "name": "TouchId", + "sentence": "the touch id", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TouchId" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "Should check hovering", + "hidden": true, + "name": "ShouldCheckHovering" + }, + { + "value": "Idle", + "type": "Choice", + "label": "State", + "extraInformation": [ + "Idle", + "Hovered", + "PressedInside", + "PressedOutside", + "Validated" + ], + "hidden": true, + "name": "State" + }, + { + "value": "0", + "type": "Number", + "label": "Touch id", + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Boolean", + "label": "Touch is inside", + "hidden": true, + "name": "TouchIsInside" + }, + { + "value": "", + "type": "Boolean", + "label": "Mouse is inside", + "hidden": true, + "name": "MouseIsInside" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "Index" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Enable effects on buttons based on their state.", + "fullName": "Button object effects", + "name": "ButtonObjectEffects", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "IdleEffect", + "yes" + ] + }, + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "FocusedEffect", + "no" + ] + }, + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "PressedEffect", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "States", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "IdleEffect", + "no" + ] + }, + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "FocusedEffect", + "no" + ] + }, + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "PressedEffect", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "IdleEffect", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "IdleEffect", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "FocusedEffect", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "FocusedEffect", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PressedEffect", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "PressedEffect", + "yes" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the idle state effect of the object.", + "fullName": "Idle state effect", + "functionType": "ExpressionAndCondition", + "group": "Button object effects configuration", + "name": "IdleEffect", + "sentence": "the idle state effect", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "IdleEffect" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleEffect", + "name": "SetIdleEffect", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleEffect", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the focused state effect of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state effect", + "functionType": "ExpressionAndCondition", + "group": "Button object effects configuration", + "name": "FocusedEffect", + "sentence": "the focused state effect", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "FocusedEffect" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedEffect", + "name": "SetFocusedEffect", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "FocusedEffect", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed state effect of the object.", + "fullName": "Pressed state effect", + "functionType": "ExpressionAndCondition", + "group": "Button object effects configuration", + "name": "PressedEffect", + "sentence": "the pressed state effect", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "PressedEffect" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedEffect", + "name": "SetPressedEffect", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PressedEffect", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Button states", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "name": "ButtonFSM" + }, + { + "value": "", + "type": "Behavior", + "label": "Effect capability", + "extraInformation": [ + "EffectCapability::EffectBehavior" + ], + "name": "Effect" + }, + { + "value": "", + "type": "String", + "label": "Idle state effect", + "group": "Effects", + "name": "IdleEffect" + }, + { + "value": "", + "type": "String", + "label": "Focused state effect", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Effects", + "name": "FocusedEffect" + }, + { + "value": "", + "type": "String", + "label": "Pressed state effect", + "group": "Effects", + "name": "PressedEffect" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Change the animation of buttons according to their state.", + "fullName": "Button animation", + "name": "ButtonAnimationName", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "IdleAnimationName" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Change based on state", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "IdleAnimationName" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "FocusedAnimationName" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "PressedAnimationName" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the idle state animation name of the object.", + "fullName": "Idle state animation name", + "functionType": "ExpressionAndCondition", + "group": "Button animation configuration", + "name": "IdleAnimationName", + "sentence": "the idle state animation name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "IdleAnimationName" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleAnimationName", + "name": "SetIdleAnimationName", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleAnimationName", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the focused state animation name of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state animation name", + "functionType": "ExpressionAndCondition", + "group": "Button animation configuration", + "name": "FocusedAnimationName", + "sentence": "the focused state animation name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "FocusedAnimationName" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedAnimationName", + "name": "SetFocusedAnimationName", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "FocusedAnimationName", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed state animation name of the object.", + "fullName": "Pressed state animation name", + "functionType": "ExpressionAndCondition", + "group": "Button animation configuration", + "name": "PressedAnimationName", + "sentence": "the pressed state animation name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "PressedAnimationName" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedAnimationName", + "name": "SetPressedAnimationName", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PressedAnimationName", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Animatable capability", + "extraInformation": [ + "AnimatableCapability::AnimatableBehavior" + ], + "name": "Animation" + }, + { + "value": "", + "type": "Behavior", + "label": "Button states", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "name": "ButtonFSM" + }, + { + "value": "Idle", + "type": "String", + "label": "Idle state animation name", + "group": "Animation", + "name": "IdleAnimationName" + }, + { + "value": "Focused", + "type": "String", + "label": "Focused state animation name", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Animation", + "name": "FocusedAnimationName" + }, + { + "value": "Pressed", + "type": "String", + "label": "Pressed state animation name", + "group": "Animation", + "name": "PressedAnimationName" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Smoothly change an effect on buttons according to their state.", + "fullName": "Button object effect tween", + "name": "ButtonObjectEffectTween", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "EffectValue", + "=", + "IdleValue" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "States", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "IdleValue", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "FocusedValue", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "FocusedValue", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Pressed\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "PressedValue", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Tween", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"FadeIn\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::PlayTween" + }, + "parameters": [ + "Object", + "Behavior", + "FadeInDuration", + "FadeInEasing", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"FadeOut\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::PlayTween" + }, + "parameters": [ + "Object", + "Behavior", + "FadeOutDuration", + "FadeOutEasing", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Time delta", + "functionType": "Expression", + "name": "TimeDelta", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TimeDelta() * LayerTimeScale(Object.Layer())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade in", + "functionType": "Action", + "name": "FadeIn", + "private": true, + "sentence": "_PARAM0_ fade in to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTime", + "=", + "0" + ] + }, + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"FadeIn\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenInitialValue", + "=", + "EffectValue" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTargetedValue", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade out", + "functionType": "Action", + "name": "FadeOut", + "private": true, + "sentence": "_PARAM0_ fade out to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTime", + "=", + "0" + ] + }, + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"FadeOut\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenInitialValue", + "=", + "EffectValue" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTargetedValue", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "Play tween", + "functionType": "Action", + "name": "PlayTween", + "private": true, + "sentence": "Tween the effect property of object _PARAM0_ over _PARAM2_ seconds with _PARAM3_ easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TweenTime", + "<", + "Duration" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTime", + "+", + "Object.Behavior::TimeDelta()" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "EffectValue", + "=", + "Tween::Ease(Easing, TweenInitialValue, TweenTargetedValue, TweenTime / Duration)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TweenTime", + ">=", + "Duration" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "EffectValue", + "=", + "TweenTargetedValue" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::SetEffectDoubleParameter" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "EffectProperty", + "EffectValue" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + }, + { + "description": "Duration (in seconds)", + "name": "Duration", + "type": "expression" + }, + { + "description": "Easing", + "name": "Easing", + "supplementaryInformation": "[]", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "the effect name of the object.", + "fullName": "Effect name", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "EffectName", + "sentence": "the effect name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "EffectName" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the effect parameter of the object. The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", + "fullName": "Effect parameter", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "EffectProperty", + "sentence": "the effect parameter", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "EffectProperty" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the effect parameter of the object. The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", + "fullName": "Effect parameter", + "functionType": "Action", + "getterName": "EffectName", + "group": "Button effect tween configuration", + "name": "SetEffectProperty", + "sentence": "Change the tweened effect of _PARAM0_ to _PARAM2_ with parameter _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "EffectName", + "=", + "NewEffectName" + ] + }, + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "EffectProperty", + "=", + "NewPropertyName" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + }, + { + "description": "Effect name", + "name": "NewEffectName", + "type": "string" + }, + { + "description": "Parameter name", + "name": "NewPropertyName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "the idle effect parameter value of the object.", + "fullName": "Idle effect parameter value", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "IdleValue", + "sentence": "the idle effect parameter value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "IdleValue" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleValue", + "name": "SetIdleValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "IdleValue", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the focused effect parameter value of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused effect parameter value", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FocusedValue", + "sentence": "the focused effect parameter value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FocusedValue" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedValue", + "name": "SetFocusedValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FocusedValue", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed effect parameter value of the object.", + "fullName": "Pressed effect parameter value", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "PressedValue", + "sentence": "the pressed effect parameter value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "PressedValue" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedValue", + "name": "SetPressedValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "PressedValue", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in easing of the object.", + "fullName": "Fade-in easing", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FadeInEasing", + "sentence": "the fade-in easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "FadeInEasing" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInEasing", + "name": "SetFadeInEasing", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "FadeInEasing", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out easing of the object.", + "fullName": "Fade-out easing", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FadeOutEasing", + "sentence": "the fade-out easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "FadeOutEasing" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutEasing", + "name": "SetFadeOutEasing", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "FadeOutEasing", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in duration of the object.", + "fullName": "Fade-in duration", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FadeInDuration", + "sentence": "the fade-in duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FadeInDuration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInDuration", + "name": "SetFadeInDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FadeInDuration", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out duration of the object.", + "fullName": "Fade-out duration", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FadeOutDuration", + "sentence": "the fade-out duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FadeOutDuration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutDuration", + "name": "SetFadeOutDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FadeOutDuration", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Button states", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "name": "ButtonFSM" + }, + { + "value": "", + "type": "Behavior", + "label": "Effect capability", + "extraInformation": [ + "EffectCapability::EffectBehavior" + ], + "name": "Effect" + }, + { + "value": "Effect", + "type": "String", + "label": "Effect name", + "group": "Effect", + "name": "EffectName" + }, + { + "value": "", + "type": "String", + "label": "Effect parameter", + "description": "The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", + "group": "Effect", + "name": "EffectProperty" + }, + { + "value": "0", + "type": "Number", + "label": "Idle effect parameter value", + "group": "Value", + "name": "IdleValue" + }, + { + "value": "0", + "type": "Number", + "label": "Focused effect parameter value", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Value", + "name": "FocusedValue" + }, + { + "value": "0", + "type": "Number", + "label": "Pressed effect parameter value", + "group": "Value", + "name": "PressedValue" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-in easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeInEasing" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeOutEasing" + }, + { + "value": "0.125", + "type": "Number", + "unit": "Second", + "label": "Fade-in duration", + "group": "Speed", + "name": "FadeInDuration" + }, + { + "value": "0.5", + "type": "Number", + "unit": "Second", + "label": "Fade-out duration", + "group": "Speed", + "name": "FadeOutDuration" + }, + { + "value": "Idle", + "type": "Choice", + "label": "", + "extraInformation": [ + "Idle", + "Focused", + "Pressed" + ], + "hidden": true, + "name": "PreviousState" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "TweenInitialValue" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "TweenTargetedValue" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "TweenTime" + }, + { + "value": "NoTween", + "type": "Choice", + "label": "", + "extraInformation": [ + "NoTween", + "FadeIn", + "FadeOut" + ], + "hidden": true, + "name": "TweenState" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "EffectValue" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Smoothly resize buttons according to their state.", + "fullName": "Button scale tween", + "name": "ButtonScaleTween", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ScalableCapability::ScalableBehavior::SetValue" + }, + "parameters": [ + "Object", + "Scale", + "=", + "IdleScale" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Change based on state", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonScaleTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "IdleScale", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [], + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior" + "PreviousState", + "=", + "\"Idle\"" ] - }, + } + ], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", - "\"PressedInside\"" + "\"Focused\"" ] - } - ], - "actions": [ + }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "ButtonStates::ButtonScaleTween::FadeIn" }, "parameters": [ "Object", "Behavior", - "=", - "\"PressedOutside\"" + "FocusedScale", + "" ] } ] @@ -3434,156 +9461,186 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior" + "PreviousState", + "=", + "\"Pressed\"" ] - }, + } + ], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", - "\"PressedOutside\"" + "\"Focused\"" ] - } - ], - "actions": [ + }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "ButtonStates::ButtonScaleTween::FadeOut" }, "parameters": [ "Object", "Behavior", - "=", - "\"PressedInside\"" + "FocusedScale", + "" ] } ] } - ], - "parameters": [] + ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - }, - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - } + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Pressed\"" ] } ], - "parameters": [] + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Pressed\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonScaleTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "PressedScale", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade in", + "functionType": "Action", + "name": "FadeIn", + "private": true, + "sentence": "_PARAM0_ fade in to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween::AddObjectScaleTween" + }, + "parameters": [ + "Object", + "Tween", + "\"__ButtonScaleTween.Fade\"", + "Value", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", + "no", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade out", + "functionType": "Action", + "name": "FadeOut", + "private": true, + "sentence": "_PARAM0_ fade out to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween::AddObjectScaleTween" + }, + "parameters": [ + "Object", + "Tween", + "\"__ButtonScaleTween.Fade\"", + "Value", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", + "no", + "yes" + ] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -3595,17 +9652,24 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" } ], "objectGroups": [] }, { - "fullName": "", - "functionType": "Action", - "name": "onDeActivate", - "sentence": "", + "description": "the idle state size scale of the object.", + "fullName": "Idle state size scale", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "IdleScale", + "sentence": "the idle state size scale", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -3613,29 +9677,18 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - "=", - "0" + "IdleScale" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -3645,41 +9698,31 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is not used.", - "fullName": "Is idle", - "functionType": "Condition", - "name": "IsIdle", - "sentence": "_PARAM0_ is idle", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleScale", + "name": "SetIdleScale", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "IdleScale", + "=", + "Value" ] } ] @@ -3694,46 +9737,38 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button was just clicked.", - "fullName": "Is clicked", - "functionType": "Condition", - "name": "IsClicked", - "sentence": "_PARAM0_ is clicked", + "description": "the focused state size scale of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state size scale", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FocusedScale", + "sentence": "the focused state size scale", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "FocusedScale" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -3743,41 +9778,31 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the cursor is hovered over the button.", - "fullName": "Is hovered", - "functionType": "Condition", - "name": "IsHovered", - "sentence": "_PARAM0_ is hovered", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedScale", + "name": "SetFocusedScale", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "FocusedScale", + "=", + "Value" ] } ] @@ -3792,72 +9817,118 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is either hovered or pressed but not hovered.", - "fullName": "Is focused", - "functionType": "Condition", - "name": "IsFocused", - "sentence": "_PARAM0_ is focused", + "description": "the pressed state size scale of the object.", + "fullName": "Pressed state size scale", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "PressedScale", + "sentence": "the pressed state size scale", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "PressedScale" ] } ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedScale", + "name": "SetPressedScale", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedScale", "=", - "\"PressedOutside\"" + "Value" ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in duration of the object.", + "fullName": "Fade-in duration", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FadeInDuration", + "sentence": "the fade-in duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "FadeInDuration" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -3867,46 +9938,77 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is currently being pressed with mouse or touch.", - "fullName": "Is pressed", - "functionType": "Condition", - "name": "IsPressed", - "sentence": "_PARAM0_ is pressed", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInDuration", + "name": "SetFadeInDuration", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "\"PressedInside\"" + "Value" ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out duration of the object.", + "fullName": "Fade-out duration", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FadeOutDuration", + "sentence": "the fade-out duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "FadeOutDuration" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -3916,41 +10018,31 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] - }, - { - "description": "Check if the button is currently being pressed outside with mouse or touch.", - "fullName": "Is held outside", - "functionType": "Condition", - "name": "IsPressedOutside", - "sentence": "_PARAM0_ is held outside", + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutDuration", + "name": "SetFadeOutDuration", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "FadeOutDuration", + "=", + "Value" ] } ] @@ -3965,18 +10057,19 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "the touch id that is using the button or 0 if none.", - "fullName": "Touch id", + "description": "the fade-in easing of the object.", + "fullName": "Fade-in easing", "functionType": "ExpressionAndCondition", - "name": "TouchId", - "sentence": "the touch id", + "group": "Button scale tween configuration", + "name": "FadeInEasing", + "sentence": "the fade-in easing", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -3984,17 +10077,18 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "FadeInEasing" ] } ] } ], "expressionType": { - "type": "expression" + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" }, "parameters": [ { @@ -4005,271 +10099,98 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "true", - "type": "Boolean", - "label": "", - "description": "Should check hovering", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "ShouldCheckHovering" - }, - { - "value": "Idle", - "type": "Choice", - "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" - ], - "hidden": true, - "name": "State" - }, - { - "value": "0", - "type": "Number", - "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchId" - }, - { - "value": "", - "type": "Boolean", - "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchIsInside" - }, - { - "value": "", - "type": "Boolean", - "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "MouseIsInside" }, - { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "Index" - } - ], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [ - { - "areaMaxX": 64, - "areaMaxY": 64, - "areaMaxZ": 64, - "areaMinX": 0, - "areaMinY": 0, - "areaMinZ": 0, - "defaultName": "Button", - "description": "A button that can be customized.", - "fullName": "Button (panel sprite)", - "name": "PanelSpriteButton", - "eventsFunctions": [ { "fullName": "", - "functionType": "Action", - "name": "onCreated", + "functionType": "ActionWithOperator", + "getterName": "FadeInEasing", + "name": "SetFadeInEasing", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "Create" - }, - "parameters": [ - "", - "Idle", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Hovered", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Pressed", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Hovered" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Pressed" - ] - }, - { - "type": { - "value": "ChangePlan" + "value": "SetStringVariable" }, "parameters": [ - "Hovered", + "FadeInEasing", "=", - "1" + "Value" ] } ] - }, + } + ], + "parameters": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Place the label over the backgrounds." + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out easing of the object.", + "fullName": "Fade-out easing", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FadeOutEasing", + "sentence": "the fade-out easing", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "Create" - }, - "parameters": [ - "", - "Label", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Label", - "=", - "2" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "yes" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "SetReturnString" }, "parameters": [ - "Object", - "" + "FadeOutEasing" ] } ] } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] + ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" } - ] + ], + "objectGroups": [] }, { "fullName": "", - "functionType": "Action", - "name": "onHotReloading", + "functionType": "ActionWithOperator", + "getterName": "FadeOutEasing", + "name": "SetFadeOutEasing", "sentence": "", "events": [ { @@ -4278,11 +10199,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "" + "FadeOutEasing", + "=", + "Value" ] } ] @@ -4292,318 +10214,288 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" } ], "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Scalable capability", + "extraInformation": [ + "ScalableCapability::ScalableBehavior" + ], + "name": "Scale" + }, + { + "value": "", + "type": "Behavior", + "label": "Button states behavior (required)", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "name": "ButtonFSM" + }, + { + "value": "", + "type": "Behavior", + "label": "Tween behavior (required)", + "extraInformation": [ + "Tween::TweenBehavior" + ], + "name": "Tween" + }, + { + "value": "1", + "type": "Number", + "unit": "Dimensionless", + "label": "Idle state size scale", + "group": "Size", + "name": "IdleScale" + }, + { + "value": "1", + "type": "Number", + "unit": "Dimensionless", + "label": "Focused state size scale", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Size", + "name": "FocusedScale" + }, + { + "value": "0.1", + "type": "Number", + "unit": "Second", + "label": "Fade-in duration", + "group": "Speed", + "name": "FadeInDuration" + }, + { + "value": "0.2", + "type": "Number", + "unit": "Second", + "label": "Fade-out duration", + "group": "Speed", + "name": "FadeOutDuration" + }, + { + "value": "0.95", + "type": "Number", + "unit": "Dimensionless", + "label": "Pressed state size scale", + "group": "Size", + "name": "PressedScale" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-in easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeInEasing" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeOutEasing" }, + { + "value": "Idle", + "type": "Choice", + "label": "", + "extraInformation": [ + "Idle", + "Focused", + "Pressed" + ], + "hidden": true, + "name": "PreviousState" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Smoothly change the color tint of buttons according to their state.", + "fullName": "Button color tint tween", + "name": "ButtonColorTintTween", + "objectType": "Sprite", + "eventsFunctions": [ { "fullName": "", "functionType": "Action", - "name": "doStepPostEvents", + "name": "onCreated", "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply states", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Show the right background accordingly to the new state." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsIdle" - }, - "parameters": [ - "Object", - "ButtonFSM" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "Idle", - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Pressed" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Visible" - }, - "parameters": [ - "Hovered" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" - }, - "parameters": [ - "Object", - ">", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Tween::AddObjectOpacityTween" - }, - "parameters": [ - "Hovered", - "Tween", - "\"Fadeout\"", - "0", - "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" - }, - "parameters": [ - "Object", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Hovered" - ] - } - ] - } - ] - }, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteObject::Opacity" - }, - "parameters": [ - "Hovered", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Hovered" - ] - }, - { - "type": { - "value": "PanelSpriteObject::SetOpacity" - }, - "parameters": [ - "Hovered", - "=", - "255" - ] - } + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "Object", + "IdleColorTint" ] - }, + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "States", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" + "value": "ButtonStates::ButtonFSM::IsIdle" }, "parameters": [ "Object", - "ButtonFSM" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Idle" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "Hovered", + "ButtonFSM", "" ] }, { "type": { - "value": "Cache" - }, - "parameters": [ - "Pressed" - ] - }, - { - "type": { - "value": "Tween::RemoveTween" - }, - "parameters": [ - "Hovered", - "Tween", - "\"Fadeout\"" - ] - }, - { - "type": { - "value": "PanelSpriteObject::SetOpacity" - }, - "parameters": [ - "Hovered", - "=", - "255" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "value": "StringVariable" }, "parameters": [ - "Object", - "ButtonFSM" + "PreviousState", + "!=", + "\"Idle\"" ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] } ], "actions": [ { "type": { - "value": "SetCenterY" + "value": "SetStringVariable" }, "parameters": [ - "Label", + "PreviousState", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Idle" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Hovered" + "\"Idle\"" ] }, { "type": { - "value": "Montre" + "value": "ButtonStates::ButtonColorTintTween::FadeOut" }, "parameters": [ - "Pressed", + "Object", + "Behavior", + "IdleColorTint", "" ] } @@ -4614,173 +10506,138 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsFocused" + "value": "ButtonStates::ButtonFSM::IsFocused" }, "parameters": [ "Object", - "ButtonFSM" + "ButtonFSM", + "" ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] } ], - "actions": [ - { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Idle" - ] - }, + "actions": [], + "events": [ { - "type": { - "value": "Montre" - }, - "parameters": [ - "Hovered", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "FocusedColorTint", + "" + ] + } ] }, { - "type": { - "value": "Cache" - }, - "parameters": [ - "Pressed" - ] - } - ] - } - ], - "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": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" }, "parameters": [ - "Object.Width()", - "!=", - "max(Idle.BoundingBoxRight(), Label.BoundingBoxRight()) - min(Idle.BoundingBoxLeft(), Label.BoundingBoxLeft())" + "PreviousState", + "=", + "\"Focused\"" ] }, { "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" + "value": "ButtonStates::ButtonColorTintTween::FadeOut" }, "parameters": [ - "Object.Height()", - "!=", - "max(Idle.BoundingBoxBottom(), Label.BoundingBoxBottom()) - min(Idle.BoundingBoxTop(), Label.BoundingBoxTop())" + "Object", + "Behavior", + "FocusedColorTint", + "" ] } ] } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Height", - "=", - "Object.Height()" - ] - }, + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteButton::Scale" + "value": "ButtonStates::ButtonFSM::IsPressed" }, "parameters": [ "Object", - "=", - "1" + "ButtonFSM", + "" ] }, { "type": { - "value": "PanelSpriteObject::Width" + "value": "StringVariable" }, "parameters": [ - "Background", - "=", - "Idle.Variable(Width)" + "PreviousState", + "!=", + "\"Pressed\"" ] - }, + } + ], + "actions": [ { "type": { - "value": "PanelSpriteObject::Height" + "value": "SetStringVariable" }, "parameters": [ - "Background", + "PreviousState", "=", - "Idle.Variable(Height)" + "\"Pressed\"" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "ButtonStates::ButtonColorTintTween::FadeIn" }, "parameters": [ "Object", + "Behavior", + "PressedColorTint", "" ] } @@ -4794,55 +10651,42 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" - } - ], - "objectGroups": [ + }, { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" } - ] + ], + "objectGroups": [] }, { - "description": "Check if the button is not used.", - "fullName": "Is idle", - "functionType": "Condition", - "name": "IsIdle", - "sentence": "_PARAM0_ is idle", + "fullName": "Fade in", + "functionType": "Action", + "name": "FadeIn", + "private": true, + "sentence": "_PARAM0_ fade in to _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsIdle" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "Tween::AddObjectColorTween" }, "parameters": [ - "True" + "Object", + "Tween", + "\"__ButtonColorTintTween.Fade\"", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", + "no", + "yes" ] } ] @@ -4852,169 +10696,298 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "color" } ], "objectGroups": [] }, { - "description": "Check if the button was just clicked.", - "fullName": "Is clicked", - "functionType": "Condition", - "name": "IsClicked", - "sentence": "_PARAM0_ is clicked", + "fullName": "Fade out", + "functionType": "Action", + "name": "FadeOut", + "private": true, + "sentence": "_PARAM0_ fade out to _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::IsClicked" + "value": "Tween::AddObjectColorTween" }, "parameters": [ - "Idle", - "ButtonFSM", - "" + "Object", + "Tween", + "\"__ButtonColorTintTween.Fade\"", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", + "no", + "yes" ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "color" + } + ], + "objectGroups": [] + }, + { + "description": "the idle state color tint of the object.", + "fullName": "Idle state color tint", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "IdleColorTint", + "sentence": "the idle state color tint", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnString" }, "parameters": [ - "True" + "IdleColorTint" ] } ] } ], + "expressionType": { + "type": "color" + }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the cursor is hovered over the button.", - "fullName": "Is hovered", - "functionType": "Condition", - "name": "IsHovered", - "sentence": "_PARAM0_ is hovered", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleColorTint", + "name": "SetIdleColorTint", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::IsHovered" + "value": "SetStringVariable" }, "parameters": [ - "Idle", - "ButtonFSM", - "" + "IdleColorTint", + "=", + "Value" ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the focused state color tint of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state color tint", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FocusedColorTint", + "sentence": "the focused state color tint", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnString" }, "parameters": [ - "True" + "FocusedColorTint" ] } ] } ], + "expressionType": { + "type": "color" + }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is either hovered or pressed but not hovered.", - "fullName": "Is focused", - "functionType": "Condition", - "name": "IsFocused", - "sentence": "_PARAM0_ is focused", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedColorTint", + "name": "SetFocusedColorTint", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::IsFocused" + "value": "SetStringVariable" }, "parameters": [ - "Idle", - "ButtonFSM", - "" + "FocusedColorTint", + "=", + "Value" ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed state color tint of the object.", + "fullName": "Pressed state color tint", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "PressedColorTint", + "sentence": "the pressed state color tint", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnString" }, "parameters": [ - "True" + "PressedColorTint" ] } ] } ], + "expressionType": { + "type": "color" + }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is currently being pressed with mouse or touch.", - "fullName": "Is pressed", - "functionType": "Condition", - "name": "IsPressed", - "sentence": "_PARAM0_ is pressed", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedColorTint", + "name": "SetPressedColorTint", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsPressed" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetStringVariable" }, "parameters": [ - "True" + "PressedColorTint", + "=", + "Value" ] } ] @@ -5024,18 +10997,25 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Change the text of the button label.", - "fullName": "Label text", - "functionType": "Action", - "name": "SetLabelText", - "sentence": "Change the text of _PARAM0_ to _PARAM1_", + "description": "the fade-in duration of the object.", + "fullName": "Fade-in duration", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeInDuration", + "sentence": "the fade-in duration", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -5043,46 +11023,39 @@ "actions": [ { "type": { - "value": "TextObject::String" - }, - "parameters": [ - "Label", - "=", - "GetArgumentAsString(\"LabelText\")" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "" + "FadeInDuration" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" }, { - "description": "", - "name": "LabelText", - "type": "string" + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInDuration", + "name": "SetFadeInDuration", "sentence": "", "events": [ { @@ -5091,35 +11064,40 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "SetNumberVariable" }, "parameters": [ - "Label.String()" + "FadeInDuration", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" } ], "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 fade-out duration of the object.", + "fullName": "Fade-out duration", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeOutDuration", + "sentence": "the fade-out duration", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -5130,7 +11108,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "FadeOutDuration" ] } ] @@ -5143,19 +11121,24 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" } ], "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_", + "functionType": "ActionWithOperator", + "getterName": "FadeOutDuration", + "name": "SetFadeOutDuration", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -5163,209 +11146,178 @@ "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" + "value": "SetNumberVariable" }, "parameters": [ - "Label", + "FadeOutDuration", "=", - "Object.CenterWithPaddingY()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } + "Value" ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in easing of the object.", + "fullName": "Fade-in easing", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeInEasing", + "sentence": "the fade-in easing", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": [ - "Object", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "MettreY" + "value": "SetReturnString" }, "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" + "FadeInEasing" ] } ] } ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" - } - ], - "objectGroups": [ + }, { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" } - ] + ], + "objectGroups": [] }, { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInEasing", + "name": "SetFadeInEasing", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"ShouldActivate\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetStringVariable" }, "parameters": [ - "Idle", - "ButtonFSM", - "yes" + "FadeInEasing", + "=", + "Value" ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"ShouldActivate\"" - ] - } - ], + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out easing of the object.", + "fullName": "Fade-out easing", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeOutEasing", + "sentence": "the fade-out easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnString" }, "parameters": [ - "Idle", - "ButtonFSM", - "no" + "FadeOutEasing" ] } ] } ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" }, { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutEasing", + "name": "SetFadeOutEasing", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": [ - "Idle", - "ButtonFSM" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetStringVariable" }, "parameters": [ - "True" + "FadeOutEasing", + "=", + "Value" ] } ] @@ -5375,8 +11327,14 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "supplementaryInformation": "Sprite", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" } ], "objectGroups": [] @@ -5384,230 +11342,163 @@ ], "propertyDescriptors": [ { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "name": "PressedLabelOffsetY" - }, - { - "value": "0", - "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", + "value": "", + "type": "Behavior", + "label": "Button states", "extraInformation": [ - "Label" + "ButtonStates::ButtonFSM" ], - "name": "LeftPadding" + "name": "ButtonFSM" }, { - "value": "0", - "type": "Number", - "label": "Right padding", - "description": "", - "group": "Padding", + "value": "", + "type": "Behavior", + "label": "Tween", "extraInformation": [ - "Label" + "Tween::TweenBehavior" ], - "name": "RightPadding" + "name": "Tween" }, { - "value": "0", - "type": "Number", - "label": "Top padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "TopPadding" + "value": "255;255;255", + "type": "Color", + "label": "Idle state color tint", + "group": "Color", + "name": "IdleColorTint" }, { - "value": "0", - "type": "Number", - "label": "Bottom padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "BottomPadding" + "value": "192;192;192", + "type": "Color", + "label": "Focused state color tint", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Color", + "name": "FocusedColorTint" }, { - "value": "0.25", + "value": "64;64;64", + "type": "Color", + "label": "Pressed state color tint", + "group": "Color", + "name": "PressedColorTint" + }, + { + "value": "0.1", "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], - "name": "HoveredFadeOutDuration" - } - ], - "objects": [ + "unit": "Second", + "label": "Fade-in duration", + "group": "Speed", + "name": "FadeInDuration" + }, { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 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": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": "0;0;0" - } + "value": "0.2", + "type": "Number", + "unit": "Second", + "label": "Fade-out duration", + "group": "Speed", + "name": "FadeOutDuration" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ - { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" - } + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-in easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" ], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true - } - ] + "name": "FadeInEasing" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ] + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeOutEasing" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Idle" - }, - { - "objectName": "Hovered" - }, - { - "objectName": "Pressed" - } - ] - }, - "objectsGroups": [], - "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 - } + "value": "Idle", + "type": "Choice", + "label": "", + "extraInformation": [ + "Idle", + "Focused", + "Pressed" ], - "effects": [] + "hidden": true, + "name": "PreviousState" } ], - "instances": [] + "sharedPropertyDescriptors": [] } - ] + ], + "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/tappy-plane/tappy-plane.json b/examples/tappy-plane/tappy-plane.json index dd03fd821..62af20767 100644 --- a/examples/tappy-plane/tappy-plane.json +++ b/examples/tappy-plane/tappy-plane.json @@ -1,7 +1,7 @@ { "firstLayout": "Menu", "gdVersion": { - "build": 223, + "build": 237, "major": 5, "minor": 5, "revision": 0 @@ -90,6 +90,7 @@ ], "playableDevices": [ "keyboard", + "mobile", "mobile" ], "extensionProperties": [], @@ -769,6 +770,7 @@ "assetStoreId": "", "name": "Start", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Big yellow blocky button", "variables": [], "effects": [], "behaviors": [], @@ -777,7 +779,8 @@ "LeftPadding": 8, "RightPadding": 8, "BottomPadding": 16, - "HoveredFadeOutDuration": 0 + "HoveredFadeOutDuration": 0, + "LabelText": "Start" }, "childrenContent": { "Hovered": { @@ -816,11 +819,11 @@ }, "content": { "bold": false, - "isOutlineEnabled": false, + "isOutlineEnabled": true, "isShadowEnabled": false, "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, + "outlineColor": "0;0;0", + "outlineThickness": 4, "shadowAngle": 90, "shadowBlurRadius": 2, "shadowColor": "0;0;0", @@ -1477,6 +1480,7 @@ "assetStoreId": "", "name": "LeaderboardDialog", "type": "LeaderboardDialog::LeaderboardDialog", + "variant": "", "variables": [], "effects": [], "behaviors": [], @@ -3418,6 +3422,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXRyb3BoeSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOCAyQzE3LjEgMiAxNiAzIDE2IDRIOEM4IDMgNi45IDIgNiAySDJWMTFDMiAxMiAzIDEzIDQgMTNINi4yQzYuNiAxNSA3LjkgMTYuNyAxMSAxN1YxOS4wOEM4IDE5LjU0IDggMjIgOCAyMkgxNkMxNiAyMiAxNiAxOS41NCAxMyAxOS4wOFYxN0MxNi4xIDE2LjcgMTcuNCAxNSAxNy44IDEzSDIwQzIxIDEzIDIyIDEyIDIyIDExVjJIMThNNiAxMUg0VjRINlYxMU0yMCAxMUgxOFY0SDIwVjExWiIgLz48L3N2Zz4=", "name": "LeaderboardDialog", @@ -3446,626 +3451,674 @@ "isInnerAreaFollowingParentSize": true, "isUsingLegacyInstancesRenderer": false, "name": "LeaderboardDialog", - "eventsFunctions": [ + "objects": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetDefaultPlayerName" - }, - "parameters": [ - "Object", - "=", - "DefaultPlayerName", - "" - ] - }, - { - "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" - }, - "parameters": [ - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "HighScoreChanged" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "PlayerNameInput", - "Text", - "=", - "PlayerAuthentication::Username()" - ] - }, - { - "type": { - "value": "TextInput::TextInputObject::SetDisabled" - }, - "parameters": [ - "PlayerNameInput", - "yes" - ] - } - ] - } - ], - "parameters": [ + "assetStoreId": "", + "name": "SubmitButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow blocky button", + "variables": [], + "effects": [], + "behaviors": [ { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PlayerAuthentication::HasPlayerLoggedIn" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "PlayerNameInput", - "Text", - "=", - "PlayerAuthentication::Username()" - ] - }, - { - "type": { - "value": "TextInput::TextInputObject::SetDisabled" - }, - "parameters": [ - "PlayerNameInput", - "yes" - ] - }, - { - "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" - }, - "parameters": [ - "" - ] - } - ] + "content": { + "TopPadding": 4, + "LeftPadding": 4, + "RightPadding": 4, + "BottomPadding": 8, + "HoveredFadeOutDuration": 0, + "LabelText": "Submit" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 0, + "height": 40, + "leftMargin": 0, + "rightMargin": 0, + "texture": "assets\\buttonSmall.png", + "tiled": false, + "topMargin": 0, + "width": 68 }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Leaderboards::IsLeaderboardViewErrored" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" - }, - "parameters": [ - "" - ] - } - ] + "Idle": { + "bottomMargin": 0, + "height": 40, + "leftMargin": 0, + "rightMargin": 0, + "texture": "assets\\buttonSmall.png", + "tiled": false, + "topMargin": 0, + "width": 68 }, - { - "type": "BuiltinCommonInstructions::Comment", + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Submit", + "font": "04B_19__.TTF", + "textAlignment": "center", + "characterSize": 15, "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "b": 255, + "g": 255, + "r": 255 }, - "comment": "Handle leaderboards.\nTo create a leaderboard, make sure your game is registered in Home > Profile > Games Dashboard and then, click on \"Manage game\" > Leaderboards. When a leaderboard is created, it should be available in the actions." + "content": { + "bold": false, + "isOutlineEnabled": true, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "0;0;0", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Submit", + "font": "04B_19__.TTF", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 15, + "color": "255;255;255" + } }, + "Pressed": { + "bottomMargin": 0, + "height": 40, + "leftMargin": 0, + "rightMargin": 0, + "texture": "assets\\buttonSmall.png", + "tiled": false, + "topMargin": 0, + "width": 68 + } + } + }, + { + "assetStoreId": "", + "name": "PlayerNameInput", + "type": "TextInput::TextInputObject", + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" - }, - "parameters": [ - "SubmitButton", - "" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Leaderboards::SaveConnectedPlayerScore" - }, - "parameters": [ - "", - "LeaderboardId", - "Score" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Leaderboards::SavePlayerScore" - }, - "parameters": [ - "", - "LeaderboardId", - "Score", - "PlayerNameInput.Text()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PlayerAuthentication::HideAuthenticationBanner" - }, - "parameters": [ - "" - ] - }, - { - "type": { - "value": "Leaderboards::DisplayLeaderboard" - }, - "parameters": [ - "", - "LeaderboardId", - "yes" - ] - } - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } ], - "objectGroups": [] + "content": { + "initialValue": "", + "placeholder": "Touch to start typing", + "fontResourceName": "04B_19__.TTF", + "fontSize": 20, + "inputType": "text", + "textColor": "0;0;0", + "fillColor": "255;255;255", + "fillOpacity": 255, + "borderColor": "0;0;0", + "borderOpacity": 255, + "borderWidth": 1, + "readOnly": false, + "disabled": false + } }, { - "description": "the score.", - "fullName": "Score", - "functionType": "ExpressionAndCondition", - "name": "Score", - "sentence": "the score", - "events": [ + "assetStoreId": "", + "name": "RestartButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow blocky button", + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Score" - ] - } - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } ], - "expressionType": { - "type": "expression" + "content": { + "TopPadding": 4, + "LeftPadding": 4, + "RightPadding": 4, + "BottomPadding": 8, + "HoveredFadeOutDuration": 0, + "LabelText": "Restart" }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" + "childrenContent": { + "Hovered": { + "bottomMargin": 0, + "height": 40, + "leftMargin": 0, + "rightMargin": 0, + "texture": "assets\\buttonSmall.png", + "tiled": false, + "topMargin": 0, + "width": 68 + }, + "Idle": { + "bottomMargin": 0, + "height": 40, + "leftMargin": 0, + "rightMargin": 0, + "texture": "assets\\buttonSmall.png", + "tiled": false, + "topMargin": 0, + "width": 68 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Restart", + "font": "04B_19__.TTF", + "textAlignment": "center", + "characterSize": 15, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": true, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "0;0;0", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Restart", + "font": "04B_19__.TTF", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 15, + "color": "255;255;255" + } + }, + "Pressed": { + "bottomMargin": 0, + "height": 40, + "leftMargin": 0, + "rightMargin": 0, + "texture": "assets\\buttonSmall.png", + "tiled": false, + "topMargin": 0, + "width": 68 } - ], - "objectGroups": [] + } }, { - "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "Score", - "name": "SetScore", - "sentence": "", - "events": [ + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "HighScoreChanged", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyScore" - }, - "parameters": [ - "Object", - "=", - "Value" - ] - }, - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "ScoreLabel", - "Text", - "=", - "\"Score: \" + Score" - ] - } - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Read the previous best score from the storage" - }, + "name": "ShakeObject_PositionAngle", + "type": "ShakeObject::ShakeObject_PositionAngle" + } + ], + "string": "New Highscore!", + "font": "04B_19__.TTF", + "textAlignment": "", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "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": "New Highscore!", + "font": "04B_19__.TTF", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "color": "255;0;0" + } + }, + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "Medal", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "GroupExists" - }, - "parameters": [ - "\"save\"", - "\"high_score\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "ReadNumberFromStorage" - }, - "parameters": [ - "\"save\"", - "\"high_score\"", - "", - "PreviousBestScore" - ] - }, - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "HighScore", - "Text", - "=", - "\"Best: \" + PreviousBestScore" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Check if this is a new best score" - }, + "name": "", + "useMultipleDirections": false, + "directions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "LeaderboardDialog::LeaderboardDialog::Score" - }, - "parameters": [ - "Object", - ">=", - "PreviousBestScore", - "" - ] - } - ], - "actions": [ + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ { - "type": { - "value": "EcrireFichierExp" + "hasCustomCollisionMask": false, + "image": "assets\\medalGold.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 }, - "parameters": [ - "\"save\"", - "\"high_score\"", - "Score" - ] - }, - { - "type": { - "value": "Montre" + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 }, - "parameters": [ - "HighScoreChanged", - "" - ] + "customCollisionMask": [] } ] } - ], - "variables": [ - { - "name": "PreviousBestScore", - "type": "number", - "value": 0 - } ] } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] + ] }, { - "description": "the default player name.", - "fullName": "Default player name", - "functionType": "ExpressionAndCondition", - "name": "DefaultPlayerName", - "sentence": "the default player name", - "events": [ + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "ScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "DefaultPlayerName" - ] - } - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } ], - "expressionType": { - "type": "string" + "string": "Score: 0", + "font": "04B_19__.TTF", + "textAlignment": "", + "characterSize": 22, + "color": { + "b": 255, + "g": 255, + "r": 255 }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "DefaultPlayerName", - "name": "SetDefaultPlayerName", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyDefaultPlayerName" - }, - "parameters": [ - "Object", - "=", - "Value" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - }, - { - "type": { - "value": "LeaderboardDialog::LeaderboardDialog::PropertyDefaultPlayerName" - }, - "parameters": [ - "Object", - "!=", - "\"0\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "PlayerNameInput", - "Text", - "=", - "DefaultPlayerName" - ] - } - ] - } - ], - "parameters": [ + "content": { + "bold": false, + "isOutlineEnabled": true, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "0;0;0", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Score: 0", + "font": "04B_19__.TTF", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 22, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "HighScore", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } ], - "objectGroups": [] + "string": "Highscore: 0", + "font": "04B_19__.TTF", + "textAlignment": "", + "characterSize": 22, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": true, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "0;0;0", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Highscore: 0", + "font": "04B_19__.TTF", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 22, + "color": "255;255;255" + } }, { - "description": "the player name.", - "fullName": "Player name", - "functionType": "ExpressionAndCondition", - "name": "PlayerName", - "sentence": "the player name", - "events": [ + "assetStoreId": "", + "bottomMargin": 10, + "height": 32, + "leftMargin": 10, + "name": "GameOverBackground", + "rightMargin": 10, + "texture": "assets\\UIbg.png", + "tiled": true, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "PlayerNameInput.Text::Value()" - ] - } - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "topEdgeAnchor": 1, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false } - ], - "expressionType": { - "type": "string" + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "GameOverBackground" }, - "parameters": [ + { + "objectName": "Medal" + }, + { + "objectName": "HighScore" + }, + { + "objectName": "ScoreLabel" + }, + { + "objectName": "HighScoreChanged" + }, + { + "objectName": "PlayerNameInput" + }, + { + "objectName": "RestartButton" + }, + { + "objectName": "SubmitButton" + } + ] + }, + "objectsGroups": [], + "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": [ { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 } ], - "objectGroups": [] - }, + "effects": [] + } + ], + "instances": [ { - "description": "Check if the restart button of the dialog is clicked.", - "fullName": "Restart button clicked", - "functionType": "Condition", - "name": "IsRestartClicked", - "sentence": "Restart button of _PARAM0_ is clicked", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + "angle": 0, + "customSize": true, + "height": 256, + "layer": "", + "name": "GameOverBackground", + "persistentUuid": "03fc6fee-1fae-442a-b01b-60c427ea3ff7", + "width": 300, + "x": 0, + "y": 0, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 24, + "layer": "", + "name": "HighScore", + "persistentUuid": "5e642467-3a13-4ee5-b78d-a527b3d2408f", + "width": 162, + "x": 135, + "y": 26, + "zOrder": 6, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 27, + "layer": "", + "name": "ScoreLabel", + "persistentUuid": "75cf5a86-ba1b-46ac-80ee-a9bec1727479", + "width": 161, + "x": 135, + "y": 63, + "zOrder": 7, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 60, + "layer": "", + "name": "Medal", + "persistentUuid": "771fefe5-b035-4ded-93c7-b93c07dfdbaa", + "width": 57, + "x": 15, + "y": 15, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 20, + "layer": "", + "name": "HighScoreChanged", + "persistentUuid": "1f108654-2a5b-4d13-879b-5865dd45d792", + "width": 161, + "x": 135, + "y": 100, + "zOrder": 13, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RestartButton", + "persistentUuid": "5c42ce36-97f5-4c77-8e1b-6562b86407b4", + "width": 0, + "x": 25, + "y": 202, + "zOrder": 25, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 30, + "layer": "", + "name": "PlayerNameInput", + "persistentUuid": "56f0bab1-1656-4999-85c4-9e24cfac73bc", + "width": 250, + "x": 25, + "y": 150, + "zOrder": 24, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "SubmitButton", + "persistentUuid": "65924bc8-c391-4021-95a0-912fac6a4866", + "width": 0, + "x": 207, + "y": 202, + "zOrder": 26, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::SetDefaultPlayerName" }, "parameters": [ - "RestartButton", + "Object", + "=", + "DefaultPlayerName", "" ] - } - ], - "actions": [ + }, { "type": { - "value": "PlayerAuthentication::HideAuthenticationBanner" + "value": "PlayerAuthentication::DisplayAuthenticationBanner" }, "parameters": [ "" @@ -4073,109 +4126,48 @@ }, { "type": { - "value": "SetReturnBoolean" + "value": "Cache" }, "parameters": [ - "True" + "HighScoreChanged" ] } ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the score has been sucessfully submitted by the dialog.", - "fullName": "Score is submitted", - "functionType": "Condition", - "name": "IsScoreSubmitted", - "sentence": "_PARAM0_ submitted a score", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Allow to try and submit again in case of error." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "Leaderboards::HasPlayerJustClosedLeaderboardView" + "value": "PlayerAuthentication::IsPlayerAuthenticated" }, "parameters": [] - }, - { - "type": { - "value": "Leaderboards::HasLastSaveSucceeded" - }, - "parameters": [ - "LeaderboardId" - ] } ], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "True" + "PlayerNameInput", + "Text", + "=", + "PlayerAuthentication::Username()" ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "the leaderboard of the object.", - "fullName": "Leaderboard", - "functionType": "ExpressionAndCondition", - "name": "LeaderboardId", - "sentence": "the leaderboard", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { "type": { - "value": "SetReturnString" + "value": "TextInput::TextInputObject::SetDisabled" }, "parameters": [ - "LeaderboardId" + "PlayerNameInput", + "yes" ] } ] } ], - "expressionType": { - "type": "leaderboardId" - }, "parameters": [ { "description": "Object", @@ -4188,27 +4180,173 @@ }, { "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "LeaderboardId", - "name": "SetLeaderboardId", + "functionType": "Action", + "name": "doStepPostEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::HasPlayerLoggedIn" + }, + "parameters": [] + } + ], "actions": [ { "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyLeaderboardId" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Object", + "PlayerNameInput", + "Text", "=", - "Value" + "PlayerAuthentication::Username()" ] - } - ] - } + }, + { + "type": { + "value": "TextInput::TextInputObject::SetDisabled" + }, + "parameters": [ + "PlayerNameInput", + "yes" + ] + }, + { + "type": { + "value": "PlayerAuthentication::DisplayAuthenticationBanner" + }, + "parameters": [ + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Leaderboards::IsLeaderboardViewErrored" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::DisplayAuthenticationBanner" + }, + "parameters": [ + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Handle leaderboards.\nTo create a leaderboard, make sure your game is registered in Home > Profile > Games Dashboard and then, click on \"Manage game\" > Leaderboards. When a leaderboard is created, it should be available in the actions." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "SubmitButton", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Leaderboards::SaveConnectedPlayerScore" + }, + "parameters": [ + "", + "LeaderboardId", + "Score" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Leaderboards::SavePlayerScore" + }, + "parameters": [ + "", + "LeaderboardId", + "Score", + "PlayerNameInput.Text()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" + }, + "parameters": [ + "" + ] + }, + { + "type": { + "value": "Leaderboards::DisplayLeaderboard" + }, + "parameters": [ + "", + "LeaderboardId", + "yes" + ] + } + ] + } + ] + } ], "parameters": [ { @@ -4219,678 +4357,541 @@ } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "String", - "label": "Default player name", - "description": "", - "group": "", - "extraInformation": [], - "name": "DefaultPlayerName" - }, - { - "value": "", - "type": "LeaderboardId", - "label": "Leaderboard", - "description": "", - "group": "", - "extraInformation": [], - "name": "LeaderboardId" }, { - "value": "0", - "type": "Number", - "unit": "Dimensionless", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "Score" - } - ], - "objects": [ - { - "assetStoreId": "", - "name": "SubmitButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [ + "description": "the score.", + "fullName": "Score", + "functionType": "ExpressionAndCondition", + "name": "Score", + "sentence": "the score", + "events": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 0, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Score" + ] + } + ] } ], - "content": { - "TopPadding": 4, - "LeftPadding": 4, - "RightPadding": 4, - "BottomPadding": 8, - "HoveredFadeOutDuration": 0 + "expressionType": { + "type": "expression" }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 40, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\buttonSmall.png", - "tiled": false, - "topMargin": 0, - "width": 68 - }, - "Idle": { - "bottomMargin": 0, - "height": 40, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\buttonSmall.png", - "tiled": false, - "topMargin": 0, - "width": 68 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Submit", - "font": "04B_19__.TTF", - "textAlignment": "center", - "characterSize": 15, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": false, - "isOutlineEnabled": true, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "0;0;0", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Submit", - "font": "04B_19__.TTF", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 15, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 40, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\buttonSmall.png", - "tiled": false, - "topMargin": 0, - "width": 68 - } - } - }, - { - "assetStoreId": "", - "name": "PlayerNameInput", - "type": "TextInput::TextInputObject", - "variables": [], - "effects": [], - "behaviors": [ + "parameters": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" } ], - "content": { - "initialValue": "", - "placeholder": "Touch to start typing", - "fontResourceName": "04B_19__.TTF", - "fontSize": 20, - "inputType": "text", - "textColor": "0;0;0", - "fillColor": "255;255;255", - "fillOpacity": 255, - "borderColor": "0;0;0", - "borderOpacity": 255, - "borderWidth": 1, - "readOnly": false, - "disabled": false - } + "objectGroups": [] }, { - "assetStoreId": "", - "name": "RestartButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [ + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Score", + "name": "SetScore", + "sentence": "", + "events": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 0, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false - } - ], - "content": { - "TopPadding": 4, - "LeftPadding": 4, - "RightPadding": 4, - "BottomPadding": 8, - "HoveredFadeOutDuration": 0 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 40, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\buttonSmall.png", - "tiled": false, - "topMargin": 0, - "width": 68 - }, - "Idle": { - "bottomMargin": 0, - "height": 40, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\buttonSmall.png", - "tiled": false, - "topMargin": 0, - "width": 68 + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyScore" + }, + "parameters": [ + "Object", + "=", + "Value" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "ScoreLabel", + "Text", + "=", + "\"Score: \" + Score" + ] + } + ] }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Restart", - "font": "04B_19__.TTF", - "textAlignment": "center", - "characterSize": 15, + { + "type": "BuiltinCommonInstructions::Comment", "color": { - "b": 255, - "g": 255, - "r": 255 + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "content": { - "bold": false, - "isOutlineEnabled": true, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "0;0;0", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Restart", - "font": "04B_19__.TTF", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 15, - "color": "255;255;255" - } + "comment": "Read the previous best score from the storage" }, - "Pressed": { - "bottomMargin": 0, - "height": 40, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\buttonSmall.png", - "tiled": false, - "topMargin": 0, - "width": 68 + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GroupExists" + }, + "parameters": [ + "\"save\"", + "\"high_score\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ReadNumberFromStorage" + }, + "parameters": [ + "\"save\"", + "\"high_score\"", + "", + "PreviousBestScore" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "HighScore", + "Text", + "=", + "\"Best: \" + PreviousBestScore" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Check if this is a new best score" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::Score" + }, + "parameters": [ + "Object", + ">=", + "PreviousBestScore", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EcrireFichierExp" + }, + "parameters": [ + "\"save\"", + "\"high_score\"", + "Score" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "HighScoreChanged", + "" + ] + } + ] + } + ], + "variables": [ + { + "name": "PreviousBestScore", + "type": "number", + "value": 0 + } + ] } - } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] }, { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "HighScoreChanged", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false - }, + "description": "the default player name.", + "fullName": "Default player name", + "functionType": "ExpressionAndCondition", + "name": "DefaultPlayerName", + "sentence": "the default player name", + "events": [ { - "name": "ShakeObject_PositionAngle", - "type": "ShakeObject::ShakeObject_PositionAngle" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "DefaultPlayerName" + ] + } + ] } ], - "string": "New Highscore!", - "font": "04B_19__.TTF", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 255 + "expressionType": { + "type": "string" }, - "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": "New Highscore!", - "font": "04B_19__.TTF", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "255;0;0" - } + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] }, { - "adaptCollisionMaskAutomatically": false, - "assetStoreId": "", - "name": "Medal", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [], - "animations": [ + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "DefaultPlayerName", + "name": "SetDefaultPlayerName", + "sentence": "", + "events": [ { - "name": "", - "useMultipleDirections": false, - "directions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "assets\\medalGold.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyDefaultPlayerName" + }, + "parameters": [ + "Object", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + }, + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::PropertyDefaultPlayerName" + }, + "parameters": [ + "Object", + "!=", + "\"0\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "PlayerNameInput", + "Text", + "=", + "DefaultPlayerName" ] } ] } - ] + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] }, { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "ScoreLabel", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [ + "description": "the player name.", + "fullName": "Player name", + "functionType": "ExpressionAndCondition", + "name": "PlayerName", + "sentence": "the player name", + "events": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "PlayerNameInput.Text::Value()" + ] + } + ] } ], - "string": "Score: 0", - "font": "04B_19__.TTF", - "textAlignment": "", - "characterSize": 22, - "color": { - "b": 255, - "g": 255, - "r": 255 + "expressionType": { + "type": "string" }, - "content": { - "bold": false, - "isOutlineEnabled": true, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "0;0;0", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Score: 0", - "font": "04B_19__.TTF", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 22, - "color": "255;255;255" - } + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] }, { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "HighScore", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [ + "description": "Check if the restart button of the dialog is clicked.", + "fullName": "Restart button clicked", + "functionType": "Condition", + "name": "IsRestartClicked", + "sentence": "Restart button of _PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "RestartButton", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" + }, + "parameters": [ + "" + ] + }, + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" } ], - "string": "Highscore: 0", - "font": "04B_19__.TTF", - "textAlignment": "", - "characterSize": 22, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": false, - "isOutlineEnabled": true, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "0;0;0", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Highscore: 0", - "font": "04B_19__.TTF", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 22, - "color": "255;255;255" - } + "objectGroups": [] }, { - "assetStoreId": "", - "bottomMargin": 10, - "height": 32, - "leftMargin": 10, - "name": "GameOverBackground", - "rightMargin": 10, - "texture": "assets\\UIbg.png", - "tiled": true, - "topMargin": 10, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + "description": "Check if the score has been sucessfully submitted by the dialog.", + "fullName": "Score is submitted", + "functionType": "Condition", + "name": "IsScoreSubmitted", + "sentence": "_PARAM0_ submitted a score", + "events": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "topEdgeAnchor": 1, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "useLegacyBottomAndRightAnchors": false + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Allow to try and submit again in case of error." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Leaderboards::HasPlayerJustClosedLeaderboardView" + }, + "parameters": [] + }, + { + "type": { + "value": "Leaderboards::HasLastSaveSucceeded" + }, + "parameters": [ + "LeaderboardId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] } - ] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "GameOverBackground" - }, - { - "objectName": "Medal" - }, - { - "objectName": "HighScore" - }, - { - "objectName": "ScoreLabel" - }, - { - "objectName": "HighScoreChanged" - }, - { - "objectName": "PlayerNameInput" - }, - { - "objectName": "RestartButton" - }, - { - "objectName": "SubmitButton" - } - ] - }, - "objectsGroups": [], - "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": [ + ], + "parameters": [ { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" } ], - "effects": [] - } - ], - "instances": [ - { - "angle": 0, - "customSize": true, - "height": 256, - "layer": "", - "name": "GameOverBackground", - "persistentUuid": "03fc6fee-1fae-442a-b01b-60c427ea3ff7", - "width": 300, - "x": 0, - "y": 0, - "zOrder": 0, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "height": 24, - "layer": "", - "name": "HighScore", - "persistentUuid": "5e642467-3a13-4ee5-b78d-a527b3d2408f", - "width": 162, - "x": 135, - "y": 26, - "zOrder": 6, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "depth": 1, - "height": 27, - "layer": "", - "name": "ScoreLabel", - "persistentUuid": "75cf5a86-ba1b-46ac-80ee-a9bec1727479", - "width": 161, - "x": 135, - "y": 63, - "zOrder": 7, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "objectGroups": [] }, { - "angle": 0, - "customSize": false, - "height": 60, - "layer": "", - "name": "Medal", - "persistentUuid": "771fefe5-b035-4ded-93c7-b93c07dfdbaa", - "width": 57, - "x": 15, - "y": 15, - "zOrder": 10, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "description": "the leaderboard of the object.", + "fullName": "Leaderboard", + "functionType": "ExpressionAndCondition", + "name": "LeaderboardId", + "sentence": "the leaderboard", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardId" + ] + } + ] + } + ], + "expressionType": { + "type": "leaderboardId" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] }, { - "angle": 0, - "customSize": true, - "depth": 1, - "height": 20, - "layer": "", - "name": "HighScoreChanged", - "persistentUuid": "1f108654-2a5b-4d13-879b-5865dd45d792", - "width": 161, - "x": 135, - "y": 100, - "zOrder": 13, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LeaderboardId", + "name": "SetLeaderboardId", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyLeaderboardId" + }, + "parameters": [ + "Object", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "RestartButton", - "persistentUuid": "5c42ce36-97f5-4c77-8e1b-6562b86407b4", - "width": 0, - "x": 25, - "y": 202, - "zOrder": 25, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "value": "", + "type": "String", + "label": "Default player name", + "name": "DefaultPlayerName" }, { - "angle": 0, - "customSize": true, - "height": 30, - "layer": "", - "name": "PlayerNameInput", - "persistentUuid": "56f0bab1-1656-4999-85c4-9e24cfac73bc", - "width": 250, - "x": 25, - "y": 150, - "zOrder": 24, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "value": "", + "type": "LeaderboardId", + "label": "Leaderboard", + "name": "LeaderboardId" }, { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "SubmitButton", - "persistentUuid": "65924bc8-c391-4021-95a0-912fac6a4866", - "width": 0, - "x": 207, - "y": 202, - "zOrder": 26, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "", + "hidden": true, + "name": "Score" } - ] + ], + "variants": [] } ] }, @@ -4899,6 +4900,7 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Ellipse movement", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNpbmUtd2F2ZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNi41LDIxQzEzLjUsMjEgMTIuMzEsMTYuNzYgMTEuMDUsMTIuMjhDMTAuMTQsOS4wNCA5LDUgNy41LDVDNC4xMSw1IDQsMTEuOTMgNCwxMkgyQzIsMTEuNjMgMi4wNiwzIDcuNSwzQzEwLjUsMyAxMS43MSw3LjI1IDEyLjk3LDExLjc0QzEzLjgzLDE0LjggMTUsMTkgMTYuNSwxOUMxOS45NCwxOSAyMC4wMywxMi4wNyAyMC4wMywxMkgyMi4wM0MyMi4wMywxMi4zNyAyMS45NywyMSAxNi41LDIxWiIgLz48L3N2Zz4=", "name": "EllipseMovement", @@ -6232,9 +6234,7 @@ "type": "Number", "unit": "Pixel", "label": "Radius of the movement on X axis", - "description": "", "group": "Ellipse", - "extraInformation": [], "name": "RadiusX" }, { @@ -6242,9 +6242,7 @@ "type": "Number", "unit": "Pixel", "label": "Radius of the movement on Y axis", - "description": "", "group": "Ellipse", - "extraInformation": [], "name": "RadiusY" }, { @@ -6252,18 +6250,14 @@ "type": "Number", "unit": "Second", "label": "Loop duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "LoopDuration" }, { "value": "", "type": "Boolean", "label": "Turn left", - "description": "", "group": "Speed", - "extraInformation": [], "name": "InitialTurningLeft" }, { @@ -6271,18 +6265,14 @@ "type": "Number", "unit": "DegreeAngle", "label": "Initial direction", - "description": "", "group": "Speed", - "extraInformation": [], "name": "InitialDirectionAngle" }, { "value": "", "type": "Boolean", "label": "Rotate", - "description": "", "group": "Rotation", - "extraInformation": [], "name": "ShouldRotate" }, { @@ -6290,18 +6280,13 @@ "type": "Number", "unit": "DegreeAngle", "label": "Rotation offset", - "description": "", "group": "Rotation", - "extraInformation": [], "name": "RotationOffset" }, { "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CenterX" }, @@ -6309,9 +6294,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CenterY" }, @@ -6319,9 +6301,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MovementAngle" }, @@ -6329,9 +6308,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldX" }, @@ -6339,9 +6315,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldY" } @@ -6356,12 +6329,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", + "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.4.5", + "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.", "", @@ -6378,6 +6352,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": [], @@ -6422,11 +6402,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -6435,11 +6414,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -6473,12 +6451,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -6488,11 +6466,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -6509,12 +6488,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -6537,12 +6516,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -6552,11 +6531,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -6575,12 +6553,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -6612,11 +6590,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -6646,23 +6623,22 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -6704,11 +6680,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -6723,11 +6698,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -6756,20 +6730,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -6778,11 +6752,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -6794,20 +6767,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -6816,11 +6789,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -6833,20 +6805,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -6855,11 +6827,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -6871,20 +6842,20 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -6893,11 +6864,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -6932,11 +6902,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -6948,11 +6917,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -6961,11 +6929,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -6978,11 +6945,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -6990,11 +6956,10 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -7003,11 +6968,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -7090,22 +7054,20 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -7140,11 +7102,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -7189,11 +7150,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -7238,11 +7198,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -7287,11 +7246,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -7313,11 +7271,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -7354,21 +7311,68 @@ "description": "Check if the button is currently being pressed with mouse or touch.", "fullName": "Is pressed", "functionType": "Condition", - "name": "IsPressed", - "sentence": "_PARAM0_ is pressed", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed outside with mouse or touch.", + "fullName": "Is held outside", + "functionType": "Condition", + "name": "IsPressedOutside", + "sentence": "_PARAM0_ is held outside", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"PressedInside\"" + "\"PressedOutside\"" ] } ], @@ -7400,39 +7404,30 @@ "objectGroups": [] }, { - "description": "Check if the button is currently being pressed outside with mouse or touch.", - "fullName": "Is held outside", - "functionType": "Condition", - "name": "IsPressedOutside", - "sentence": "_PARAM0_ is held outside", + "description": "the touch id that is using the button or 0 if none.", + "fullName": "Touch id", + "functionType": "ExpressionAndCondition", + "name": "TouchId", + "sentence": "the touch id", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "TouchId" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -7440,139 +7435,333 @@ "type": "object" }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "Should check hovering", + "hidden": true, + "name": "ShouldCheckHovering" + }, + { + "value": "Idle", + "type": "Choice", + "label": "State", + "extraInformation": [ + "Idle", + "Hovered", + "PressedInside", + "PressedOutside", + "Validated" + ], + "hidden": true, + "name": "State" + }, + { + "value": "0", + "type": "Number", + "label": "Touch id", + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Boolean", + "label": "Touch is inside", + "hidden": true, + "name": "TouchIsInside" + }, + { + "value": "", + "type": "Boolean", + "label": "Mouse is inside", + "hidden": true, + "name": "MouseIsInside" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "Index" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [ + { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "Button", + "description": "A button that can be customized.", + "fullName": "Button (panel sprite)", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, + "name": "PanelSpriteButton", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 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": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false } - ], - "objectGroups": [] - }, + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ { - "description": "the touch id that is using the button or 0 if none.", - "fullName": "Touch id", - "functionType": "ExpressionAndCondition", - "name": "TouchId", - "sentence": "the touch id", - "events": [ + "name": "Background", + "objects": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "TouchId" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ + "name": "Idle" + }, { - "description": "Object", - "name": "Object", - "type": "object" + "name": "Hovered" }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" + "name": "Pressed" } - ], - "objectGroups": [] + ] } ], - "propertyDescriptors": [ - { - "value": "true", - "type": "Boolean", - "label": "", - "description": "Should check hovering", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "ShouldCheckHovering" - }, + "layers": [ { - "value": "Idle", - "type": "Choice", - "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "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 + } ], - "hidden": true, - "name": "State" - }, - { - "value": "0", - "type": "Number", - "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchId" - }, - { - "value": "", - "type": "Boolean", - "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchIsInside" - }, + "effects": [] + } + ], + "instances": [ { - "value": "", - "type": "Boolean", - "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "MouseIsInside" + "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": [] }, { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "Index" + "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": [] } ], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [ - { - "areaMaxX": 64, - "areaMaxY": 64, - "areaMaxZ": 64, - "areaMinX": 0, - "areaMinY": 0, - "areaMinZ": 0, - "defaultName": "Button", - "description": "A button that can be customized.", - "fullName": "Button (panel sprite)", - "isUsingLegacyInstancesRenderer": true, - "name": "PanelSpriteButton", "eventsFunctions": [ { "fullName": "", @@ -7602,7 +7791,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -7614,7 +7803,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -7622,14 +7811,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()" ] }, { @@ -7657,63 +7856,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" ] } ] @@ -7750,17 +7912,46 @@ "name": "onHotReloading", "sentence": "", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + }, + "parameters": [ + "Object", + "=", + "PressedLabelOffsetY", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Object", - "" + "Label", + "Text", + "=", + "LabelText" ] } ] @@ -7825,12 +8016,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -7865,10 +8057,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -7877,7 +8069,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -7885,7 +8077,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -7896,10 +8088,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -7923,10 +8115,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -7943,10 +8136,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -7975,12 +8169,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -8020,10 +8215,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -8052,12 +8248,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -8109,12 +8306,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -8146,126 +8344,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": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteButton::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" - ] - } - ] - } - ], - "parameters": [] } ], "parameters": [ @@ -8276,22 +8354,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -8513,6 +8576,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -8521,21 +8585,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", - "LabelText" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -8550,17 +8606,17 @@ }, { "description": "Text", - "name": "LabelText", + "name": "Value", "type": "string" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", "sentence": "", "events": [ { @@ -8569,18 +8625,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Label", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -8592,12 +8648,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", @@ -8605,17 +8660,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Label.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -8628,91 +8683,110 @@ "objectGroups": [] }, { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "MettreXY" + "value": "BooleanVariable" }, "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" + "ShouldActivate", + "True", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "TextObject::WrappingWidth" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" + "Idle", + "ButtonFSM", + "yes" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "SetCenterY" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" + "ShouldActivate", + "True", + "" ] } ], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "no" ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" }, + { + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "value": "BehaviorActivated" }, "parameters": [ - "Object", - "" + "Idle", + "ButtonFSM" ] } ], "actions": [ { "type": { - "value": "MettreY" + "value": "SetReturnBoolean" }, "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" + "True" ] } ] @@ -8726,77 +8800,74 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"ShouldActivate\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnNumber" }, "parameters": [ - "Idle", - "ButtonFSM", - "yes" + "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": [ + "conditions": [], + "actions": [ { "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "SetCenterY" }, "parameters": [ - "\"ShouldActivate\"" + "Label", + "+", + "Value - LabelOffset" ] - } - ], - "actions": [ + }, { "type": { - "value": "ActivateBehavior" + "value": "SetNumberVariable" }, "parameters": [ - "Idle", - "ButtonFSM", - "no" + "LabelOffset", + "=", + "Value" ] } ] @@ -8808,281 +8879,569 @@ "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" + }, + { + "value": "0.25", + "type": "Number", + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Label offset on Y axis when pressed", + "group": "States", + "name": "PressedLabelOffsetY" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" + }, + { + "value": "", + "type": "Choice", + "label": "", + "extraInformation": [ + "Label.Text=LabelText" + ], + "hidden": true, + "name": "_PropertyMapping" + } + ], + "variants": [ + { + "areaMaxX": 136, + "areaMaxY": 80, + "areaMaxZ": 1, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Big yellow blocky button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "04B_19__.TTF", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": true, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "0;0;0", + "outlineThickness": 4, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Text", + "font": "04B_19__.TTF", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "color": "255;255;255" + } }, { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" + "assetStoreId": "", + "bottomMargin": 16, + "height": 80, + "leftMargin": 8, + "name": "Idle", + "rightMargin": 8, + "texture": "assets\\buttonSmall.png", + "tiled": false, + "topMargin": 8, + "type": "PanelSpriteObject::PanelSprite", + "width": 136, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 80, + "leftMargin": 8, + "name": "Hovered", + "rightMargin": 8, + "texture": "assets\\buttonSmall.png", + "tiled": false, + "topMargin": 8, + "type": "PanelSpriteObject::PanelSprite", + "width": 136, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 80, + "leftMargin": 8, + "name": "Pressed", + "rightMargin": 8, + "texture": "assets\\buttonSmall.png", + "tiled": false, + "topMargin": 8, + "type": "PanelSpriteObject::PanelSprite", + "width": 136, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] } ], - "objectGroups": [] + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": false, + "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": 69, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 132, + "x": 2, + "y": 37, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] }, { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", - "events": [ + "areaMaxX": 68, + "areaMaxY": 40, + "areaMaxZ": 1, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Yellow blocky button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "04B_19__.TTF", + "textAlignment": "center", + "characterSize": 15, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": true, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "0;0;0", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Text", + "font": "04B_19__.TTF", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 15, + "color": "255;255;255" + } + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "assetStoreId": "", + "bottomMargin": 16, + "height": 40, + "leftMargin": 8, + "name": "Idle", + "rightMargin": 8, + "texture": "assets\\buttonSmall.png", + "tiled": false, + "topMargin": 8, + "type": "PanelSpriteObject::PanelSprite", + "width": 68, + "variables": [ { - "type": { - "value": "BehaviorActivated" - }, - "parameters": [ - "Idle", - "ButtonFSM" - ] + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" } ], - "actions": [ + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true } ] - } - ], - "parameters": [ + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "assetStoreId": "", + "bottomMargin": 16, + "height": 40, + "leftMargin": 8, + "name": "Hovered", + "rightMargin": 8, + "texture": "assets\\buttonSmall.png", + "tiled": false, + "topMargin": 8, + "type": "PanelSpriteObject::PanelSprite", + "width": 68, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 40, + "leftMargin": 8, + "name": "Pressed", + "rightMargin": 8, + "texture": "assets\\buttonSmall.png", + "tiled": false, + "topMargin": 8, + "type": "PanelSpriteObject::PanelSprite", + "width": 68, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] } ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "name": "PressedLabelOffsetY" - }, - { - "value": "0", - "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "LeftPadding" - }, - { - "value": "0", - "type": "Number", - "label": "Right padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "RightPadding" - }, - { - "value": "0", - "type": "Number", - "label": "Top padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "TopPadding" - }, - { - "value": "0", - "type": "Number", - "label": "Bottom padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "BottomPadding" - }, - { - "value": "0.25", - "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], - "name": "HoveredFadeOutDuration" - } - ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] }, - "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": "Text", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "0;0;0" - } - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "objectsGroups": [ { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] } ], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "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": [] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, { - "name": "Tween", - "type": "Tween::TweenBehavior" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 29, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 64, + "x": 2, + "y": 17, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Idle" - }, - { - "objectName": "Hovered" - }, - { - "objectName": "Pressed" - } - ] - }, - "objectsGroups": [], - "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": [] + ] } ] }, @@ -9091,6 +9450,7 @@ "category": "Visual effect", "extensionNamespace": "", "fullName": "Shake object", + "gdevelopVersion": "", "helpPath": "https://victrisgames.itch.io/gdevelop-camera-shake-example", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFycm93LWFsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMywxMUgxOEwxNi41LDkuNUwxNy45Miw4LjA4TDIxLjg0LDEyTDE3LjkyLDE1LjkyTDE2LjUsMTQuNUwxOCwxM0gxM1YxOEwxNC41LDE2LjVMMTUuOTIsMTcuOTJMMTIsMjEuODRMOC4wOCwxNy45Mkw5LjUsMTYuNUwxMSwxOFYxM0g2TDcuNSwxNC41TDYuMDgsMTUuOTJMMi4xNiwxMkw2LjA4LDguMDhMNy41LDkuNUw2LDExSDExVjZMOS41LDcuNUw4LjA4LDYuMDhMMTIsMi4xNkwxNS45Miw2LjA4TDE0LjUsNy41TDEzLDZWMTFaIiAvPjwvc3ZnPg==", "name": "ShakeObject", @@ -13495,6 +13855,7 @@ "category": "Visual effect", "extensionNamespace": "", "fullName": "Flash object", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZsYXNoLW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNywySDE3TDEzLjUsOUgxN0wxMCwyMlYxNEg3VjJNOSw0VjEySDEyVjE0LjY2TDE0LDExSDEwLjI0TDEzLjc2LDRIOVoiIC8+PC9zdmc+", "name": "Flash", @@ -14497,17 +14858,12 @@ "unit": "Second", "label": "Half period ", "description": "Time that the object is invisible", - "group": "", - "extraInformation": [], "name": "HalfPeriodTime" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsFlashing" }, @@ -14517,8 +14873,6 @@ "unit": "Second", "label": "Flash duration", "description": "Use \"0\" to keep flashing until stopped", - "group": "", - "extraInformation": [], "hidden": true, "name": "FlashDuration" } @@ -15071,17 +15425,12 @@ "unit": "Second", "label": "Half period", "description": "Time between flashes", - "group": "", - "extraInformation": [], "name": "HalfPeriodTime" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsFlashing" }, @@ -15091,8 +15440,6 @@ "unit": "Second", "label": "Flash duration", "description": "Use \"0\" to keep flashing until stopped", - "group": "", - "extraInformation": [], "hidden": true, "name": "FlashDuration" }, @@ -15100,9 +15447,6 @@ "value": "\"255;255;255\"", "type": "String", "label": "Tint color", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TintColor" } @@ -15711,8 +16055,6 @@ "value": "", "type": "Behavior", "label": "Tween Behavior (required)", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], @@ -15724,17 +16066,12 @@ "unit": "Second", "label": "Half period", "description": "Time between flashes", - "group": "", - "extraInformation": [], "name": "HalfPeriodTime" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsFlashing" }, @@ -15744,8 +16081,6 @@ "unit": "Second", "label": "Flash duration", "description": "Use \"0\" to keep flashing until stopped", - "group": "", - "extraInformation": [], "hidden": true, "name": "FlashDuration" }, @@ -15755,8 +16090,6 @@ "unit": "Dimensionless", "label": "Target opacity (Range: 0 - 255)", "description": "Opacity will fade between the starting value and a target value", - "group": "", - "extraInformation": [], "hidden": true, "name": "TargetOpacity" }, @@ -15766,8 +16099,6 @@ "unit": "Dimensionless", "label": "Starting opacity", "description": "Opacity will fade between the starting value and a target value", - "group": "", - "extraInformation": [], "hidden": true, "name": "StartingOpacity" } @@ -16468,17 +16799,12 @@ "unit": "Second", "label": "Half period", "description": "Time between flashes", - "group": "", - "extraInformation": [], "name": "HalfPeriodTime" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsFlashing" }, @@ -16488,8 +16814,6 @@ "unit": "Second", "label": "Flash duration", "description": "Use \"0\" to keep flashing until stopped", - "group": "", - "extraInformation": [], "hidden": true, "name": "FlashDuration" }, @@ -16497,9 +16821,6 @@ "value": "", "type": "String", "label": "Name of effect", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "EffectName" } diff --git a/examples/top-down-rpg/top-down-rpg.json b/examples/top-down-rpg/top-down-rpg.json index 7a26ce311..09dde73b4 100644 --- a/examples/top-down-rpg/top-down-rpg.json +++ b/examples/top-down-rpg/top-down-rpg.json @@ -1,7 +1,7 @@ { "firstLayout": "Overworld", "gdVersion": { - "build": 236, + "build": 237, "major": 5, "minor": 5, "revision": 0 @@ -86,7 +86,9 @@ "rpg" ], "playableDevices": [ - "keyboard" + "keyboard", + "mobile", + "mobile" ], "extensionProperties": [], "platforms": [ @@ -1806,7 +1808,7 @@ "assetStoreId": "", "name": "DialogBox", "type": "TwoChoicesDialogBoxes::TwoChoicesDialogBox", - "variant": "", + "variant": "Black and white dialog", "variables": [], "effects": [], "behaviors": [], @@ -1826,6 +1828,7 @@ { "name": "TopDownMovement", "type": "TopDownMovementBehavior::TopDownMovementBehavior", + "useLegacyTurnBack": false, "acceleration": 900000, "allowDiagonals": false, "angleOffset": 0, @@ -4268,7 +4271,7 @@ "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", "name": "Attack1", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Black and white button (left aligned)", "variables": [], "effects": [], "behaviors": [], @@ -4279,7 +4282,8 @@ "IdleLabelOffsetY": -8, "BottomPadding": 8, "TopPadding": 8, - "MinimalWidth": 300 + "MinimalWidth": 300, + "LabelText": "Attack" }, "childrenContent": { "Hovered": { @@ -4354,7 +4358,7 @@ "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", "name": "Attack2", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Black and white button (left aligned)", "variables": [], "effects": [], "behaviors": [], @@ -4365,7 +4369,8 @@ "IdleLabelOffsetY": -8, "BottomPadding": 8, "TopPadding": 8, - "MinimalWidth": 300 + "MinimalWidth": 300, + "LabelText": "Skill" }, "childrenContent": { "Hovered": { @@ -4440,7 +4445,7 @@ "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", "name": "Run", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Black and white button (left aligned)", "variables": [], "effects": [], "behaviors": [], @@ -4451,7 +4456,8 @@ "IdleLabelOffsetY": -8, "BottomPadding": 8, "TopPadding": 8, - "MinimalWidth": 300 + "MinimalWidth": 300, + "LabelText": "Run" }, "childrenContent": { "Hovered": { @@ -6868,13 +6874,13 @@ "category": "Input", "extensionNamespace": "", "fullName": "Two choices dialog boxes", - "gdevelopVersion": "", + "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." @@ -6919,7 +6925,7 @@ "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", "name": "NoButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Semi-transparent black and white", "variables": [ { "name": "ID", @@ -6961,81 +6967,13 @@ "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", - "variant": "", + "variant": "Semi-transparent black and white", "variables": [ { "name": "ID", @@ -7077,74 +7015,6 @@ "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 - } } }, { @@ -8075,7 +7945,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "ActiveButtonById" + "HighlightedButtonIndex" ] } ] @@ -8111,7 +7981,7 @@ "value": "SetNumberVariable" }, "parameters": [ - "ActiveButtonById", + "HighlightedButtonIndex", "=", "mod(Value, SceneInstancesCount(Buttons))" ] @@ -8129,7 +7999,7 @@ "Buttons", "ID", "=", - "ActiveButtonById" + "HighlightedButtonIndex" ] } ], @@ -8158,7 +8028,7 @@ "Buttons", "ID", "!=", - "ActiveButtonById" + "HighlightedButtonIndex" ] } ], @@ -8274,7 +8144,7 @@ "propertyDescriptors": [ { "value": "Default message. Continue?", - "type": "String", + "type": "MultilineString", "label": "Message", "name": "TextMessage" }, @@ -8282,10 +8152,9 @@ "value": "0", "type": "Number", "unit": "Dimensionless", - "label": "Default highlighted button identifier", - "description": "Default highlighted button identifier.", - "deprecated": true, - "name": "ActiveButtonById" + "label": "", + "hidden": true, + "name": "HighlightedButtonIndex" }, { "value": "true", @@ -8307,135 +8176,448 @@ "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" } ], - "variants": [] - } - ] - }, - { - "author": "", - "category": "Input", - "extensionNamespace": "", - "fullName": "Multitouch joystick and buttons (sprite)", - "gdevelopVersion": ">=5.5.222", - "helpPath": "/objects/multitouch-joystick", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMTYiIGN5PSIxNiIgcj0iMTMiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjI4LjQsMTIgMjAsMTIgMjAsMy42ICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMjAsMjguNCAyMCwyMCAyOC40LDIwICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMy42LDIwIDEyLDIwIDEyLDI4LjQgIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIxMiwzLjYgMTIsMTIgMy42LDEyICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIxNiw2IDE2LjcsNyAxNS4zLDcgIi8+DQo8cG9seWdvbiBjbGFzcz0ic3QwIiBwb2ludHM9IjE2LDI2IDE1LjMsMjUgMTYuNywyNSAiLz4NCjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iNiwxNiA3LDE1LjMgNywxNi43ICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIyNiwxNiAyNSwxNi43IDI1LDE1LjMgIi8+DQo8L3N2Zz4NCg==", - "name": "SpriteMultitouchJoystick", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Videogames/Videogames_controller_joystick_arrows_direction.svg", - "shortDescription": "Joysticks or buttons for touchscreens.", - "version": "1.8.3", - "description": [ - "Multitouch joysticks can be used the same way as physical gamepads:", - "- 4 or 8 directions", - "- Analogus pads", - "- Player selection", - "- Controls mapping for top-down movement and platformer characters", - "", - "There are ready-to-use joysticks in the asset-store [multitouch joysticks pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=multitouch-joysticks-multitouch-joysticks)." - ], - "origin": { - "identifier": "SpriteMultitouchJoystick", - "name": "gdevelop-extension-store" - }, - "tags": [ - "multitouch", - "joystick", - "thumbstick", - "controller", - "touchscreen", - "twin stick", - "shooter", - "virtual", - "platformer", - "platform", - "top-down" - ], - "authorIds": [ - "gqDaZjCfevOOxBYkK6zlhtZnXCg1", - "1OgYzWp5UeVPbiWGJwI6vqfgZLC3", - "v0YRpdAnIucZFgiRCCecqVnGKno2", - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" - ], - "dependencies": [], - "globalVariables": [], - "sceneVariables": [ - { - "name": "Controllers", - "type": "array", - "children": [ + "variants": [ { - "type": "structure", - "children": [ + "areaMaxX": 600, + "areaMaxY": 213, + "areaMaxZ": 32, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Black and white dialog", + "objects": [ { - "name": "Buttons", - "type": "array", - "children": [ + "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", + "name": "NoButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Black and white button", + "variables": [ { - "type": "structure", - "children": [ - { - "name": "State", - "type": "string", - "value": "Idle" - } - ] + "name": "ID", + "type": "number", + "value": 0 } - ] - }, - { - "name": "Joystick", - "type": "structure", - "children": [] - } - ] - } - ] - } - ], - "eventsFunctions": [ - { - "fullName": "Accelerated speed", - "functionType": "Expression", - "name": "AcceleratedSpeed", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "AcceleratedSpeed", - "=", - "CurrentSpeed" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + ], + "effects": [ { - "type": { - "value": "NumberVariable" + "effectType": "Outline", + "name": "OutlineEffect", + "doubleParameters": { + "padding": 0, + "thickness": 2 }, - "parameters": [ - "TargetedSpeed", - "<", - "0" - ] + "stringParameters": { + "color": "255;255;255" + }, + "booleanParameters": {} } ], - "actions": [], - "events": [ + "behaviors": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { + "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, + "LabelText": "No" + } + }, + { + "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", + "name": "YesButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Black and white button", + "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, + "LabelText": "Yes" + } + }, + { + "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 + } + ] + } + ] + } + ] + } + ] + }, + { + "author": "", + "category": "Input", + "extensionNamespace": "", + "fullName": "Multitouch joystick and buttons (sprite)", + "gdevelopVersion": ">=5.5.222", + "helpPath": "/objects/multitouch-joystick", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMTYiIGN5PSIxNiIgcj0iMTMiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjI4LjQsMTIgMjAsMTIgMjAsMy42ICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMjAsMjguNCAyMCwyMCAyOC40LDIwICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMy42LDIwIDEyLDIwIDEyLDI4LjQgIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIxMiwzLjYgMTIsMTIgMy42LDEyICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIxNiw2IDE2LjcsNyAxNS4zLDcgIi8+DQo8cG9seWdvbiBjbGFzcz0ic3QwIiBwb2ludHM9IjE2LDI2IDE1LjMsMjUgMTYuNywyNSAiLz4NCjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iNiwxNiA3LDE1LjMgNywxNi43ICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIyNiwxNiAyNSwxNi43IDI1LDE1LjMgIi8+DQo8L3N2Zz4NCg==", + "name": "SpriteMultitouchJoystick", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Videogames/Videogames_controller_joystick_arrows_direction.svg", + "shortDescription": "Joysticks or buttons for touchscreens.", + "version": "1.8.3", + "description": [ + "Multitouch joysticks can be used the same way as physical gamepads:", + "- 4 or 8 directions", + "- Analogus pads", + "- Player selection", + "- Controls mapping for top-down movement and platformer characters", + "", + "There are ready-to-use joysticks in the asset-store [multitouch joysticks pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=multitouch-joysticks-multitouch-joysticks)." + ], + "origin": { + "identifier": "SpriteMultitouchJoystick", + "name": "gdevelop-extension-store" + }, + "tags": [ + "multitouch", + "joystick", + "thumbstick", + "controller", + "touchscreen", + "twin stick", + "shooter", + "virtual", + "platformer", + "platform", + "top-down" + ], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1", + "1OgYzWp5UeVPbiWGJwI6vqfgZLC3", + "v0YRpdAnIucZFgiRCCecqVnGKno2", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [ + { + "name": "Controllers", + "type": "array", + "children": [ + { + "type": "structure", + "children": [ + { + "name": "Buttons", + "type": "array", + "children": [ + { + "type": "structure", + "children": [ + { + "name": "State", + "type": "string", + "value": "Idle" + } + ] + } + ] + }, + { + "name": "Joystick", + "type": "structure", + "children": [] + } + ] + } + ] + } + ], + "eventsFunctions": [ + { + "fullName": "Accelerated speed", + "functionType": "Expression", + "name": "AcceleratedSpeed", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "=", + "CurrentSpeed" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TargetedSpeed", + "<", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { "b": 109, "g": 230, "r": 255, @@ -27068,13 +27250,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", - "gdevelopVersion": "", + "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.", "", @@ -27091,6 +27273,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": [], @@ -28234,7 +28422,7 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 64, + "areaMaxX": 256, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, @@ -28243,7 +28431,8 @@ "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", - "isUsingLegacyInstancesRenderer": true, + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", "objects": [ { @@ -28256,10 +28445,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, @@ -28282,8 +28482,8 @@ "underlined": false, "text": "Text", "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", + "textAlignment": "center", + "verticalTextAlignment": "center", "characterSize": 20, "color": "0;0;0" } @@ -28310,6 +28510,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", @@ -28332,6 +28542,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" @@ -28352,7 +28572,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": { @@ -28372,7 +28603,22 @@ } ] }, - "objectsGroups": [], + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], "layers": [ { "ambientLightColorB": 200, @@ -28403,7 +28649,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": "", @@ -28433,7 +28712,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -28444,23 +28723,33 @@ "value": "Create" }, "parameters": [ - "", + "", + "Pressed", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ "Hovered", - "0", - "0", - "" + "Resizable", + "Idle.Width()", + "Idle.Height()" ] }, { "type": { - "value": "Create" + "value": "ResizableCapability::ResizableBehavior::SetSize" }, "parameters": [ - "", "Pressed", - "0", - "0", - "" + "Resizable", + "Idle.Width()", + "Idle.Height()" ] }, { @@ -28488,63 +28777,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" ] } ] @@ -28583,18 +28835,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": [ @@ -28656,12 +28937,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -28708,7 +28990,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -28716,7 +28998,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -28754,10 +29036,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -28774,10 +29057,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -28806,12 +29090,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -28851,10 +29136,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -28883,12 +29169,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -28940,12 +29227,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -28977,143 +29265,92 @@ } ], "parameters": [] - }, + } + ], + "parameters": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsIdle" }, - "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." - }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ { - "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 - } - ] - } + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsClicked" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" ] } ], - "parameters": [] + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] } ], "parameters": [ @@ -29124,36 +29361,64 @@ "type": "object" } ], - "objectGroups": [ + "objectGroups": [] + }, + { + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", + "events": [ { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "name": "Hovered" - }, + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsHovered" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ { - "name": "Pressed" + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] } ] } - ] + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] }, { - "description": "Check if the button is not used.", - "fullName": "Is idle", + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", "functionType": "Condition", - "name": "IsIdle", - "sentence": "_PARAM0_ is idle", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::IsIdle" + "value": "PanelSpriteButton::ButtonFSM::IsFocused" }, "parameters": [ "Idle", @@ -29185,18 +29450,18 @@ "objectGroups": [] }, { - "description": "Check if the button was just clicked.", - "fullName": "Is clicked", + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", "functionType": "Condition", - "name": "IsClicked", - "sentence": "_PARAM0_ is clicked", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::IsClicked" + "value": "PanelSpriteButton::ButtonFSM::IsPressed" }, "parameters": [ "Idle", @@ -29228,22 +29493,161 @@ "objectGroups": [] }, { - "description": "Check if the cursor is hovered over the button.", - "fullName": "Is hovered", - "functionType": "Condition", - "name": "IsHovered", - "sentence": "_PARAM0_ is hovered", + "description": "Change the text of the button label.", + "fullName": "Label text", + "functionType": "Action", + "name": "SetLabelText", + "private": true, + "sentence": "Change the text of _PARAM0_ to _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Label", + "Text", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + }, + { + "description": "Text", + "name": "Value", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Label", + "Text", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the label text.", + "fullName": "Label text", + "functionType": "ExpressionAndCondition", + "name": "LabelText", + "sentence": "the label text", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Label.Text::Value()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", + "functionType": "Action", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::IsHovered" + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldActivate", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" }, "parameters": [ "Idle", "ButtonFSM", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldActivate", + "True", "" ] } @@ -29251,10 +29655,12 @@ "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "ActivateBehavior" }, "parameters": [ - "True" + "Idle", + "ButtonFSM", + "no" ] } ] @@ -29266,28 +29672,32 @@ "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" + }, + { + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Check if the button is either hovered or pressed but not hovered.", - "fullName": "Is focused", + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", "functionType": "Condition", - "name": "IsFocused", - "sentence": "_PARAM0_ is focused", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::IsFocused" + "value": "BehaviorActivated" }, "parameters": [ "Idle", - "ButtonFSM", - "" + "ButtonFSM" ] } ], @@ -29314,38 +29724,31 @@ "objectGroups": [] }, { - "description": "Check if the button is currently being pressed with mouse or touch.", - "fullName": "Is pressed", - "functionType": "Condition", - "name": "IsPressed", - "sentence": "_PARAM0_ is pressed", + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsPressed" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "LabelOffset" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -29357,11 +29760,12 @@ "objectGroups": [] }, { - "description": "Change the text of the button label.", - "fullName": "Label text", - "functionType": "Action", - "name": "SetLabelText", - "sentence": "Change the text of _PARAM0_ to _PARAM1_", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -29369,21 +29773,22 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "SetCenterY" }, "parameters": [ "Label", - "=", - "LabelText" + "+", + "Value - LabelOffset" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "" + "LabelOffset", + "=", + "Value" ] } ] @@ -29395,186 +29800,490 @@ "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - }, - { - "description": "Text", - "name": "LabelText", - "type": "string" } ], "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", - "sentence": "", - "events": [ + "value": "0.25", + "type": "Number", + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Label offset on Y axis when pressed", + "group": "States", + "name": "PressedLabelOffsetY" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" + }, + { + "value": "", + "type": "Choice", + "label": "", + "extraInformation": [ + "Label.Text=LabelText" + ], + "hidden": true, + "name": "_PropertyMapping" + } + ], + "variants": [ + { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Black and white button (left aligned)", + "objects": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "left", + "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": "Text", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "center", + "characterSize": 26, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 8, + "height": 32, + "leftMargin": 8, + "name": "Idle", + "rightMargin": 8, + "texture": "Border.png", + "tiled": false, + "topMargin": 8, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 8, + "height": 32, + "leftMargin": 8, + "name": "Hovered", + "rightMargin": 8, + "texture": "Border2.png", + "tiled": false, + "topMargin": 8, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "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" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 8, + "height": 32, + "leftMargin": 8, + "name": "Pressed", + "rightMargin": 8, + "texture": "Border2.png", + "tiled": false, + "topMargin": 8, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "Label.String()" - ] + "name": "Hovered" + }, + { + "name": "Pressed" } ] } ], - "expressionType": { - "type": "string" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "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": "", - "events": [ + "layers": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" - ] + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 } - ] + ], + "effects": [] } ], - "expressionType": { - "type": "expression" - }, - "parameters": [ + "instances": [ { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "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": 235, + "x": 10, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } - ], - "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": [ + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Black and white button", + "objects": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" - ] - }, + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "TextObject::WrappingWidth" - }, - "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" - ] - }, + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "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": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 26, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 8, + "height": 32, + "leftMargin": 8, + "name": "Idle", + "rightMargin": 8, + "texture": "Border.png", + "tiled": false, + "topMargin": 8, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" } ], - "events": [ + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": [ - "Object", - "" - ] - } - ], - "actions": [ + "assetStoreId": "", + "bottomMargin": 8, + "height": 32, + "leftMargin": 8, + "name": "Hovered", + "rightMargin": 8, + "texture": "Border2.png", + "tiled": false, + "topMargin": 8, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "MettreY" - }, - "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" } ] - } - ], - "parameters": [ + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "assetStoreId": "", + "bottomMargin": 8, + "height": 32, + "leftMargin": 8, + "name": "Pressed", + "rightMargin": 8, + "texture": "Border2.png", + "tiled": false, + "topMargin": 8, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] } ], - "objectGroups": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ { "name": "Background", "objects": [ @@ -29589,184 +30298,73 @@ } ] } - ] - }, - { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BooleanVariable" - }, - "parameters": [ - "ShouldActivate", - "True", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ActivateBehavior" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "yes" - ] - } - ] - }, + ], + "layers": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ { - "type": { - "inverted": true, - "value": "BooleanVariable" - }, - "parameters": [ - "ShouldActivate", - "True", - "" - ] + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 } ], - "actions": [ - { - "type": { - "value": "ActivateBehavior" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "no" - ] - } - ] + "effects": [] } ], - "parameters": [ + "instances": [ { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "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": [] }, { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" - } - ], - "objectGroups": [] - }, - { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": [ - "Idle", - "ButtonFSM" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 244, + "x": 6, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "name": "PressedLabelOffsetY" - }, - { - "value": "0", - "type": "Number", - "label": "Left padding", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "LeftPadding" - }, - { - "value": "0", - "type": "Number", - "label": "Right padding", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "RightPadding" - }, - { - "value": "0", - "type": "Number", - "label": "Top padding", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "TopPadding" - }, - { - "value": "0", - "type": "Number", - "label": "Bottom padding", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "BottomPadding" - }, - { - "value": "0.25", - "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "name": "HoveredFadeOutDuration" + ] } - ], - "variants": [] + ] } ] }, diff --git a/examples/tower-defense-war/tower-defense-war.json b/examples/tower-defense-war/tower-defense-war.json index 6eac8a5b3..de93b177d 100644 --- a/examples/tower-defense-war/tower-defense-war.json +++ b/examples/tower-defense-war/tower-defense-war.json @@ -1,7 +1,7 @@ { "firstLayout": "GameScene", "gdVersion": { - "build": 236, + "build": 237, "major": 5, "minor": 5, "revision": 0 @@ -81,7 +81,9 @@ "authorIds": [], "authorUsernames": [], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -399,6 +401,22 @@ "name": "Flat Heart Filled.png" } }, + { + "file": "thumbnail.png", + "kind": "image", + "metadata": "", + "name": "Tower Defense 1 thumbnail 2.png", + "smoothed": true, + "userAdded": true + }, + { + "file": "assets/towerDefense_tilesheet.png", + "kind": "image", + "metadata": "", + "name": "towerDefense_tilesheet.png", + "smoothed": true, + "userAdded": false + }, { "file": "assets/Grey Button_Hovered.png", "kind": "image", @@ -407,7 +425,7 @@ "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/b43e0035dca80ea2fad5c5d65de926dae0185038e5f9cb21d5f20234f30d1c76_Grey Button_Hovered.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/b43e0035dca80ea2fad5c5d65de926dae0185038e5f9cb21d5f20234f30d1c76_Grey Button_Hovered.png", "name": "Grey Button_Hovered.png" } }, @@ -419,7 +437,7 @@ "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/da7fc2efa0882eb5dfa0266315f2483c2f68d86a6751dc309ea9e9d0dd4759ba_Grey Button_Idle.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/da7fc2efa0882eb5dfa0266315f2483c2f68d86a6751dc309ea9e9d0dd4759ba_Grey Button_Idle.png", "name": "Grey Button_Idle.png" } }, @@ -431,49 +449,9 @@ "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/49c35e14af0e1f7aae407455cb944de96328955870e5f1500f63723ad879a42e_Grey Button_Pressed.png", + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/49c35e14af0e1f7aae407455cb944de96328955870e5f1500f63723ad879a42e_Grey Button_Pressed.png", "name": "Grey Button_Pressed.png" } - }, - { - "file": "assets/Grey Button_Idle.png", - "kind": "image", - "metadata": "", - "name": "assets\\Grey Button_Idle.png", - "smoothed": true, - "userAdded": true - }, - { - "file": "assets/Grey Button_Hovered.png", - "kind": "image", - "metadata": "", - "name": "assets\\Grey Button_Hovered.png", - "smoothed": true, - "userAdded": false - }, - { - "file": "assets/Grey Button_Pressed.png", - "kind": "image", - "metadata": "", - "name": "assets\\Grey Button_Pressed.png", - "smoothed": true, - "userAdded": false - }, - { - "file": "thumbnail.png", - "kind": "image", - "metadata": "", - "name": "Tower Defense 1 thumbnail 2.png", - "smoothed": true, - "userAdded": true - }, - { - "file": "assets/towerDefense_tilesheet.png", - "kind": "image", - "metadata": "", - "name": "towerDefense_tilesheet.png", - "smoothed": true, - "userAdded": false } ], "resourceFolders": [] @@ -505,7 +483,7 @@ "gridColor": 10401023, "gridAlpha": 0.2, "snap": true, - "zoomFactor": 0.33253870912507016, + "zoomFactor": 0.6040838749988738, "windowMask": false }, "objectsGroups": [ @@ -519,14 +497,6 @@ "name": "Tilemap" } ] - }, - { - "name": "Button", - "objects": [ - { - "name": "Tower1_Icon" - } - ] } ], "variables": [ @@ -573,21 +543,6 @@ } ], "instances": [ - { - "angle": 0, - "customSize": true, - "height": 128, - "layer": "UI", - "name": "Tower1_Icon", - "persistentUuid": "82b25bb7-cc71-45e6-8c52-a33924931c97", - "width": 128, - "x": 1120, - "y": 32, - "zOrder": 1, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, { "angle": 0, "customSize": true, @@ -626,7 +581,7 @@ "name": "TutorialText", "persistentUuid": "ebc61498-a433-4ef7-a584-08a2d8162426", "width": 0, - "x": 0, + "x": 11, "y": 629, "zOrder": 10, "numberProperties": [], @@ -635,12 +590,13 @@ }, { "angle": 0, - "customSize": false, - "height": 0, + "customSize": true, + "depth": 64, + "height": 106, "layer": "UI", "name": "NextWaveButton", "persistentUuid": "f5060be5-5e9f-4809-bae0-89baabb1eb27", - "width": 0, + "width": 219, "x": 1056, "y": 608, "zOrder": 19, @@ -779,6 +735,22 @@ } ], "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "TowerButton", + "persistentUuid": "8b6b4c98-d3ff-41ef-8e4a-6a0d859d9ffa", + "width": 0, + "x": 1184, + "y": 96, + "zOrder": 36, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ @@ -842,116 +814,6 @@ } ] }, - { - "assetStoreId": "5f0df6131c9646dcbe98798196db5b6d806eb25564f86d2e119a084d1e20bf74", - "name": "Tower1_Icon", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", - "variables": [], - "effects": [ - { - "effectType": "Outline", - "name": "Black", - "doubleParameters": { - "padding": 5, - "thickness": 5 - }, - "stringParameters": { - "color": "0;0;5" - }, - "booleanParameters": {} - }, - { - "effectType": "Outline", - "name": "White", - "doubleParameters": { - "padding": 5, - "thickness": 5 - }, - "stringParameters": { - "color": "255;255;255" - }, - "booleanParameters": {} - } - ], - "behaviors": [], - "content": { - "LeftPadding": 0, - "RightPadding": 0, - "PressedLabelOffsetY": 0, - "BottomPadding": 0, - "TopPadding": 0, - "HoveredFadeOutDuration": 0 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 140, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\Tower1_Icon.png", - "tiled": true, - "topMargin": 0, - "width": 120 - }, - "Idle": { - "bottomMargin": 0, - "height": 140, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\Tower1_Icon.png", - "tiled": true, - "topMargin": 0, - "width": 120 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "ArchitectsDaughter.ttf", - "textAlignment": "center", - "characterSize": 22, - "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": "", - "font": "ArchitectsDaughter.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 22, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 140, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\Tower1_Icon.png", - "tiled": true, - "topMargin": 0, - "width": 120 - } - } - }, { "adaptCollisionMaskAutomatically": false, "assetStoreId": "", @@ -1395,7 +1257,7 @@ "assetStoreId": "5f0df6131c9646dcbe98798196db5b6d806eb25564f86d2e119a084d1e20bf74", "name": "NextWaveButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -1405,7 +1267,8 @@ "PressedLabelOffsetY": 6, "BottomPadding": 24, "TopPadding": 20, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Next Wave" }, "childrenContent": { "Hovered": { @@ -1536,91 +1399,6 @@ } } }, - { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "GreyButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Button", - "font": "", - "textAlignment": "center", - "characterSize": 60, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "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": "Button", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 60, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } - } - }, { "assetStoreId": "", "name": "Tilemap", @@ -1635,52 +1413,159 @@ "tileSize": 64, "tilesWithHitBox": "93" } - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Indicator" - }, - { - "objectName": "Tower1_Icon" - }, - { - "objectName": "TowerBase" - }, - { - "objectName": "TowerHead1" - }, - { - "objectName": "Bullet" - }, - { - "objectName": "GoldText" - }, - { - "objectName": "TutorialText" - }, - { - "objectName": "Zombie" - }, - { - "objectName": "Point" + }, + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "TowerButton", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Black", + "doubleParameters": { + "padding": 5, + "thickness": 5 + }, + "stringParameters": { + "color": "0;0;0" + }, + "booleanParameters": {} + }, + { + "effectType": "Outline", + "name": "White", + "doubleParameters": { + "padding": 5, + "thickness": 5 + }, + "stringParameters": { + "color": "255;255;255" + }, + "booleanParameters": {} + } + ], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 2.0247e-320 + }, + { + "name": "ButtonObjectEffects", + "type": "ButtonStates::ButtonObjectEffects", + "ButtonFSM": "ButtonFSM", + "Effect": "Effect", + "IdleEffect": "Black", + "FocusedEffect": "White", + "PressedEffect": "White" + } + ], + "animations": [ + { + "name": "Tower1", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets\\Tower1_Icon.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 64, + "y": 64 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 13, + "y": 13 + }, + { + "x": 115, + "y": 13 + }, + { + "x": 115, + "y": 115 + }, + { + "x": 13, + "y": 115 + } + ] + ] + } + ] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "UI", + "children": [ + { + "objectName": "FlatHeartBar" + }, + { + "objectName": "NextWaveButton" + }, + { + "objectName": "TutorialText" + }, + { + "objectName": "GoldText" + }, + { + "objectName": "TowerButton" + }, + { + "objectName": "Indicator" + } + ] }, { - "objectName": "SpawnPoint" + "objectName": "TowerBase" }, { - "objectName": "NextWaveButton" + "objectName": "TowerHead1" }, { - "objectName": "Range" + "objectName": "Bullet" }, { - "objectName": "FlatHeartBar" + "objectName": "Zombie" + }, + { + "objectName": "Point" }, { - "objectName": "GreyButton" + "objectName": "SpawnPoint" + }, + { + "objectName": "Range" }, { "objectName": "Tilemap" @@ -1753,9 +1638,9 @@ "parameters": [ "Indicator", "=", - "MouseX()", + "CursorX()", "=", - "MouseY()" + "CursorY()" ] }, { @@ -2405,11 +2290,11 @@ "conditions": [ { "type": { - "value": "MouseButtonReleased" + "value": "MouseButtonFromTextReleased" }, "parameters": [ "", - "Left" + "\"Left\"" ] }, { @@ -2517,11 +2402,11 @@ "conditions": [ { "type": { - "value": "MouseButtonReleased" + "value": "MouseButtonFromTextReleased" }, "parameters": [ "", - "Right" + "\"Right\"" ] }, { @@ -2544,83 +2429,6 @@ } ] }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" - }, - "parameters": [ - "Button", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "EffectCapability::EffectBehavior::EnableEffect" - }, - "parameters": [ - "Button", - "Effect", - "\"Black\"", - "no" - ] - }, - { - "type": { - "value": "EffectCapability::EffectBehavior::EnableEffect" - }, - "parameters": [ - "Button", - "Effect", - "\"White\"", - "yes" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" - }, - "parameters": [ - "Button", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "EffectCapability::EffectBehavior::EnableEffect" - }, - "parameters": [ - "Button", - "Effect", - "\"Black\"", - "yes" - ] - }, - { - "type": { - "value": "EffectCapability::EffectBehavior::EnableEffect" - }, - "parameters": [ - "Button", - "Effect", - "\"White\"", - "no" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -2653,10 +2461,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + "value": "ButtonStates::ButtonFSM::IsClicked" }, "parameters": [ - "Tower1_Icon", + "TowerButton", + "ButtonFSM", "" ] } @@ -2756,6 +2565,14 @@ "name": "Animation", "type": "AnimatableCapability::AnimatableBehavior" }, + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM" + }, + { + "name": "ButtonObjectEffects", + "type": "ButtonStates::ButtonObjectEffects" + }, { "name": "Effect", "type": "EffectCapability::EffectBehavior" @@ -14606,13 +14423,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.", "", @@ -14629,6 +14446,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": [], @@ -15772,7 +15595,7 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 64, + "areaMaxX": 256, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, @@ -15781,7 +15604,8 @@ "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", - "isUsingLegacyInstancesRenderer": true, + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", "objects": [ { @@ -15794,10 +15618,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, @@ -15820,8 +15655,8 @@ "underlined": false, "text": "Text", "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", + "textAlignment": "center", + "verticalTextAlignment": "center", "characterSize": 20, "color": "0;0;0" } @@ -15848,6 +15683,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", @@ -15870,6 +15715,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" @@ -15890,7 +15745,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": { @@ -15910,7 +15776,22 @@ } ] }, - "objectsGroups": [], + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], "layers": [ { "ambientLightColorB": 200, @@ -15941,15 +15822,48 @@ "effects": [] } ], - "instances": [], - "eventsFunctions": [ + "instances": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ - { + "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": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, @@ -15971,7 +15885,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -15983,7 +15897,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -15991,14 +15905,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()" ] }, { @@ -16026,63 +15950,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" ] } ] @@ -16121,18 +16008,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": [ @@ -16194,12 +16110,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -16246,7 +16163,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -16254,7 +16171,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -16292,10 +16209,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -16312,10 +16230,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -16344,12 +16263,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -16389,10 +16309,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -16421,12 +16342,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -16478,12 +16400,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -16515,143 +16438,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": [ @@ -16662,30 +16448,15 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] - }, - { - "description": "Check if the button is not used.", - "fullName": "Is idle", - "functionType": "Condition", - "name": "IsIdle", - "sentence": "_PARAM0_ is idle", - "events": [ + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -16899,6 +16670,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -16907,21 +16679,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", - "LabelText" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -16936,18 +16700,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", @@ -16955,18 +16719,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Label", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -16978,12 +16742,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", @@ -16991,17 +16754,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Label.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -17013,122 +16776,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", @@ -17248,65 +16895,6608 @@ } ], "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": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" + }, + { + "value": "0.25", + "type": "Number", + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" + }, { "value": "0", "type": "Number", + "unit": "Pixel", "label": "Label offset on Y axis when pressed", + "group": "States", "name": "PressedLabelOffsetY" }, { "value": "0", "type": "Number", - "label": "Left padding", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "LeftPadding" + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" }, { - "value": "0", - "type": "Number", - "label": "Right padding", - "group": "Padding", + "value": "", + "type": "Choice", + "label": "", "extraInformation": [ - "Label" + "Label.Text=LabelText" ], - "name": "RightPadding" + "hidden": true, + "name": "_PropertyMapping" + } + ], + "variants": [ + { + "areaMaxX": 256, + "areaMaxY": 106, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Grey Button 2", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "Button", + "font": "ArchitectsDaughter.ttf", + "textAlignment": "center", + "characterSize": 22, + "color": { + "b": 0, + "g": 0, + "r": 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": "Button", + "font": "ArchitectsDaughter.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 22, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": false, + "topMargin": 32, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 80, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "d52675e5-4b81-4535-8e9a-d392ed684d6e", + "width": 240, + "x": 8, + "y": 48, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] + }, + { + "areaMaxX": 256, + "areaMaxY": 106, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "assetStoreOriginalName": "Grey Button", + "name": "Grey Button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "Button", + "font": "", + "textAlignment": "center", + "characterSize": 60, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "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": "Button", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 60, + "color": "72;72;79" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": false, + "topMargin": 32, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 80, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "d52675e5-4b81-4535-8e9a-d392ed684d6e", + "width": 240, + "x": 8, + "y": 48, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] + } + ] + } + ] + }, + { + "author": "", + "category": "User interface", + "extensionNamespace": "", + "fullName": "Button states and effects", + "gdevelopVersion": ">=5.5.222", + "helpPath": "/objects/button", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtdGFwLWJ1dHRvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMyA1QzE1LjIxIDUgMTcgNi43OSAxNyA5QzE3IDEwLjUgMTYuMiAxMS43NyAxNSAxMi40NlYxMS4yNEMxNS42MSAxMC42OSAxNiA5Ljg5IDE2IDlDMTYgNy4zNCAxNC42NiA2IDEzIDZTMTAgNy4zNCAxMCA5QzEwIDkuODkgMTAuMzkgMTAuNjkgMTEgMTEuMjRWMTIuNDZDOS44IDExLjc3IDkgMTAuNSA5IDlDOSA2Ljc5IDEwLjc5IDUgMTMgNU0yMCAyMC41QzE5Ljk3IDIxLjMyIDE5LjMyIDIxLjk3IDE4LjUgMjJIMTNDMTIuNjIgMjIgMTIuMjYgMjEuODUgMTIgMjEuNTdMOCAxNy4zN0w4Ljc0IDE2LjZDOC45MyAxNi4zOSA5LjIgMTYuMjggOS41IDE2LjI4SDkuN0wxMiAxOFY5QzEyIDguNDUgMTIuNDUgOCAxMyA4UzE0IDguNDUgMTQgOVYxMy40N0wxNS4yMSAxMy42TDE5LjE1IDE1Ljc5QzE5LjY4IDE2LjAzIDIwIDE2LjU2IDIwIDE3LjE0VjIwLjVNMjAgMkg0QzIuOSAyIDIgMi45IDIgNFYxMkMyIDEzLjExIDIuOSAxNCA0IDE0SDhWMTJMNCAxMkw0IDRIMjBMMjAgMTJIMThWMTRIMjBWMTMuOTZMMjAuMDQgMTRDMjEuMTMgMTQgMjIgMTMuMDkgMjIgMTJWNEMyMiAyLjkgMjEuMTEgMiAyMCAyWiIgLz48L3N2Zz4=", + "name": "ButtonStates", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", + "shortDescription": "Use any object as a button and change appearance according to user interactions.", + "version": "1.3.1", + "description": [ + "Use the \"Button states\" behavior to track user interactions with an object, including:", + "", + "- Hovered", + "- Pressed", + "- Clicked", + "- Idle", + "", + "Add additional behaviors to make juicy buttons with animated responses to user input:", + "", + "- Size", + "- Color", + "- Animation", + "- Object effects" + ], + "origin": { + "identifier": "ButtonStates", + "name": "gdevelop-extension-store" + }, + "tags": [ + "ui", + "button" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Use objects as buttons.", + "fullName": "Button states", + "name": "ButtonFSM", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Finite state machine", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The \"Validated\" state only last one frame." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure the cursor position is only checked once per frame." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "+", + "1" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reset the state of the button.", + "fullName": "Reset state", + "functionType": "Action", + "name": "ResetState", + "private": true, + "sentence": "Reset the button state of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", + "functionType": "Condition", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed outside with mouse or touch.", + "fullName": "Is held outside", + "functionType": "Condition", + "name": "IsPressedOutside", + "sentence": "_PARAM0_ is held outside", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the touch id that is using the button or 0 if none.", + "fullName": "Touch id", + "functionType": "ExpressionAndCondition", + "name": "TouchId", + "sentence": "the touch id", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TouchId" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "Should check hovering", + "hidden": true, + "name": "ShouldCheckHovering" + }, + { + "value": "Idle", + "type": "Choice", + "label": "State", + "extraInformation": [ + "Idle", + "Hovered", + "PressedInside", + "PressedOutside", + "Validated" + ], + "hidden": true, + "name": "State" + }, + { + "value": "0", + "type": "Number", + "label": "Touch id", + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Boolean", + "label": "Touch is inside", + "hidden": true, + "name": "TouchIsInside" + }, + { + "value": "", + "type": "Boolean", + "label": "Mouse is inside", + "hidden": true, + "name": "MouseIsInside" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "Index" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Enable effects on buttons based on their state.", + "fullName": "Button object effects", + "name": "ButtonObjectEffects", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "IdleEffect", + "yes" + ] + }, + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "FocusedEffect", + "no" + ] + }, + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "PressedEffect", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "States", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "IdleEffect", + "no" + ] + }, + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "FocusedEffect", + "no" + ] + }, + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "PressedEffect", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "IdleEffect", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "IdleEffect", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "FocusedEffect", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "FocusedEffect", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PressedEffect", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "PressedEffect", + "yes" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the idle state effect of the object.", + "fullName": "Idle state effect", + "functionType": "ExpressionAndCondition", + "group": "Button object effects configuration", + "name": "IdleEffect", + "sentence": "the idle state effect", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "IdleEffect" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleEffect", + "name": "SetIdleEffect", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleEffect", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the focused state effect of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state effect", + "functionType": "ExpressionAndCondition", + "group": "Button object effects configuration", + "name": "FocusedEffect", + "sentence": "the focused state effect", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "FocusedEffect" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedEffect", + "name": "SetFocusedEffect", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "FocusedEffect", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed state effect of the object.", + "fullName": "Pressed state effect", + "functionType": "ExpressionAndCondition", + "group": "Button object effects configuration", + "name": "PressedEffect", + "sentence": "the pressed state effect", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "PressedEffect" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedEffect", + "name": "SetPressedEffect", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PressedEffect", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Button states", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "name": "ButtonFSM" + }, + { + "value": "", + "type": "Behavior", + "label": "Effect capability", + "extraInformation": [ + "EffectCapability::EffectBehavior" + ], + "name": "Effect" + }, + { + "value": "", + "type": "String", + "label": "Idle state effect", + "group": "Effects", + "name": "IdleEffect" + }, + { + "value": "", + "type": "String", + "label": "Focused state effect", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Effects", + "name": "FocusedEffect" + }, + { + "value": "", + "type": "String", + "label": "Pressed state effect", + "group": "Effects", + "name": "PressedEffect" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Change the animation of buttons according to their state.", + "fullName": "Button animation", + "name": "ButtonAnimationName", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "IdleAnimationName" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Change based on state", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "IdleAnimationName" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "FocusedAnimationName" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "PressedAnimationName" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the idle state animation name of the object.", + "fullName": "Idle state animation name", + "functionType": "ExpressionAndCondition", + "group": "Button animation configuration", + "name": "IdleAnimationName", + "sentence": "the idle state animation name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "IdleAnimationName" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleAnimationName", + "name": "SetIdleAnimationName", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleAnimationName", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the focused state animation name of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state animation name", + "functionType": "ExpressionAndCondition", + "group": "Button animation configuration", + "name": "FocusedAnimationName", + "sentence": "the focused state animation name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "FocusedAnimationName" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedAnimationName", + "name": "SetFocusedAnimationName", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "FocusedAnimationName", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed state animation name of the object.", + "fullName": "Pressed state animation name", + "functionType": "ExpressionAndCondition", + "group": "Button animation configuration", + "name": "PressedAnimationName", + "sentence": "the pressed state animation name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "PressedAnimationName" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedAnimationName", + "name": "SetPressedAnimationName", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PressedAnimationName", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Animatable capability", + "extraInformation": [ + "AnimatableCapability::AnimatableBehavior" + ], + "name": "Animation" + }, + { + "value": "", + "type": "Behavior", + "label": "Button states", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "name": "ButtonFSM" + }, + { + "value": "Idle", + "type": "String", + "label": "Idle state animation name", + "group": "Animation", + "name": "IdleAnimationName" + }, + { + "value": "Focused", + "type": "String", + "label": "Focused state animation name", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Animation", + "name": "FocusedAnimationName" + }, + { + "value": "Pressed", + "type": "String", + "label": "Pressed state animation name", + "group": "Animation", + "name": "PressedAnimationName" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Smoothly change an effect on buttons according to their state.", + "fullName": "Button object effect tween", + "name": "ButtonObjectEffectTween", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "EffectValue", + "=", + "IdleValue" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "States", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "IdleValue", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "FocusedValue", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "FocusedValue", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Pressed\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "PressedValue", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Tween", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"FadeIn\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::PlayTween" + }, + "parameters": [ + "Object", + "Behavior", + "FadeInDuration", + "FadeInEasing", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"FadeOut\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::PlayTween" + }, + "parameters": [ + "Object", + "Behavior", + "FadeOutDuration", + "FadeOutEasing", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Time delta", + "functionType": "Expression", + "name": "TimeDelta", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TimeDelta() * LayerTimeScale(Object.Layer())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade in", + "functionType": "Action", + "name": "FadeIn", + "private": true, + "sentence": "_PARAM0_ fade in to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTime", + "=", + "0" + ] + }, + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"FadeIn\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenInitialValue", + "=", + "EffectValue" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTargetedValue", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade out", + "functionType": "Action", + "name": "FadeOut", + "private": true, + "sentence": "_PARAM0_ fade out to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTime", + "=", + "0" + ] + }, + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"FadeOut\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenInitialValue", + "=", + "EffectValue" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTargetedValue", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "Play tween", + "functionType": "Action", + "name": "PlayTween", + "private": true, + "sentence": "Tween the effect property of object _PARAM0_ over _PARAM2_ seconds with _PARAM3_ easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TweenTime", + "<", + "Duration" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTime", + "+", + "Object.Behavior::TimeDelta()" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "EffectValue", + "=", + "Tween::Ease(Easing, TweenInitialValue, TweenTargetedValue, TweenTime / Duration)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TweenTime", + ">=", + "Duration" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "EffectValue", + "=", + "TweenTargetedValue" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::SetEffectDoubleParameter" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "EffectProperty", + "EffectValue" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + }, + { + "description": "Duration (in seconds)", + "name": "Duration", + "type": "expression" + }, + { + "description": "Easing", + "name": "Easing", + "supplementaryInformation": "[]", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "the effect name of the object.", + "fullName": "Effect name", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "EffectName", + "sentence": "the effect name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "EffectName" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the effect parameter of the object. The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", + "fullName": "Effect parameter", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "EffectProperty", + "sentence": "the effect parameter", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "EffectProperty" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the effect parameter of the object. The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", + "fullName": "Effect parameter", + "functionType": "Action", + "getterName": "EffectName", + "group": "Button effect tween configuration", + "name": "SetEffectProperty", + "sentence": "Change the tweened effect of _PARAM0_ to _PARAM2_ with parameter _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "EffectName", + "=", + "NewEffectName" + ] + }, + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "EffectProperty", + "=", + "NewPropertyName" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + }, + { + "description": "Effect name", + "name": "NewEffectName", + "type": "string" + }, + { + "description": "Parameter name", + "name": "NewPropertyName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "the idle effect parameter value of the object.", + "fullName": "Idle effect parameter value", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "IdleValue", + "sentence": "the idle effect parameter value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "IdleValue" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleValue", + "name": "SetIdleValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "IdleValue", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the focused effect parameter value of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused effect parameter value", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FocusedValue", + "sentence": "the focused effect parameter value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FocusedValue" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedValue", + "name": "SetFocusedValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FocusedValue", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed effect parameter value of the object.", + "fullName": "Pressed effect parameter value", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "PressedValue", + "sentence": "the pressed effect parameter value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "PressedValue" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedValue", + "name": "SetPressedValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "PressedValue", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in easing of the object.", + "fullName": "Fade-in easing", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FadeInEasing", + "sentence": "the fade-in easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "FadeInEasing" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInEasing", + "name": "SetFadeInEasing", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "FadeInEasing", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out easing of the object.", + "fullName": "Fade-out easing", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FadeOutEasing", + "sentence": "the fade-out easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "FadeOutEasing" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutEasing", + "name": "SetFadeOutEasing", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "FadeOutEasing", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in duration of the object.", + "fullName": "Fade-in duration", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FadeInDuration", + "sentence": "the fade-in duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FadeInDuration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInDuration", + "name": "SetFadeInDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FadeInDuration", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out duration of the object.", + "fullName": "Fade-out duration", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FadeOutDuration", + "sentence": "the fade-out duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FadeOutDuration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutDuration", + "name": "SetFadeOutDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FadeOutDuration", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Button states", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "name": "ButtonFSM" + }, + { + "value": "", + "type": "Behavior", + "label": "Effect capability", + "extraInformation": [ + "EffectCapability::EffectBehavior" + ], + "name": "Effect" + }, + { + "value": "Effect", + "type": "String", + "label": "Effect name", + "group": "Effect", + "name": "EffectName" + }, + { + "value": "", + "type": "String", + "label": "Effect parameter", + "description": "The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", + "group": "Effect", + "name": "EffectProperty" + }, + { + "value": "0", + "type": "Number", + "label": "Idle effect parameter value", + "group": "Value", + "name": "IdleValue" + }, + { + "value": "0", + "type": "Number", + "label": "Focused effect parameter value", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Value", + "name": "FocusedValue" + }, + { + "value": "0", + "type": "Number", + "label": "Pressed effect parameter value", + "group": "Value", + "name": "PressedValue" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-in easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeInEasing" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeOutEasing" + }, + { + "value": "0.125", + "type": "Number", + "unit": "Second", + "label": "Fade-in duration", + "group": "Speed", + "name": "FadeInDuration" + }, + { + "value": "0.5", + "type": "Number", + "unit": "Second", + "label": "Fade-out duration", + "group": "Speed", + "name": "FadeOutDuration" + }, + { + "value": "Idle", + "type": "Choice", + "label": "", + "extraInformation": [ + "Idle", + "Focused", + "Pressed" + ], + "hidden": true, + "name": "PreviousState" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "TweenInitialValue" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "TweenTargetedValue" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "TweenTime" + }, + { + "value": "NoTween", + "type": "Choice", + "label": "", + "extraInformation": [ + "NoTween", + "FadeIn", + "FadeOut" + ], + "hidden": true, + "name": "TweenState" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "EffectValue" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Smoothly resize buttons according to their state.", + "fullName": "Button scale tween", + "name": "ButtonScaleTween", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ScalableCapability::ScalableBehavior::SetValue" + }, + "parameters": [ + "Object", + "Scale", + "=", + "IdleScale" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Change based on state", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonScaleTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "IdleScale", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonScaleTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "FocusedScale", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonScaleTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "FocusedScale", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Pressed\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonScaleTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "PressedScale", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade in", + "functionType": "Action", + "name": "FadeIn", + "private": true, + "sentence": "_PARAM0_ fade in to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween::AddObjectScaleTween" + }, + "parameters": [ + "Object", + "Tween", + "\"__ButtonScaleTween.Fade\"", + "Value", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", + "no", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade out", + "functionType": "Action", + "name": "FadeOut", + "private": true, + "sentence": "_PARAM0_ fade out to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween::AddObjectScaleTween" + }, + "parameters": [ + "Object", + "Tween", + "\"__ButtonScaleTween.Fade\"", + "Value", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", + "no", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the idle state size scale of the object.", + "fullName": "Idle state size scale", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "IdleScale", + "sentence": "the idle state size scale", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "IdleScale" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleScale", + "name": "SetIdleScale", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "IdleScale", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the focused state size scale of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state size scale", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FocusedScale", + "sentence": "the focused state size scale", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FocusedScale" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedScale", + "name": "SetFocusedScale", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FocusedScale", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed state size scale of the object.", + "fullName": "Pressed state size scale", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "PressedScale", + "sentence": "the pressed state size scale", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "PressedScale" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedScale", + "name": "SetPressedScale", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "PressedScale", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in duration of the object.", + "fullName": "Fade-in duration", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FadeInDuration", + "sentence": "the fade-in duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FadeInDuration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInDuration", + "name": "SetFadeInDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FadeInDuration", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out duration of the object.", + "fullName": "Fade-out duration", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FadeOutDuration", + "sentence": "the fade-out duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FadeOutDuration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutDuration", + "name": "SetFadeOutDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FadeOutDuration", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in easing of the object.", + "fullName": "Fade-in easing", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FadeInEasing", + "sentence": "the fade-in easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "FadeInEasing" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInEasing", + "name": "SetFadeInEasing", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "FadeInEasing", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out easing of the object.", + "fullName": "Fade-out easing", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FadeOutEasing", + "sentence": "the fade-out easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "FadeOutEasing" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutEasing", + "name": "SetFadeOutEasing", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "FadeOutEasing", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Scalable capability", + "extraInformation": [ + "ScalableCapability::ScalableBehavior" + ], + "name": "Scale" + }, + { + "value": "", + "type": "Behavior", + "label": "Button states behavior (required)", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "name": "ButtonFSM" + }, + { + "value": "", + "type": "Behavior", + "label": "Tween behavior (required)", + "extraInformation": [ + "Tween::TweenBehavior" + ], + "name": "Tween" + }, + { + "value": "1", + "type": "Number", + "unit": "Dimensionless", + "label": "Idle state size scale", + "group": "Size", + "name": "IdleScale" + }, + { + "value": "1", + "type": "Number", + "unit": "Dimensionless", + "label": "Focused state size scale", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Size", + "name": "FocusedScale" + }, + { + "value": "0.1", + "type": "Number", + "unit": "Second", + "label": "Fade-in duration", + "group": "Speed", + "name": "FadeInDuration" + }, + { + "value": "0.2", + "type": "Number", + "unit": "Second", + "label": "Fade-out duration", + "group": "Speed", + "name": "FadeOutDuration" + }, + { + "value": "0.95", + "type": "Number", + "unit": "Dimensionless", + "label": "Pressed state size scale", + "group": "Size", + "name": "PressedScale" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-in easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeInEasing" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeOutEasing" + }, + { + "value": "Idle", + "type": "Choice", + "label": "", + "extraInformation": [ + "Idle", + "Focused", + "Pressed" + ], + "hidden": true, + "name": "PreviousState" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Smoothly change the color tint of buttons according to their state.", + "fullName": "Button color tint tween", + "name": "ButtonColorTintTween", + "objectType": "Sprite", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "Object", + "IdleColorTint" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "States", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "IdleColorTint", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "FocusedColorTint", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "FocusedColorTint", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Pressed\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "PressedColorTint", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade in", + "functionType": "Action", + "name": "FadeIn", + "private": true, + "sentence": "_PARAM0_ fade in to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween::AddObjectColorTween" + }, + "parameters": [ + "Object", + "Tween", + "\"__ButtonColorTintTween.Fade\"", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", + "no", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "color" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade out", + "functionType": "Action", + "name": "FadeOut", + "private": true, + "sentence": "_PARAM0_ fade out to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween::AddObjectColorTween" + }, + "parameters": [ + "Object", + "Tween", + "\"__ButtonColorTintTween.Fade\"", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", + "no", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "color" + } + ], + "objectGroups": [] + }, + { + "description": "the idle state color tint of the object.", + "fullName": "Idle state color tint", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "IdleColorTint", + "sentence": "the idle state color tint", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "IdleColorTint" + ] + } + ] + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleColorTint", + "name": "SetIdleColorTint", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleColorTint", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the focused state color tint of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state color tint", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FocusedColorTint", + "sentence": "the focused state color tint", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "FocusedColorTint" + ] + } + ] + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedColorTint", + "name": "SetFocusedColorTint", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "FocusedColorTint", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed state color tint of the object.", + "fullName": "Pressed state color tint", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "PressedColorTint", + "sentence": "the pressed state color tint", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "PressedColorTint" + ] + } + ] + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedColorTint", + "name": "SetPressedColorTint", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PressedColorTint", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in duration of the object.", + "fullName": "Fade-in duration", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeInDuration", + "sentence": "the fade-in duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FadeInDuration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInDuration", + "name": "SetFadeInDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FadeInDuration", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] }, { - "value": "0", - "type": "Number", - "label": "Top padding", - "group": "Padding", + "description": "the fade-out duration of the object.", + "fullName": "Fade-out duration", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeOutDuration", + "sentence": "the fade-out duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FadeOutDuration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutDuration", + "name": "SetFadeOutDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FadeOutDuration", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in easing of the object.", + "fullName": "Fade-in easing", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeInEasing", + "sentence": "the fade-in easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "FadeInEasing" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInEasing", + "name": "SetFadeInEasing", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "FadeInEasing", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out easing of the object.", + "fullName": "Fade-out easing", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeOutEasing", + "sentence": "the fade-out easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "FadeOutEasing" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutEasing", + "name": "SetFadeOutEasing", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "FadeOutEasing", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Button states", "extraInformation": [ - "Label" + "ButtonStates::ButtonFSM" ], - "name": "TopPadding" + "name": "ButtonFSM" }, { - "value": "0", - "type": "Number", - "label": "Bottom padding", - "group": "Padding", + "value": "", + "type": "Behavior", + "label": "Tween", "extraInformation": [ - "Label" + "Tween::TweenBehavior" ], - "name": "BottomPadding" + "name": "Tween" }, { - "value": "0.25", + "value": "255;255;255", + "type": "Color", + "label": "Idle state color tint", + "group": "Color", + "name": "IdleColorTint" + }, + { + "value": "192;192;192", + "type": "Color", + "label": "Focused state color tint", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Color", + "name": "FocusedColorTint" + }, + { + "value": "64;64;64", + "type": "Color", + "label": "Pressed state color tint", + "group": "Color", + "name": "PressedColorTint" + }, + { + "value": "0.1", "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "name": "HoveredFadeOutDuration" + "unit": "Second", + "label": "Fade-in duration", + "group": "Speed", + "name": "FadeInDuration" + }, + { + "value": "0.2", + "type": "Number", + "unit": "Second", + "label": "Fade-out duration", + "group": "Speed", + "name": "FadeOutDuration" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-in easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeInEasing" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeOutEasing" + }, + { + "value": "Idle", + "type": "Choice", + "label": "", + "extraInformation": [ + "Idle", + "Focused", + "Pressed" + ], + "hidden": true, + "name": "PreviousState" } ], - "variants": [] + "sharedPropertyDescriptors": [] } - ] + ], + "eventsBasedObjects": [] } ], "externalLayouts": [] diff --git a/examples/wave-defense-shooter/wave-defense-shooter.json b/examples/wave-defense-shooter/wave-defense-shooter.json index 818eac3cb..b8848aba1 100644 --- a/examples/wave-defense-shooter/wave-defense-shooter.json +++ b/examples/wave-defense-shooter/wave-defense-shooter.json @@ -81,7 +81,9 @@ "authorIds": [], "authorUsernames": [], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -321,53 +323,6 @@ "smoothed": false, "userAdded": true }, - { - "file": "assets/Transparent Button With White Blue Border_Hovered.png", - "kind": "image", - "metadata": "", - "name": "Transparent Button With White Blue Border_Hovered.png", - "smoothed": false, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/6d8e529f898d0d1cfc8e94ba10ae0a01e0a31b08bc0d11ec35074a34f3485f55_Transparent Button With White Blue Border_Hovered.png", - "name": "Transparent Button With White Blue Border_Hovered.png" - } - }, - { - "file": "assets/Transparent Button With White Blue Border_Idle.png", - "kind": "image", - "metadata": "", - "name": "Transparent Button With White Blue Border_Idle.png", - "smoothed": false, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/7311d88d62c25c9a5e7ed4f2031f4d58fabe564e093b203e62e467a1a995ed32_Transparent Button With White Blue Border_Idle.png", - "name": "Transparent Button With White Blue Border_Idle.png" - } - }, - { - "file": "assets/Transparent Button With White Blue Border_Pressed.png", - "kind": "image", - "metadata": "", - "name": "Transparent Button With White Blue Border_Pressed.png", - "smoothed": false, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/c18e2e342a2cce350f068208df2b7f5549dc600d2201609b1d3d76c497fffd30_Transparent Button With White Blue Border_Pressed.png", - "name": "Transparent Button With White Blue Border_Pressed.png" - } - }, - { - "file": "assets/Kenney Mini Square.ttf", - "kind": "font", - "metadata": "", - "name": "Kenney Mini Square.ttf", - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/5e2e3fcc57885d5e510934e621be5f8dd7a5b6425cf46ef38073e3d2c3b04048_Kenney Mini Square.ttf", - "name": "Kenney Mini Square.ttf" - } - }, { "file": "assets/Spider1.png", "kind": "image", @@ -787,6 +742,53 @@ "identifier": "https://asset-resources.gdevelop.io/public-resources/Resource bars/pixel art/c090d31cafed0c8ef7bb4d5af75a7dbf7149bcc03a7d5d63ae997d59100e362e_Flat Bar White Border.png", "name": "Flat Bar White Border.png" } + }, + { + "file": "assets/Transparent Button With White Blue Border_Hovered.png", + "kind": "image", + "metadata": "", + "name": "Transparent Button With White Blue Border_Hovered.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/6d8e529f898d0d1cfc8e94ba10ae0a01e0a31b08bc0d11ec35074a34f3485f55_Transparent Button With White Blue Border_Hovered.png", + "name": "Transparent Button With White Blue Border_Hovered.png" + } + }, + { + "file": "assets/Transparent Button With White Blue Border_Idle.png", + "kind": "image", + "metadata": "", + "name": "Transparent Button With White Blue Border_Idle.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/7311d88d62c25c9a5e7ed4f2031f4d58fabe564e093b203e62e467a1a995ed32_Transparent Button With White Blue Border_Idle.png", + "name": "Transparent Button With White Blue Border_Idle.png" + } + }, + { + "file": "assets/Transparent Button With White Blue Border_Pressed.png", + "kind": "image", + "metadata": "", + "name": "Transparent Button With White Blue Border_Pressed.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/c18e2e342a2cce350f068208df2b7f5549dc600d2201609b1d3d76c497fffd30_Transparent Button With White Blue Border_Pressed.png", + "name": "Transparent Button With White Blue Border_Pressed.png" + } + }, + { + "file": "assets/Kenney Mini Square.ttf", + "kind": "font", + "metadata": "", + "name": "Kenney Mini Square.ttf", + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/5e2e3fcc57885d5e510934e621be5f8dd7a5b6425cf46ef38073e3d2c3b04048_Kenney Mini Square.ttf", + "name": "Kenney Mini Square.ttf" + } } ], "resourceFolders": [] @@ -5139,7 +5141,7 @@ "assetStoreId": "f0c3d7ae6099e3b9b8beed4e30b555107550b4fb2a5879e984a014b1e06865bf", "name": "PowerButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Transparent Button With White Blue Border", "variables": [], "effects": [], "behaviors": [], @@ -5224,7 +5226,7 @@ "assetStoreId": "f0c3d7ae6099e3b9b8beed4e30b555107550b4fb2a5879e984a014b1e06865bf", "name": "FireRateButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Transparent Button With White Blue Border", "variables": [], "effects": [], "behaviors": [], @@ -5309,7 +5311,7 @@ "assetStoreId": "f0c3d7ae6099e3b9b8beed4e30b555107550b4fb2a5879e984a014b1e06865bf", "name": "AccuracyButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "", + "variant": "Transparent Button With White Blue Border", "variables": [], "effects": [], "behaviors": [], @@ -17877,13 +17879,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.", "", @@ -17900,6 +17902,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": [], @@ -19043,7 +19051,7 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 64, + "areaMaxX": 256, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, @@ -19052,7 +19060,8 @@ "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", - "isUsingLegacyInstancesRenderer": true, + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", "objects": [ { @@ -19065,10 +19074,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, @@ -19091,8 +19111,8 @@ "underlined": false, "text": "Text", "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", + "textAlignment": "center", + "verticalTextAlignment": "center", "characterSize": 20, "color": "0;0;0" } @@ -19119,6 +19139,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", @@ -19141,6 +19171,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" @@ -19161,7 +19201,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": { @@ -19181,7 +19232,22 @@ } ] }, - "objectsGroups": [], + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], "layers": [ { "ambientLightColorB": 200, @@ -19212,7 +19278,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": "", @@ -19242,7 +19341,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -19254,7 +19353,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -19262,14 +19361,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()" ] }, { @@ -19297,63 +19406,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" ] } ] @@ -19392,18 +19464,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": [ @@ -19465,12 +19566,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -19517,7 +19619,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -19525,7 +19627,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -19563,10 +19665,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -19583,10 +19686,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -19615,12 +19719,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -19660,10 +19765,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -19692,12 +19798,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -19749,12 +19856,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -19786,143 +19894,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": [ @@ -19933,22 +19904,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -20170,6 +20126,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -20178,21 +20135,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", - "LabelText" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -20207,18 +20156,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", @@ -20226,18 +20175,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Label", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -20249,12 +20198,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", @@ -20262,17 +20210,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Label.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -20285,65 +20233,35 @@ "objectGroups": [] }, { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "MettreXY" + "value": "BooleanVariable" }, "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" + "ShouldActivate", + "True", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "TextObject::WrappingWidth" + "value": "ActivateBehavior" }, "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" - ] - } + "Idle", + "ButtonFSM", + "yes" ] } ] @@ -20353,10 +20271,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", + "ShouldActivate", + "True", "" ] } @@ -20364,12 +20284,12 @@ "actions": [ { "type": { - "value": "MettreY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" + "Idle", + "ButtonFSM", + "no" ] } ] @@ -20381,130 +20301,123 @@ "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - } - ], - "objectGroups": [ + }, { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" } - ] + ], + "objectGroups": [] }, { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BooleanVariable" + "value": "BehaviorActivated" }, "parameters": [ - "ShouldActivate", - "True", - "" + "Idle", + "ButtonFSM" ] } ], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnBoolean" }, "parameters": [ - "Idle", - "ButtonFSM", - "yes" + "True" ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "BooleanVariable" - }, - "parameters": [ - "ShouldActivate", - "True", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnNumber" }, "parameters": [ - "Idle", - "ButtonFSM", - "no" + "LabelOffset" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - }, - { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "BehaviorActivated" + "value": "SetCenterY" }, "parameters": [ - "Idle", - "ButtonFSM" + "Label", + "+", + "Value - LabelOffset" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "LabelOffset", + "=", + "Value" ] } ] @@ -20523,59 +20436,317 @@ ], "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" } ], - "variants": [] + "variants": [ + { + "areaMaxX": 192, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "f0c3d7ae6099e3b9b8beed4e30b555107550b4fb2a5879e984a014b1e06865bf", + "assetStoreOriginalName": "Transparent Button With White Blue Border", + "name": "Transparent Button With White Blue Border", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "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": "Button", + "font": "Kenney Mini Square.ttf", + "textAlignment": "center", + "characterSize": 45, + "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": "Button", + "font": "Kenney Mini Square.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 45, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Idle", + "rightMargin": 6, + "texture": "Transparent Button With White Blue Border_Idle.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Hovered", + "rightMargin": 6, + "texture": "Transparent Button With White Blue Border_Hovered.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 10, + "height": 64, + "leftMargin": 6, + "name": "Pressed", + "rightMargin": 6, + "texture": "Transparent Button With White Blue Border_Pressed.png", + "tiled": false, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ], + "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": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 49, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "7625fb44-51ef-4efe-84b8-eaee7548d332", + "width": 180, + "x": 6, + "y": 30, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] + } + ] } ] },